Apache

Docs Plugins

JDeps Plugin 3.2.0 · Other versions

The JDeps Plugin uses the jdeps tool to analyze classes for internal API calls.

Source
Edit this page
Wrong?
Report a problem

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.2.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.