-1

I use the plugin version 3.0

<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>hibernate3-maven-plugin</artifactId>
    <version>3.0</version>
</plugin>

I don't know which dependencies are needed, which version of hibernate-tools I must add? Do I need to add hibernate-core too?

Thanks for helping.

Mouna
  • 3,221
  • 3
  • 27
  • 38

1 Answers1

0

The website says that the simplest plugin definition is this:

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>hibernate3-maven-plugin</artifactId>
<version>@pom.version@</version>
<configuration>
    <hibernatetool>
        <jpaconfiguration/>
    </hibernatetool>
</configuration>
</plugin>

Where @pom.version@ should be the latest plugin version. You won't need any other dependencies, that's what maven is for. Each plugin loads its own dependencies via the maven dependency mechanism.

Software Engineer
  • 15,457
  • 7
  • 74
  • 102
  • But if I do not add `hibernate-tools` I have this error:` There was an error creating the AntRun task. An Ant BuildException has occured: java.lang.NoClassDefFoundError: org/hibernate/cfg/Configuration: org.hibernate.cfg.Configuration` – Mouna May 13 '14 at 14:22
  • Can you achieve your goals without AntRun? It would be better if you could -- AntRun steps outside the maven model and often results in an non-portable, non-repeatable build. – Software Engineer May 13 '14 at 14:55
  • And, shouldn't that be part of the question? – Software Engineer May 13 '14 at 14:55
  • And, finally, you're reporting a problem with antrun, not with your plugin dependency. – Software Engineer May 13 '14 at 14:57
  • I followed the [example](http://mojo.codehaus.org/hibernate3-maven-plugin/examples/run-multiple-goals.html) in the website. I want to do reverse engineering using hibernate-tools. – Mouna May 13 '14 at 15:19