This chapter uses the Maven Hibernate3 Plug-in from the Mojo project hosted by Codehaus. Mojo was created to provide a place outside of the Apache Software Foundation (ASF) for people to develop Maven plug-ins. Codehaus doesn’t have as many rules as the ASF; it is easier for someone interested in a few plug-ins to start contributing to Mojo than it would be if all of these Maven plug-ins were hosted within the Maven project at the ASF. Another reason for hosting Mojo at Codehaus is that some Maven plug-ins use technologies with licenses that are not compatible with the Apache Software License. A plug-in at Mojo can depend on a GPL dependency, and can itself be released under a non-Apache Software License. In the Apache Software Foundation, everything needs to be released under the Apache Software License.
To use the Maven Hibernate3 plug-in, all you need to do is to include the plug-in element from Example 12-7 in your project’s pom.xml.
Example 12-7. Using the Maven Hibernate3 plug-in
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> ...pom content skipped... <build> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>hibernate3-maven-plugin</artifactId> <version>2.0</version> </plugin> </plugins> </build> ...pom content skipped... </project>
The Hibernate3 plug-in defines the following ...