Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6661805
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:19:23+00:00 2026-05-26T02:19:23+00:00

I am trying to generate hbm files using ant task with maven, however it’s

  • 0

I am trying to generate hbm files using ant task with maven, however it’s running into issues related to classpath. (I am doing this to migrate the project from ant to maven and do not want to change the way hibernate works in the first step). If someone knows a better way to handle this, that would also be helpful. My pom.xml looks like

            <artifactId>maven-antrun-plugin</artifactId>
            <version>1.6</version>
            <dependencies>
                <dependency>
                    <groupId>org.apache.ant</groupId>
                    <artifactId>ant-nodeps</artifactId>
                    <version>1.8.1</version>
                </dependency>
                <dependency>
                    <groupId>xdoclet</groupId>
                    <artifactId>xdoclet-hibernate-module</artifactId>
                    <version>1.2.3</version>
                </dependency>
                <dependency>
                    <groupId>xjavadoc</groupId>
                    <artifactId>xjavadoc</artifactId>
                    <version>1.1</version>
                </dependency>
                <dependency>
                    <groupId>xdoclet</groupId>
                    <artifactId>xdoclet-xdoclet-module</artifactId>
                    <version>1.2.3</version>
                </dependency>
                <dependency>
                    <groupId>org.codehaus.xdoclet</groupId>
                    <artifactId>xdoclet</artifactId>
                    <version>2.0.7</version>
                </dependency>
                <dependency>
                    <groupId>commons-collections</groupId>
                    <artifactId>commons-collections</artifactId>
                    <version>20040616</version>
                </dependency>
                <dependency>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                    <version>1.1.1</version>
                </dependency>
            </dependencies>
            <executions>
                <execution>
                    <phase> generate-sources</phase>
                    <configuration>
                        <target name="generate-hibernate" unless="hibernatedoclet.unnecessary">
                            <echo level="info">generating hibernate files</echo>
                            <taskdef name="hibernatedoclet"
                                classname="xdoclet.modules.hibernate.HibernateDocletTask"
                                classpathref="maven.plugin.classpath" />
                            <hibernatedoclet destdir="${project.build.directory}"
                                force="ture" verbose="true">
                                <fileset id="hbm" dir="${basedir}/src/main/java">
                                    <include name="**/model/*.java" />
                                </fileset>
                                <hibernate version="3.0" />
                            </hibernatedoclet>
                        </target>
                    </configuration>
                    <goals>
                        <goal>run</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>

The exception that I am getting is

   Can't create a hibernate element under hibernatedoclet. Make sure the jar file containing    the corresponding subtask class is on the classpath specified in the <taskdef> that defined {2}.
    at xdoclet.DocletTask.createDynamicElement(DocletTask.java:343)
    at org.apache.tools.ant.IntrospectionHelper.createDynamicElement(IntrospectionHelper.java:57
    at org.apache.tools.ant.IntrospectionHelper.getNestedCreator(IntrospectionHelper.java:542)
    at org.apache.tools.ant.IntrospectionHelper.getElementCreator(IntrospectionHelper.java:637)
    at org.apache.tools.ant.UnknownElement.handleChild(UnknownElement.java:552)
    at org.apache.tools.ant.UnknownElement.handleChildren(UnknownElement.java:349)
    at org.apache.tools.ant.UnknownElement.configure(UnknownElement.java:201)
    at org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java:163)
    at org.apache.tools.ant.Task.perform(Task.java:347)
    at org.apache.tools.ant.Target.execute(Target.java:390)
    at org.apache.tools.ant.Target.performTasks(Target.java:411)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1366)
    at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:270)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T02:19:24+00:00Added an answer on May 26, 2026 at 2:19 am

    As the error says

    Can’t create a hibernate element under hibernatedoclet

    I guess you need to add hibernate to your maven ant plugin dependency.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to generate Rails API documentation, but running into errors: $ rake doc:rails rake
I'm trying to generate some stubs for a WSDL (using xmlbeans) and keep running
I'm trying to generate customized xml files from a template xml file in python.
I'm trying to generate code coverage reports with EMMA using tests of which some
I'm trying to follow this tutorial but instead of generating the expected hbm.xml files
I'm trying to generate a pdf file from data in a database using JasperReports
I'm trying to generate a request token using oauth2 in a Pyramid application for
While trying to generate a pdf using ExpertPdf.HtmlToPdf, it's using a lot of memory.
Im trying to generate a week view calendar using codeigniter's calendar library.. something like
I'm trying to generate a Java Client with the axis using wsdl2java (wrapped by

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.