Validating a project's main model

If you need to validate a project's main model, just add the validate-main-model goal to the pom.xml.

<project>
  ...
  <build>
    <plugins>
      ...
      <plugin>
        <groupId>org.jomc</groupId>
        <artifactId>maven-jomc-plugin</artifactId>
        <version>1.6.2</version>
        <executions>
          <execution>
            <id>default-main</id>
            <goals>
              <goal>validate-main-model</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      ...
    </plugins>
  </build>
  ...
</project>

Validating a project's test model

If you need to validate a project's test model, just add the validate-test-model goal to the pom.xml.

<project>
  ...
  <build>
    <plugins>
      ...
      <plugin>
        <groupId>org.jomc</groupId>
        <artifactId>maven-jomc-plugin</artifactId>
        <version>1.6.2</version>
        <executions>
          <execution>
            <id>default-test</id>
            <goals>
              <goal>validate-test-model</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      ...
    </plugins>
  </build>
  ...
</project>