Usage

The JDeps Plugin verifies classes using the jdeps tool. The following examples describe the basic usage of the Plugin.

Verify Classes As Part Of The Build

To verify the classes as part of build, you should add the JDeps Plugin in the <build> section of your pom:

<project>
  ...
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jdeps-plugin</artifactId>
        <version>3.1.0</version>
        <executions>
          <execution>
            <goals>
              <goal>jdkinternals</goal> <!-- verify main classes -->
              <goal>test-jdkinternals</goal> <!-- verify test classes -->
            </goals>
          </execution>
        </executions>
        <configuration>
          ...
        </configuration>
      </plugin>
    </plugins>
    ...
  </build>
  ...
</project>

If there is any usage detected of an internal API, the build will stop and fail.