Andre Tadeu de Carvalho created MJDEPS-20:
---------------------------------------------
Summary: jdeps for modularized code should use --module-path
Key: MJDEPS-20
URL: https://issues.apache.org/jira/browse/MJDEPS-20
Project: Maven JDeps Plugin
Issue Type: Bug
Affects Versions: 3.1.2
Reporter: Andre Tadeu de Carvalho
In the attempt to solve https://issues.apache.org/jira/browse/MJDEPS-16, I
discover that the plugin is not settings *--module-path* when the code is
modularized. It also need to set the target to
_target/classes/module-info.class_ instead _target/classes_.
As an example in [https://github.com/andretadeu/maven-jdeps-plugin.git,] branch
MJDEPS-16, running the test *MJDEPS-16_jdkinternals*:
{code}
jdeps --module-path <local
repo>/com/google/inject/guice/4.2.0/guice-4.2.0.jar:<local
repo>/javax/inject/javax.inject/1/javax.inject-1.jar:<local
repo>/aopalliance/aopalliance/1.0/aopalliance-1.0.jar:<local
repo>/com/google/guava/guava/25.1-jre/guava-25.1-jre.jar:<local
repo>/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar:<local
repo>/org/checkerframework/checker-qual/2.0.0/checker-qual-2.0.0.jar:<local
repo>/com/google/errorprone/error_prone_annotations/2.1.3/error_prone_annotations-2.1.3.jar:<local
repo>/com/google/j2objc/j2objc-annotations/1.1/j2objc-annotations-1.1.jar:<local
repo>/org/codehaus/mojo/animal-sniffer-annotations/1.14/animal-sniffer-annotations-1.14.jar
-jdkinternals <Project
root>/target/it/MJDEPS-16_jdkinternals/target/classes/module-info.class
{code}
should return:
{code:java}
com.google.common automatic
[file:///home/andre/workspaces/oss/maven-jdeps-plugin/target/local-repo/com/google/guava/guava/25.1-jre/guava-25.1-jre.jar]
requires mandated java.base
com.google.common -> jdk.unsupported
com.google.common.cache.Striped64 -> sun.misc.Unsafe JDK internal API
(jdk.unsupported)
com.google.common.cache.Striped64$1 -> sun.misc.Unsafe JDK internal API
(jdk.unsupported)
com.google.common.cache.Striped64$Cell -> sun.misc.Unsafe JDK internal API
(jdk.unsupported)
com.google.common.hash.LittleEndianByteArray$UnsafeByteArray -> sun.misc.Unsafe
JDK internal API (jdk.unsupported)
com.google.common.hash.LittleEndianByteArray$UnsafeByteArray$1 ->
sun.misc.Unsafe JDK internal API (jdk.unsupported)
com.google.common.hash.LittleEndianByteArray$UnsafeByteArray$2 ->
sun.misc.Unsafe JDK internal API (jdk.unsupported)
com.google.common.hash.LittleEndianByteArray$UnsafeByteArray$3 ->
sun.misc.Unsafe JDK internal API (jdk.unsupported)
com.google.common.hash.Striped64 -> sun.misc.Unsafe JDK internal API
(jdk.unsupported)
com.google.common.hash.Striped64$1 -> sun.misc.Unsafe JDK internal API
(jdk.unsupported)
com.google.common.hash.Striped64$Cell -> sun.misc.Unsafe JDK internal API
(jdk.unsupported)
com.google.common.primitives.UnsignedBytes$LexicographicalComparatorHolder$UnsafeComparator
-> sun.misc.Unsafe JDK internal API (jdk.unsupported)
com.google.common.primitives.UnsignedBytes$LexicographicalComparatorHolder$UnsafeComparator$1
-> sun.misc.Unsafe JDK internal API (jdk.unsupported)
com.google.common.util.concurrent.AbstractFuture$UnsafeAtomicHelper ->
sun.misc.Unsafe JDK internal API (jdk.unsupported)
com.google.common.util.concurrent.AbstractFuture$UnsafeAtomicHelper$1 ->
sun.misc.Unsafe JDK internal API (jdk.unsupported)
Warning: JDK internal APIs are unsupported and private to JDK implementation
that are
subject to be removed or changed incompatibly and could break your application.
Please modify your code to eliminate dependence on any JDK internal APIs.
For the most recent update on JDK internal API replacements, please check:
https://wiki.openjdk.java.net/display/JDK8/Java+Dependency+Analysis+Tool
JDK Internal API Suggested Replacement
---------------- ---------------------
sun.misc.Unsafe See http://openjdk.java.net/jeps/260
{code}
If the code is not modularized, it should keep using *-cp* instead of
*--module-path* and it will point to _target/classes**_. If jdeps command is
using *--module-path*, it should point to *module-info.class*, or the command
won't return a single line.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)