[ hibernatetool ] Problème d'execution
Bonjour,
Nous avons créé un build.xml que l'on execute sans problème sous Eclipse. Nous aimerions l'executer en ligne de commande mais sans succès :?
Voici le contenu :
Code:
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
|
<project name="testcase" >
<path id="toolslib">
<path location="./lib/hibernate-tools.jar" />
<path location="./lib/commons-collections-2.1.1.jar" />
<path location="./lib/hibernate3.jar" />
<path location="./lib/cglib-2.1.3.jar" />
<path location="./lib/dom4j-1.6.jar" />
<path location="./lib/commons-logging-1.0.4.jar" />
<path location="./lib/freemarker.jar" />
<path location="./lib/postgresql-8.1-404.jdbc3.jar" />
<path location="./lib/ojdbc14.jar" />
<path path="." />
<path path="./bin" />
</path>
<taskdef name="hibernatetool" classname="org.hibernate.tool.ant.HibernateToolTask" classpathref="toolslib" />
<hibernatetool destdir="/workspace/project-transverse/src/main/java">
<configuration configurationfile="./ant/hibernate.cfg.xml">
<fileset dir="/workspace/project-app-transverse/src/main/resources">
<include name="**/*.hbm.xml" />
</fileset>
</configuration>
<hbmtemplate template="./ant/templates/projet/Pojo.ftl" filepattern="{package-name}/{class-name}.java">
<property key="jdk5" value="true" />
<property key="ejb3" value="false" />
</hbmtemplate>
</hibernatetool>
<hibernatetool destdir="/workspace/project-app-db/src/main/resources/structure">
<configuration configurationfile="./ant/hibernate.cfg.xml">
<fileset dir="/workspace/project-app-transverse/src/main/resources">
<include name="**/*.hbm.xml" />
</fileset>
</configuration>
<hbm2ddl export="false" outputfilename="schema.ddl" format="true" />
</hibernatetool>
</project> |
Comme je le dis plus haut, lorsque je fais dans eclipse clic-droit -> Executer en tant que -> Compilation ant, il n'y a pas de problème.
En ligne de commande, j'ai d'abord tenté de l'executé tel quel mais il a fallut que je remplace la première ligne par
Code:
1 2
|
<project name="testcase" default="test"> |
Maintenant, j'ai le message suivant :
Citation:
BUILD FAILED
file:/build.xml:17: taskdef class org.hibernate.tool.ant.HibernateToolTask cannot be found
Je n'en puis plus... J'imagine qu'il ne trouve pas mon jar mais il est bien présent à l'endroit spécifié.
Merci à ceux qui auront la solution