- This topic has 6 replies, 2 voices, and was last updated 17 years, 6 months ago by Loyal Water.
-
AuthorPosts
-
deltadad2000MemberI created a J2EE web project which uses hibernate annotations in a few classes.
We have previously been building with ANT and I want to get MyEclipse to remove most of our ANT usage.I followed the tutorial for Xdoclet and defined the Xdoclet Standard Hibernate Configurations
Everything seems to run ok but I dont have any resulting *.hbm.xml files as I would expect.I tried turning on the Verbose setting and this does nothing.
I tried setting the Hibernate destdir and that does nothing
I am specifying a hibernatedoclet fileset src for each directory where the hibernate source files are. I’m doing this because we have lots of .java files and few use hibernate.So should I expect *.hbm.xml files to be generated after MyEclipse -> Run Xdoclet and where should they be?
They are not anywhere under the Project folder and when I deploy they are not anywhere under the webapps/Application folder.
Loyal WaterMemberHave you tried refreshing the project? These files are created out-of-process so it’s possible it’s just not refreshing and thats why you are not seeing them
deltadad2000MemberI did a search on the Project directory from Windows Explorer (and dos prompt) on *.hbm.xml /s, nothing.
This is the console output from the Xdoclet generation.
Buildfile: C:\ecommerce_suite\main\Suite\Projects\PIM2\.xdoclet-build.tmp.xml
N65540:
[hibernatedoclet] (XDocletMain.start 47 ) Running <hibernate/>
_xdoclet_generation_:
BUILD SUCCESSFUL
Total time: 8 secondsBut I get no *.hbm.xml files.
MyEclipse Enterprise Workbench
Version: 5.1.1 GA
Build id: 20070302-5.1.1-GA
deltadad2000MemberAlso, did anyone unit test placing the hibernatedoclet fileset dir property having more of a path than just src? I’m currently using something like src/com/a/b/c/d into where the files are then using includes on *.java
deltadad2000MemberThis is the verbose output from a copy of the build.xml that is generated by the xdoclet task (still no output)
Apache Ant version 1.6.5 compiled on June 2 2005
Buildfile: build.xml
Detected Java version: 1.5 in: C:\jdk1.5.0_06\jre
Detected OS: Windows XP
parsing buildfile C:\ecommerce_suite\main\Suite\Projects\PIM2\build.xml with URI = file:///C:/ecommerce_suite/main/Suite/Projects/PIM2/build.xml
Project base dir set to: C:\ecommerce_suite\main\Suite\Projects\PIM2
[property] Loading C:\ecommerce_suite\main\Suite\Projects\PIM2\xdoclet-build.properties
[property] Unable to find property file: C:\ecommerce_suite\main\Suite\Projects\PIM2\xdoclet-build.properties
Build sequence for target(s) `_xdoclet_generation_’ is [N65540, _xdoclet_generation_]
Complete build sequence is [N65540, _xdoclet_generation_, ]N65540:
Property ${TODAY} has not been set
Property ${version} has not been set
[hibernatedoclet] (XDocletMain.start 47 ) Running <hibernate/>_xdoclet_generation_:
BUILD SUCCESSFUL
Total time: 5 seconds
deltadad2000MemberOK, I figured this out based on http://osdir.com/ml/java.xdoclet.user/2003-03/msg00437.html
Hibernate includes spec must be specified relative to the fileset dir.
In my case the resulting build.xml MUST be set as:
<target name=”N65540″ description=”Standard Hibernate”>
<taskdef name=”hibernatedoclet” classname=”xdoclet.modules.hibernate.HibernateDocletTask” classpathref=”xdoclet.classpath”/>
<hibernatedoclet
destDir=’C:/ecommerce_suite/main/Suite/Projects/PIM2/src’
excludedTags=’@version,@author,@todo,@see’
force=’true’
verbose=’true’>
<fileset dir=’C:/ecommerce_suite/main/Suite/Projects/PIM2/src’ includes=”com/gxs/catalog/foundation/*.java” />
<hibernate version=’3.0’/>
</hibernatedoclet>
</target>
Loyal WaterMemberGlad to know you figured out the fix for this problem !!!
-
AuthorPosts