Maven : XDoclet Maven plugin

This page last changed on Feb 17, 2006 by Kees de Kooter

Code generation using XDoclet version 1.0 with Maven uses basically the same syntax as ant does. Add the following plugin to the pom:

<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>xdoclet-maven-plugin</artifactId>
  <executions>
     <execution>
        <phase>generate-sources</phase>
        <goals>
          <goal>xdoclet</goal>
        </goals>
        <configuration>
          <tasks>
             <hibernatedoclet verbose="true" force="false" 
                    destDir="${project.build.outputDirectory}" 
                    excludedTags="@version,@author,@todo,@param,@return,@see">
                <fileset dir="${basedir}/src/main/java">
                  <include name="**/model/*.java"></include>
                </fileset>
                <hibernate version="3.0"></hibernate>
             </hibernatedoclet>
             <springdoclet verbose="true" force="false" 
                    destDir="${project.build.outputDirectory}" 
                    excludedTags="@version,@author,@todo,@param,@return,@see">
                <fileset dir="${basedir}/src/main/java">
                  <include name="**/*.java"></include>
                </fileset>
                <springxml defaultLazyInit="false" 
                    destinationFile="generatedApplicationContext.xml"></springxml>
             </springdoclet>
          </tasks>
        </configuration>
     </execution>
  </executions>
</plugin>