mojohaus / nbm-maven-plugin

moved to https://github.com/apache/incubator-netbeans-mavenutils/
http://www.mojohaus.org/nbm-maven-plugin/
24 stars 19 forks source link

Plugin fails when running under Java 9 #24

Open jasondlee opened 7 years ago

jasondlee commented 7 years ago

If I create a new RCP application, make no changes, and run the build, I get this (cleaned up a bit):

$ mvn -e -X clean install
...
Number of foreign imports: 1
import: Entry[import  from realm ClassRealm[maven.api, parent: null]]

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

        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:181)
        ... 21 more
Caused by: java.lang.ExceptionInInitializerError
        at org.codehaus.mojo.nbm.BrandingMojo.execute(BrandingMojo.java:170)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
        ... 21 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
        at org.codehaus.plexus.archiver.zip.AbstractZipArchiver.<clinit>(AbstractZipArchiver.java:123)
        ... 23 more
mkleint commented 7 years ago

do you have some kind of more complete stacktrace? from a quick glance it looks like an issue with maven itself or some maven lib the branding goal is using.

ebarboni commented 7 years ago

@jasondlee are you using the last version of the plugin ?

jasondlee commented 7 years ago

As best as I can tell:

                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>nbm-maven-plugin</artifactId>
                    <version>4.1</version>
                    <extensions>true</extensions>
                    <configuration>
                        <brandingToken>${brandingToken}</brandingToken>
                        <cluster>${brandingToken}</cluster>
                        <useOSGiDependencies>true</useOSGiDependencies>
                    </configuration>
                </plugin>
jasondlee commented 7 years ago

That's the most complete stack trace I've been able to dig out of Maven. I'm at the office at the moment and don't have access to that workspace at the moment, but I can try to wrangle more details out of Maven this evening.

jasondlee commented 7 years ago

This is the log file from mvn -X clean install. Is there a way to get more information from Maven?

mvn.log.txt

mkleint commented 7 years ago

http://stackoverflow.com/questions/36583118/is-maven-ready-for-jdk9 is likely related (http://stackoverflow.com/a/36605759/228145)