Some brief examples on how to use this plugin.
If you need to perform object management and configuration tasks in a multi-module build, just configure the JOMC Plugin in your parent pom.xml for performing the various tasks in theire corresponding phases.
<project> ... <build> <plugins> ... <plugin> <groupId>org.jomc</groupId> <artifactId>maven-jomc-plugin</artifactId> <version>1.6</version> <executions> <execution> <id>default-main</id> <goals> <goal>attach-main-module</goal> <goal>manage-main-sources</goal> <goal>commit-main-classes</goal> <goal>validate-main-classes</goal> </goals> </execution> <execution> <id>default-test</id> <goals> <goal>attach-test-module</goal> <goal>manage-test-sources</goal> <goal>commit-test-classes</goal> <goal>validate-test-classes</goal> <goal>validate-test-model</goal> </goals> </execution> </executions> </plugin> ... </plugins> </build> ... </project>
If your classes should be backed by Java resource bundles instead, just add two additional goals and specify a different template profile.
<project> ... <build> <plugins> ... <plugin> <groupId>org.jomc</groupId> <artifactId>maven-jomc-plugin</artifactId> <version>1.6</version> <executions> <execution> <id>default-main</id> <goals> <goal>attach-main-module</goal> <goal>write-main-resources</goal> <goal>manage-main-sources</goal> <goal>commit-main-classes</goal> <goal>validate-main-classes</goal> </goals> <configuration> <templateProfile>jomc-java-bundles</templateProfile> </configuration> </execution> <execution> <id>default-test</id> <goals> <goal>attach-test-module</goal> <goal>write-test-resources</goal> <goal>manage-test-sources</goal> <goal>commit-test-classes</goal> <goal>validate-test-classes</goal> <goal>validate-test-model</goal> </goals> <configuration> <templateProfile>jomc-java-bundles</templateProfile> </configuration> </execution> </executions> </plugin> ... </plugins> </build> ... </project>
mvn ... -Dmaven.test.skip=true -Djomc.classProcessing=false
For full documentation, please see the respective goal documentation.