File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Ant, Maven and Other Build Tools and the fly likes Maven and Hibernate plugin configuration Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Maven and Hibernate plugin configuration" Watch "Maven and Hibernate plugin configuration" New topic

Maven and Hibernate plugin configuration

Juan Luis Prieto

Joined: Sep 25, 2009
Posts: 15

I am having an estrange behavior when configuring in a pom file a hibernate plugin and the execution goals. I am having this estrange error:

The pom file is the following and the errors appear where I marked in comments:

Can anyone give me a hint of what the error can be?

Thank you in advance.
Peter Johnson

Joined: May 14, 2008
Posts: 5852

Looking at the documentation for the hibernate3-maven-plugin:hbm2cfgxml goal, I see this:

Invokes the execution of the lifecycle phase generate-resources prior to executing itself.

I think that setting hbm2cfgxml to run at the generate-resources causes a possible infinite loop and perhaps that is what Maven is complaining about.

I see in the docs that the hbm2java goal runs during the generate-sources phase by default. Try removing the phases from the goals that have default phases.

Try using different execution ids, perhaps those are causing a conflict with the default ids.

Also, try running with the -X option. At the start of the output there will be a build plan report that identifies all of the plugin goals that will run and what their settings are, perhaps that might give a clue.

Finally, which version of Maven are you running?

JBoss In Action
I agree. Here's the link:
subject: Maven and Hibernate plugin configuration
It's not a secret anymore!