Hey all,

Now that there's versions of enforcer/javadoc and co that work with java 9, and 
error-prone now seems to work with java 9 - my builds have gotten as far as 
running jdeps, which appears to not like java 9 at all :(

```
.smxemail.tiles.enforcements:3.0.70::default of goal 
org.apache.maven.plugins:maven-jdeps-plugin:3.0.0:jdkinternals failed: An API 
incompatibility was encountered while executing 
org.apache.maven.plugins:maven-jdeps-plugin:3.0.0:jdkinternals: 
java.lang.ExceptionInInitializerError: null
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>org.apache.maven.plugins:maven-jdeps-plugin:3.0.0
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = 
file:/Users/amrk/.m2/repository/org/apache/maven/plugins/maven-jdeps-plugin/3.0.0/maven-jdeps-plugin-3.0.0.jar
[ERROR] urls[1] = 
file:/Users/amrk/.m2/repository/org/sonatype/sisu/sisu-inject-bean/1.4.2/sisu-inject-bean-1.4.2.jar
[ERROR] urls[2] = 
file:/Users/amrk/.m2/repository/org/sonatype/sisu/sisu-guice/2.1.7/sisu-guice-2.1.7-noaop.jar
[ERROR] urls[3] = 
file:/Users/amrk/.m2/repository/org/apache/maven/maven-aether-provider/3.0/maven-aether-provider-3.0.jar
[ERROR] urls[4] = 
file:/Users/amrk/.m2/repository/org/sonatype/aether/aether-util/1.7/aether-util-1.7.jar
[ERROR] urls[5] = 
file:/Users/amrk/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.14/plexus-interpolation-1.14.jar
[ERROR] urls[6] = 
file:/Users/amrk/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
[ERROR] urls[7] = 
file:/Users/amrk/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
[ERROR] urls[8] = 
file:/Users/amrk/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
[ERROR] urls[9] = 
file:/Users/amrk/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.21/plexus-utils-3.0.21.jar
[ERROR] urls[10] = 
file:/Users/amrk/.m2/repository/commons-lang/commons-lang/2.4/commons-lang-2.4.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm 
ClassRealm[project>com.smxemail:com.smxemail.api:21.0.4-SNAPSHOT, parent: 
ClassRealm[maven.api, parent: null]]]
[ERROR]
[ERROR] -----------------------------------------------------
[ERROR] : begin 0, end 3, length 1
```

Running with `-e` yields:

```
Caused by: org.apache.maven.plugin.PluginContainerException: An API 
incompatibility was encountered while executing 
org.apache.maven.plugins:maven-jdeps-plugin:3.0.0:jdkinternals: 
java.lang.ExceptionInInitializerError: null
-----------------------------------------------------
realm =    plugin>org.apache.maven.plugins:maven-jdeps-plugin:3.0.0
strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
urls[0] = 
file:/Users/amrk/.m2/repository/org/apache/maven/plugins/maven-jdeps-plugin/3.0.0/maven-jdeps-plugin-3.0.0.jar
urls[1] = 
file:/Users/amrk/.m2/repository/org/sonatype/sisu/sisu-inject-bean/1.4.2/sisu-inject-bean-1.4.2.jar
urls[2] = 
file:/Users/amrk/.m2/repository/org/sonatype/sisu/sisu-guice/2.1.7/sisu-guice-2.1.7-noaop.jar
urls[3] = 
file:/Users/amrk/.m2/repository/org/apache/maven/maven-aether-provider/3.0/maven-aether-provider-3.0.jar
urls[4] = 
file:/Users/amrk/.m2/repository/org/sonatype/aether/aether-util/1.7/aether-util-1.7.jar
urls[5] = 
file:/Users/amrk/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.14/plexus-interpolation-1.14.jar
urls[6] = 
file:/Users/amrk/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
urls[7] = 
file:/Users/amrk/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
urls[8] = 
file:/Users/amrk/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
urls[9] = 
file:/Users/amrk/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.21/plexus-utils-3.0.21.jar
urls[10] = 
file:/Users/amrk/.m2/repository/commons-lang/commons-lang/2.4/commons-lang-2.4.jar
Number of foreign imports: 1
import: Entry[import  from realm 
ClassRealm[project>com.smxemail:com.smxemail.api:21.0.4-SNAPSHOT, parent: 
ClassRealm[maven.api, parent: null]]]

-----------------------------------------------------

        at 
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:181)
        ... 21 more
Caused by: java.lang.ExceptionInInitializerError
        at 
org.apache.maven.plugin.jdeps.AbstractJDepsMojo.getJDepsExecutable(AbstractJDepsMojo.java:359)
        at 
org.apache.maven.plugin.jdeps.AbstractJDepsMojo.execute(AbstractJDepsMojo.java:196)
        at 
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
        ... 21 more
Caused by: java.lang.StringIndexOutOfBoundsException: begin 0, end 3, length 1
        at java.base/java.lang.String.checkBoundsBeginEnd(String.java:3116)
        at java.base/java.lang.String.substring(String.java:1885)
        at 
org.apache.commons.lang.SystemUtils.getJavaVersionAsFloat(SystemUtils.java:1133)
        at org.apache.commons.lang.SystemUtils.<clinit>(SystemUtils.java:818)
        ... 24 more
```

Looks like the version comparison is biting this plugin as well. What was the 
solution to this in the other plugins? An alternate means of comparing/getting 
the java version?

Mark




---
"The ease with which a change can be implemented has no relevance at all to 
whether it is the right change for the (Java) Platform for all time." &mdash; 
Mark Reinhold.

Mark Derricutt
http://www.theoryinpractice.net
http://www.chaliceofblood.net
http://plus.google.com/+MarkDerricutt
http://twitter.com/talios
http://facebook.com/mderricutt

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to