Hi, I'm using maven 1.02 and hibernate 3. I can't jave currently any other help than from here.
I want to generate files automatically in the way as in topic.
I'm using maven-hibernate-plugin 1.4, xdoclet 1.2.3 (it should use Hibernate 3 javadocs, nut i have some problems with it - i works only after I delete the maven cache directory and only once - after that i always have:
WARNING: Plugin 'maven-xdoclet-plugin' is already loaded from maven-xdoclet-plug
in-1.2.3; attempting to load maven-xdoclet-plugin-1.2
Tag library requested that is not present: 'maven' in plugin: 'maven-xdoclet-plu
gin-1.2') and then it uses 1.2 version instead of 1.2.3.
But this is not the main issue in this topic.
Below is my maven.xml file, can u tell me if I'm doing everything ok, can I use maven 1.0.2 to reach my goal with hibernate3?, help me with it, its important that it should work with hibernate 3.x.
<project default="middlegen" xmlns:maven="jelly:maven" xmlns:j="jelly:core" xmlns:ant="jelly:ant">
========================================================= =========================================================
<goal name="hbms" prereqs="hibernate:copy,xdoclet:hibernatedoclet">
</goal>
<goal name="middlegen" >
<attainGoal name="middlegen:run"/>
</goal>
<postGoal name="hbms">
<echo>Compile set:${tag1.name}</echo>
</postGoal>
======================================================== =========================================================
<preGoal name="xdoclet:hibernatedoclet">
<delete quiet="true">
<ant:fileset dir="${maven.xdoclet.hibernatedoclet.destDir}" includes="**/*.hbm.xml"/>
</delete>
</preGoal>
========================================================= =========================================================
<goal name="hibernate:copy">
<echo>deleting...</echo>
<delete quiet="true">
<ant:fileset dir="java" includes="**"/>
</delete>
<echo>copying...</echo>
<copy todir="java" filtering="false">
<fileset dir="source/src/">
<include name="**/*.java"/>
</fileset>
</copy>
</goal>
========================================================= =========================================================
<goal name="initdb" prereqs="java:compile, java:jar-resources">
<echo>Starting goal initdb ${maven.hibernate.input.dir}...</echo>
<dependset>
<srcfileset dir="./resources" includes="*.properties"/>
<srcfileset dir="./resources" includes="*.hbm.xml"/>
<targetfileset dir="target">
<include name="**/*.properties"/>
<include name="**/*.hbm.xml"/>
</targetfileset>
</dependset>
<echo>Filtering resources to ${filtered.resources}</echo>
<copy todir="${maven.build.dest}" filtering="true">
<fileset dir="./resources">
<include name="hibernate.properties"/>
</fileset>
<fileset dir="./resources">
<include name="**/*.hbm.xml"/>
</fileset>
</copy>
<attainGoal name="hibernate:schema-export"/>
</goal>
</project>
|