salut à tous,
j'ai quelques soucis à mettre en place un projet.
quelqu'un pourrait t-il me fournir un build.xml simple et l'arborescence du projet à mettre en place ?
gracias
jeremie
Version imprimable
salut à tous,
j'ai quelques soucis à mettre en place un projet.
quelqu'un pourrait t-il me fournir un build.xml simple et l'arborescence du projet à mettre en place ?
gracias
jeremie
un build.xml et une arborescence pour quel genre de projet ?
mon build.xml du moment :
<!--
General purpose build script for web applications and web services,
including enhanced support for deploying directly to a Tomcat 5
based server.
This build script assumes that the source code of your web application
is organized into the following subdirectories underneath the source
code directory from which you execute the build script:
docs Static documentation files to be copied to
the "docs" subdirectory of your distribution.
src Java source code (and associated resource files)
to be compiled to the "WEB-INF/classes"
subdirectory of your web applicaiton.
web Static HTML, JSP, and other content (such as
image files), including the WEB-INF subdirectory
and its configuration file contents.
$Id: build.xml,v 1.3 2006-01-30 21:42:24 reignier Exp $
-->
<!--
A "project" describes a set of targets that may be requested
when Ant is executed. The "default" attribute defines the
target which is executed if no specific target is requested,
and the "basedir" attribute defines the current working directory
from which Ant executes the requested task. This is normally
set to the current working directory.
-->
<project name="My Project" default="compile" basedir=".">
<!--
===================== Property Definitions ===========================
-->
<!--
Each of the following properties are used in the build script.
Values for these properties are set by the first place they are
defined, from the following list:
* Definitions on the "ant" command line (ant -Dfoo=bar compile).
* Definitions from a "build.properties" file in the top level
source directory of this application.
* Definitions from a "build.properties" file in the developer's
home directory.
* Default definitions in this build.xml file.
You will note below that property values can be composed based on the
contents of previously defined properties. This is a powerful technique
that helps you minimize the number of changes required when your development
environment is modified. Note that property composition is allowed within
"build.properties" files as well as in the "build.xml" script.
-->
<property file="build.properties"/>
<property file="${user.home}/build.properties"/>
<!--
==================== File and Directory Names ========================
-->
<!--
These properties generally define file and directory names (or paths) that
affect where the build process stores its outputs.
app.name Base name of this application, used to
construct filenames and directories.
Defaults to "myapp".
app.path Context path to which this application should be
deployed (defaults to "/" plus the value of the
"app.name" property).
app.version Version number of this iteration of the application.
build.home The directory into which the "prepare" and
"compile" targets will generate their output.
Defaults to "build".
catalina.home The directory in which you have installed
a binary distribution of Tomcat 5. This will
be used by the "deploy" target.
dist.home The name of the base directory in which
distribution files are created.
Defaults to "dist".
manager.password The login password of a user that is assigned the
"manager" role (so that he or she can execute
commands via the "/manager" web application)
manager.url The URL of the "/manager" web application on the
Tomcat installation to which we will deploy web
applications and web services.
manager.username The login username of a user that is assigned the
"manager" role (so that he or she can execute
commands via the "/manager" web application)
-->
<property name="app.name" value="Bitacoas"/>
<property name="app.path" value="/${app.name}"/>
<property name="app.version" value="0.1-dev"/>
<property name="build.home" value="${basedir}/build"/>
<property name="catalina.home" value="../../../.."/>
<!-- UPDATE THIS! -->
<property name="dist.home" value="${basedir}/dist"/>
<property name="docs.home" value="${basedir}/docs"/>
<property name="manager.url" value="http://localhost:8080/manager"/>
<property name="src.home" value="${basedir}/src"/>
<property name="web.home" value="${basedir}/WEB-INF"/>
<!--
==================== Compilation Control Options ====================
-->
<!--
These properties control option settings on the Javac compiler when it
is invoked using the <javac> task.
compile.debug Should compilation include the debug option?
compile.deprecation Should compilation include the deprecation option?
compile.optimize Should compilation include the optimize option?
-->
<property name="compile.debug" value="true"/>
<property name="compile.deprecation" value="false"/>
<property name="compile.optimize" value="true"/>
<!--
==================== Compilation Classpath ===========================
-->
<!--
Rather than relying on the CLASSPATH environment variable, Ant includes
features that makes it easy to dynamically construct the classpath you
need for each compilation. The example below constructs the compile
classpath to include the servlet.jar file, as well as the other components
that Tomcat makes available to web applications automatically, plus anything
that you explicitly added.
-->
<!-- <path id="compile.classpath">
-->
<!--
Include all elements that Tomcat exposes to applications
-->
<!--<pathelement location="${catalina.home}/common/classes"/>
<fileset dir="${catalina.home}/common/endorsed">
<include name="*.jar"/>
</fileset>
<fileset dir="${basedir}/web/WEB-INF/lib">
<include name="*.jar"/>
</fileset>
<fileset dir="${catalina.home}/common/lib">
<include name="*.jar"/>
</fileset>
<pathelement location="${catalina.home}/shared/classes"/>
<fileset dir="${catalina.home}/shared/lib">
<include name="*.jar"/>
</fileset>
</path>
-->
<!--
==================== All Target ======================================
-->
<!--
The "all" target is a shortcut for running the "clean" target followed
by the "compile" target, to force a complete recompile.
-->
<target name="all" depends="clean,compile" description="Clean build and dist directories, then compile"/>
<!--
==================== Clean Target ====================================
-->
<!--
The "clean" target deletes any previous "build" and "dist" directory,
so that you can be ensured the application can be built from scratch.
-->
<target name="clean" description="Delete old build and dist directories">
<delete dir="${build.home}"/>
<delete dir="${dist.home}"/>
</target>
<!--
==================== Compile Target ==================================
-->
<!--
The "compile" target transforms source files (from your "src" directory)
into object files in the appropriate location in the build directory.
This example assumes that you will be including your classes in an
unpacked directory hierarchy under "/WEB-INF/classes".
-->
<target name="compile" description="Compile Java sources">
<!-- Compile Java classes as necessary -->
<mkdir dir="${build.home}/WEB-INF/classes"/>
<javac srcdir="${src.home}" destdir="${build.home}/WEB-INF/classes">
<!--<classpath refid="compile.classpath"/>-->
</javac>
<!-- Copy application resources -->
<copy todir="${build.home}/WEB-INF/classes">
<fileset dir="${src.home}" excludes="**/*.java"/>
</copy>
</target>
<!--
==================== Dist Target =====================================
-->
<!--
The "dist" target creates a binary distribution of your application
in a directory structure ready to be archived in a tar.gz or zip file.
Note that this target depends on two others:
* "compile" so that the entire web application (including external
dependencies) will have been assembled
* "javadoc" so that the application Javadocs will have been created
-->
<target name="dist" depends="compile" description="Create binary distribution">
<!-- Copy documentation subdirectories -->
<mkdir dir="${dist.home}/docs"/>
<!--<copy todir="${dist.home}/docs">
<fileset dir="${docs.home}"/>
</copy>-->
<!-- Create application JAR file -->
<jar jarfile="${dist.home}/${app.name}-${app.version}.war" basedir="${build.home}"/>
<!--
Copy additional files to ${dist.home} as necessary
-->
</target>
</project>
et mon arborescence :
bin
build
jsp
src
WEB-INF/classes
WEB-INF/lib
WEB-INF/src
work
quelque chose cloche !
Je t'ai demandé pour quel genre de projet, pas que tu me mettes tout le code de ton build.xml qui ne me sert à rien pour te répondre pour l'instant !!!! De plus, quand tu inclus du code, :tagcode:
je pense pourtant être dans le forum Eclipse et avoir spécifié qu'il s'agissait d'un projet WEB tournant sur Tomcat dans le sujet de mon précédent post !
Certes, mais tu as noyé l'information sous un flot trop important de données.
Ici, nous sommes sur un forum d'entraide, pense que chaque personne qui passe ici va essayer de répondre aux questions, mais s'il faut passer du temps à essayer de trouver les informations qui concernent ta question, beaucoup vont passer leur chemin sans même chercher à comprendre.
Si tu veux obtenir de l'aide, respecte certaines règles:
Fais un message aussi court que possible qui ne contient que les informations minimales nécessaires à la compréhension du problème. C'est à toi d'isoler la partie du problème sur laquelle tu bloques, et une fois que tu auras isolé cette partie, nous t'aiderons.
Là, tu te contentes de fournir un build.xml de plus de 100 lignes sans même l'isoler dans une balise CODE et tu nous dis "tenez, ca marche pas"...