使用以下最小值探索maven-jdeps-plugin:3.1.0
Java9 pom.xml
:-
<dependencies>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.9.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>1.9</source>
<target>1.9</target>
</configuration>
</plugin>
<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>
</plugin>
</plugins>
</build>
执行时
mvn install
我最终得到一个详细的错误,内容如下: -
[INFO] Error: log4j-api-2.9.0.jar is a multi-release jar file but --multi-release option is not set [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 3.389 s [INFO] Finished at: ... [INFO] Final Memory: 12M/41M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-jdeps-plugin:3.1.0:jdkinternals (default) on project maven-jigsaw: [ERROR] Exit code: 2 [ERROR] Command line was: /bin/sh -c '/Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home/bin/jdeps' '-cp' '.../.m2/repository/org/apache/logging/log4j/log4j-api/2.9.0/log4j-api-2.9.0.jar' '../maven/target/classes'
在 Maven 官方网站上详述的任何一个目标中,甚至在Oracle 帮助中心记录的工具中,我都找不到与--multi-release
标志相关的太多相关性。jdeps:jdkinternals
jdeps
有人可以对这个实现有所了解maven-jdeps-plugin
吗?有没有办法解决这个问题(设置--multi-release
选项)?