facebook

Xdoclet/hibernate generation not resulting in *.hbm.xml

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #269695 Reply

    deltadad2000
    Member

    I 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.

    #269702 Reply

    Loyal Water
    Member

    Have 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

    #269709 Reply

    deltadad2000
    Member

    I 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 seconds

    But I get no *.hbm.xml files.

    MyEclipse Enterprise Workbench

    Version: 5.1.1 GA
    Build id: 20070302-5.1.1-GA

    #269714 Reply

    deltadad2000
    Member

    Also, 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

    #269730 Reply

    deltadad2000
    Member

    This 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

    #269745 Reply

    deltadad2000
    Member

    OK, 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>

    #269746 Reply

    Loyal Water
    Member

    Glad to know you figured out the fix for this problem !!!

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: Xdoclet/hibernate generation not resulting in *.hbm.xml

You must be logged in to post in the forum log in