-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Full path sql->hbm->java and java->hbm->sql. Mav
PostPosted: Tue Dec 26, 2006 6:50 pm 
Beginner
Beginner

Joined: Tue Nov 22, 2005 6:55 am
Posts: 41
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>


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 27, 2006 6:14 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
sorry - can't help on that topic. Trivial to do in ant though ;)

_________________
Max
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.