Fork me on GitHub

PomChecker Maven Plugin

The PomChecker plugin provides goals to check the contents of a POM file.

The PomChecker plugin has two goals:

Checking BOM Files

You are not allowed to directly configure this plugin in a BOM file given that these files should not include the <build> element if you’re aiming for a minimal BOM. You may however apply this plugin to a parent POM file and link said parent to the BOM or invoke pomchecker:check-bom manually from the command line, such as

$ mvn org.kordamp.maven:pomchecker-maven-plugin:1.0.0:check-bom

Checking for Maven Central compliance

You may configure the plugin in your project. Taking into account that release and strict are set to true by default you may find your build might fail during development. If this is the case then we recommend using a profile to guard this plugin, for example

<project>
  [...]
  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.kordamp.maven</groupId>
            <artifactId>pomchecker-maven-plugin</artifactId>
            <version>1.0.0</version>
            <executions>
              <execution>
                <id>check-release</id>
                <goals>
                  <goal>check-maven-central</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
  [...]
</project>

You may also pass additional parameters using the checker.release and checker.strict properties when invoking the pomchecker:check-maven-central from the command line without previously applying this plugin to the POM.