Bonjour,
J'ai ce petit script ant :
Build.xml :
J'ai mis ce fichier dans le répertoire de ant.bat (C:\Program Files\apache-ant-1.7.1\bin) . J'execute ant.bat à partir d'une console sur Window XP, voilà ce qu'il m'affiche :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46 <?xml version="1.0" encoding="UTF-8"?> <project> <!--Common declarations--> <property name="sourcebase.dir" value="D:\Mes_Documents\Dev_cvs\InformatisationAST" /> <property name="destbase.dir" value="D:\Mes_Documents\Dev_cvs\InformatisationAST\Deployement" /> <property name="tomcatlib.dir" value="C:\Program Files\Apache Software Foundation\Tomcat 5.5\common\lib" /> <property name="classesdest.dir" value="${destbase.dir}\classes"/> <property name="jardest.dir" value="${destbase.dir}\jar" /> <!--JavaCommun declarations--> <property name="javacommun.name" value="JavaCommun" /> <property name="javacommunsource.dir" value="${sourcebase.dir}\${javacommun.name}"/> <property name="javacommundestclasses.dir" value="${classesdest.dir}\${javacommun.name}"/> <property name="alllibs.dir" value="${javacommunsource.dir}" /> <!--Synchro server--> <property name="synchroserver.name" value="Serveur-Synchro" /> <property name="synchroserversource.dir" value="${sourcebase.dir}\${synchroserver.name}" /> <property name="synchroserverdestclasses.dir" value="${classesdest.dir}\${synchroserver.name}"/> <!--Normal classpath--> <path id="classpath"> <fileset dir="${alllibs.dir}" includes="**/*.jar" /> <fileset dir="${tomcatlib.dir}" includes="**/*.jar" /> </path> <!--Class path with libsilliker and libcommon--> <path id="classpath_with_libs"> <fileset dir="${alllibs.dir}" includes="**/*.jar" /> <fileset dir="${tomcatlib.dir}" includes="**/*.jar" /> <fileset dir="${jardest.dir}" includes="**/*.jar" /> </path> <!--Clean target--> <target name="clean"> <delete dir="${destbase.dir}"/> </target> <!--libcommon class compilation--> <target name="compile_javacommun"> <mkdir dir="${javacommundestclasses.dir}" /> <javac srcdir="${javacommunsource.dir}" destdir="${javacommundestclasses.dir}" classpathref="classpath" debug="on" /> </target> </project>
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37 Apache Ant version 1.7.1 compiled on June 27 2008 Buildfile: build.xml Adding reference: ant.PropertyHelper Detected Java version: 1.4 in: C:\Oracle\DevSuiteHome_1\jdk\jre Detected OS: Windows XP Adding reference: ant.ComponentHelper Setting ro project property: ant.file -> C:\ant\bin\build.xml Adding reference: ant.projectHelper Adding reference: ant.parsing.context Adding reference: ant.targets parsing buildfile C:\ant\bin\build.xml with URI = file:/C:/ant/bin/build.xml Project base dir set to: C:\ant\bin +Target: +Target: clean +Target: compile_javacommun [antlib:org.apache.tools.ant] Could not load definitions from resource org/apache/tools/ant/antlib.xml. It could not be found. Setting project property: sourcebase.dir -> D:\Mes_Documents\Dev_cvs\InformatisationAST Setting project property: destbase.dir -> D:\Mes_Documents\Dev_cvs\InformatisationAST\Deployement Setting project property: tomcatlib.dir -> C:\Program Files\Apache Software Foundation\Tomcat 5.5\common\lib Setting project property: classesdest.dir -> D:\Mes_Documents\Dev_cvs\InformatisationAST\Deployement\classes Setting project property: jardest.dir -> D:\Mes_Documents\Dev_cvs\InformatisationAST\Deployement\jar Setting project property: javacommun.name -> JavaCommun Setting project property: javacommunsource.dir -> D:\Mes_Documents\Dev_cvs\InformatisationAST\JavaCommun Setting project property: javacommundestclasses.dir -> D:\Mes_Documents\Dev_cvs\InformatisationAST\Deployement\classes\JavaCommun Setting project property: alllibs.dir -> D:\Mes_Documents\Dev_cvs\InformatisationAST\JavaCommun Setting project property: synchroserver.name -> Serveur-Synchro Setting project property: synchroserversource.dir -> D:\Mes_Documents\Dev_cvs\InformatisationAST\Serveur-Synchro Setting project property: synchroserverdestclasses.dir -> D:\Mes_Documents\Dev_cvs\InformatisationAST\Deployement\classes\Serveur-Synchro Adding reference: classpath Adding reference: classpath_with_libs Attempting to create object of type org.apache.tools.ant.helper.DefaultExecutor Adding reference: ant.executor BUILD SUCCESSFUL Total time: 0 seconds
Mais absolument rien n'est crée.
Merci de me donner vos idées
Partager