I hit this same error only when building from a parent pom project (with a
DAO sibling project) and an empty local maven repository. Building from the
leaf DAO project worked each time. Building from the parent pom project
would always work the second and subsequent times once the repository was
partially loaded. I thought for a while that the issue might have been
caused by my use of profiles; hibernate definitions were separate from the
schema generation. However, adding the hibernate jars and the one that it
actually complained about did not work. The error originally occurred when I
had version=2.0 and changing to version=2.2 had no impact.
The final fix was to add extensions=true to the plugin declaration.
<artifactId>hibernate3-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<version>2.2</version>
<extensions>true</extensions>
Reading the pom.xml documentation, I am assuming this is opening the plugin
to a more broadly defined classpath. Although this allows it to work the
first and every time. The extension=true does not seem like it should have
been necessary if it works the second and subsequent times.
--
View this message in context:
http://www.nabble.com/hibernate3-maven-plugin-error-%28A-required-class-is-missing%29-tp24948875p25332494.html
Sent from the mojo - user mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email