Maven jdeps plugin

Runs the jdeps dependency analysis tool.

License

License

MIT
Categories

Categories

Maven Build Tools
GroupId

GroupId

com.github.marschall
ArtifactId

ArtifactId

jdeps-maven-plugin
Last Version

Last Version

0.5.1
Release Date

Release Date

Type

Type

maven-plugin
Description

Description

Maven jdeps plugin
Runs the jdeps dependency analysis tool.
Project URL

Project URL

https://github.com/marschall/jdeps-maven-plugin/
Source Code Management

Source Code Management

https://github.com/marschall/jdeps-maven-plugin/

Download jdeps-maven-plugin

How to add to project

<plugin>
    <groupId>com.github.marschall</groupId>
    <artifactId>jdeps-maven-plugin</artifactId>
    <version>0.5.1</version>
</plugin>

Dependencies

compile (5)

Group / Artifact Type Version
org.apache.maven : maven-plugin-api jar 3.5.4
org.apache.maven : maven-core jar 3.5.4
org.apache.commons : commons-lang3 jar 3.8.1
org.codehaus.plexus : plexus-utils jar 3.1.0
org.apache.maven.reporting : maven-reporting-impl jar 3.0.0

provided (2)

Group / Artifact Type Version
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.3
org.apache.maven.reporting : maven-reporting-api jar 3.0

Project Modules

There are no modules declared in this project.

Maven jdeps Plugin Build Status

Maven plugin that runs the Java 8 jdeps tool.

For more information check out the generated plugin page and the jdeps documentation.

Usage

  <build>
    <plugins>
      <plugin>
        <groupId>com.github.marschall</groupId>
        <artifactId>jdeps-maven-plugin</artifactId>
        <version>0.5.1</version>
        <!-- optionally any configuration -->
        <configuration>
          <profile>true</profile>
        </configuration>
      </plugin>
    </plugins>
  </build>

Then you can run it with:

mvn jdeps:jdeps

A sample output will look like this:

   com.github.marschall.memoryfilesystem (classes)
      -> java.io                                            compact1
      -> java.lang                                          compact1
      -> java.lang.reflect                                  compact1
      -> java.net                                           compact1
      -> java.nio                                           compact1
      -> java.nio.channels                                  compact1
      -> java.nio.file                                      compact1
      -> java.nio.file.attribute                            compact1
      -> java.nio.file.spi                                  compact1
      -> java.text                                          compact1
      -> java.util                                          compact1
      -> java.util.concurrent                               compact1
      -> java.util.concurrent.atomic                        compact1
      -> java.util.concurrent.locks                         compact1
      -> java.util.regex                                    compact1
      -> javax.annotation                                   Full JRE

Alternatively you can run the plugin as a reporting plugin. target/site/jdeps-report.html

  <reporting>
    <plugins>
      <plugin>
        <groupId>com.github.marschall</groupId>
        <artifactId>jdeps-maven-plugin</artifactId>
        <version>0.5.1</version>
        <!-- optionally any configuration -->
        <configuration>
          <profile>true</profile>
        </configuration>
      </plugin>
    </plugins>
  </reporting>

Options

Early versions of jdeps may not support all options.

summary                 Print dependency summary only
verbose                 Print additional information
verbose-level=<level>   Print package-level or class-level dependencies
                        Valid levels are: "package" and "class"
package=<pkg name>      Restrict analysis to classes in this package
                        (may be given multiple times)
regex=<regex>           Restrict analysis to packages matching pattern
                        (package and regex are exclusive)
filter=<regex>          Filter dependences matching the given pattern
filter:package          Filter dependences within the same package (default)
filter:archive          Filter dependences within the same archive
filter:none             No -filter:package and -filter:archive filtering
                        Filtering specified via the -filter option still applies.
profile                 Show profile or the file containing a package
recursive               Recursively traverse all dependencies
version                 Version information
jdkinternals            Finds class-level dependences in JDK internal
                        APIs. By default, it analyzes all classes
                        specified in the -classpath option and in input
                        files unless you specified the include option.
                        You cannot use this option with the package,
                        regex, and summary options.
dotOutputDirectory      Destination directory for DOT file output.
                        Default ${project.reporting.outputDirectory}/jdeps
include                 Restricts analysis to classes matching pattern.
apionly                 Restricts analysis to APIs.

Building

You need to have a ~/.m2/toolchains.xml that contains a JDK 1.7 link.

Versions

Version
0.5.1
0.5.0
0.4.2
0.4.1
0.4.0
0.3.1
0.2.2
0.2.1
0.2.0
0.1.2