If you need to validate a project's main classpath, just add the validate-main-classpath goal to the pom.xml.
<project> ... <build> <plugins> ... <plugin> <groupId>org.jomc</groupId> <artifactId>maven-jomc-plugin</artifactId> <version>1.8</version> <executions> <execution> <id>default-main</id> <goals> <goal>validate-main-classpath</goal> </goals> </execution> </executions> </plugin> ... </plugins> </build> ... </project>
If you need to validate a project's test classpath, just add the validate-test-classpath goal to the pom.xml.
<project> ... <build> <plugins> ... <plugin> <groupId>org.jomc</groupId> <artifactId>maven-jomc-plugin</artifactId> <version>1.8</version> <executions> <execution> <id>default-test</id> <goals> <goal>validate-test-classpath</goal> </goals> </execution> </executions> </plugin> ... </plugins> </build> ... </project>