Bonjour,
J'ai un script qui tourne très bien sour Eclipse et pour certaines raisons je veux qu'il redémarre régulièrement.
Le problème c'est qu'il y a plein de librairies et que j'ai des tonnes de conflits dans la manifest quand je l'exporte avec JAR ou Runnable JAR.
Du coup j'aimerais bien utiliser ce qu'eclipse utilise pour le lancer et donc ANT sur le build.xml créé par Eclipse pour le projet.
Mais je ne sais pas pourquoi ça me met une drole d'erreur "Target "build.xml" does not exist" alors que le fichier build.xml est bien là
build.xml :
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 C:\Users\Admin\Desktop\Logiciels\CERFAextraction>ant build.xml Buildfile: C:\Users\Admin\Desktop\Logiciels\CERFAextraction\build.xml BUILD FAILED Target "build.xml" does not exist in the project "CERFAextraction". Total time: 0 seconds C:\Users\Admin\Desktop\Logiciels\CERFAextraction>echo %JAVA_HOME% C:\Program Files\Java\jdk1.8.0_31 C:\Users\Admin\Desktop\Logiciels\CERFAextraction>echo %ANT_HOME% C:\Program Files\Java\apache-ant-1.9.5 C:\Users\Admin\Desktop\Logiciels\CERFAextraction>echo %PATH% C:\ProgramData\Oracle\Java\javapath;C:\Program Files\Common Files\Microsoft Shar ed\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Liv e;C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bin\x 86;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\W indowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Stat ic;C:\Program Files (x86)\Calibre2\;c:\Program Files (x86)\Microsoft SQL Server\ 100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Windows Live\Sh ared;C:\Program Files (x86)\MySQL\MySQL Utilities 1.4.3\;C:\Program Files (x86)\ MySQL\MySQL Utilities 1.4.3\Doctrine extensions for PHP\;C:\Program Files (x86)\ AMD\ATI.ACE\Core-Static;C:\Program Files (x86)\Windows Kits\8.1\Windows Performa nce Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Fi les (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files\Microsoft SQL Server\1 20\Tools\Binn\;C:\Program Files (x86)\Pinnacle\Shared Files\;C:\Program Files\Ja va\jdk1.8.0_31\bin;C:\Program Files\Java\apache-ant-1.9.5\bin;
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81 <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!-- WARNING: Eclipse auto-generated file. Any modifications will be overwritten. To include a user specific buildfile here, simply create one in the same directory with the processing instruction <?eclipse.ant.import?> as the first entry and export the buildfile again. --><project basedir="." default="build" name="CERFAextraction"> <property environment="env"/> <property name="ECLIPSE_HOME" value="../../../../../Program Files (x86)/eclipse/"/> <property name="debuglevel" value="source,lines,vars"/> <property name="target" value="1.7"/> <property name="source" value="1.7"/> <path id="CERFAextraction.classpath"> <pathelement location="bin"/> <pathelement location="lib/java-sizeof-0.0.2.jar"/> <pathelement location="lib/jsoup-1.7.3.jar"/> <pathelement location="lib/httpclient-4.3.1.jar"/> <pathelement location="lib/httpcore-4.3.jar"/> <pathelement location="lib/httpmime-4.3.1.jar"/> <pathelement location="lib/httpclient-cache-4.3.1.jar"/> <pathelement location="lib/fluent-hc-4.3.1.jar"/> <pathelement location="lib/commons-logging-1.1.3.jar"/> <pathelement location="lib/commons-codec-1.6.jar"/> <pathelement location="lib/microsoft-translator-java-api-0.6.2-jar-with-dependencies.jar"/> <pathelement location="lib/groovy-all-2.4.0.jar"/> <pathelement location="lib/ij.jar"/> <pathelement location="lib/commons-beanutils-1.9.1.jar"/> <pathelement location="lib/commons-io-2.4.jar"/> <pathelement location="lib/ghost4j-0.5.1.jar"/> <pathelement location="lib/itext-2.1.7.jar"/> <pathelement location="lib/jai_imageio.jar"/> <pathelement location="lib/jna.jar"/> <pathelement location="lib/junit-4.10.jar"/> <pathelement location="lib/xmlgraphics-commons-1.5.jar"/> <pathelement location="dist/tess4j.jar"/> <pathelement location="lib/DJNativeSwing-SWT.jar"/> <pathelement location="lib/DJNativeSwing.jar"/> <pathelement location="lib/swt-4.3-32bit-win32-win32-x86.jar"/> <pathelement location="lib/log4j-1.2.17.jar"/> </path> <target name="init"> <mkdir dir="bin"/> <copy includeemptydirs="false" todir="bin"> <fileset dir="src"> <exclude name="**/*.launch"/> <exclude name="**/*.java"/> </fileset> </copy> </target> <target name="clean"> <delete dir="bin"/> </target> <target depends="clean" name="cleanall"/> <target depends="build-subprojects,build-project" name="build"/> <target name="build-subprojects"/> <target depends="init" name="build-project"> <echo message="${ant.project.name}: ${ant.file}"/> <javac debug="true" debuglevel="${debuglevel}" destdir="bin" includeantruntime="false" source="${source}" target="${target}"> <src path="src"/> <classpath refid="CERFAextraction.classpath"/> </javac> </target> <target description="Build all projects which reference this project. Useful to propagate changes." name="build-refprojects"/> <target description="copy Eclipse compiler jars to ant lib directory" name="init-eclipse-compiler"> <copy todir="${ant.library.dir}"> <fileset dir="${ECLIPSE_HOME}/plugins" includes="org.eclipse.jdt.core_*.jar"/> </copy> <unzip dest="${ant.library.dir}"> <patternset includes="jdtCompilerAdapter.jar"/> <fileset dir="${ECLIPSE_HOME}/plugins" includes="org.eclipse.jdt.core_*.jar"/> </unzip> </target> <target description="compile project with Eclipse compiler" name="build-eclipse-compiler"> <property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/> <antcall target="build"/> </target> <target name="CERFA extraction elections pro"> <java classname="netsur2.MegaImporter" failonerror="true" fork="yes"> <classpath refid="CERFAextraction.classpath"/> </java> </target> </project>
Partager