Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: build
    • Labels:
      None
    • Environment:

      OpenJDK 9-ea+149

      Description

      mvn install -DskipTests fails.

      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.4:war (default-war) on project hadoop-auth-examples: Execution default-war of goal org.apache.maven.plugins:maven-war-plugin:2.4:war failed: Unable to load the mojo 'war' in the plugin 'org.apache.maven.plugins:maven-war-plugin:2.4' due to an API incompatibility: org.codehaus.plexus.component.repository.exception.ComponentLookupException: null
      [ERROR] -----------------------------------------------------
      [ERROR] realm =    plugin>org.apache.maven.plugins:maven-war-plugin:2.4
      [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
      [ERROR] urls[0] = file:/home/centos/.m2/repository/org/apache/maven/plugins/maven-war-plugin/2.4/maven-war-plugin-2.4.jar
      [ERROR] urls[1] = file:/home/centos/.m2/repository/org/apache/maven/reporting/maven-reporting-api/2.0.6/maven-reporting-api-2.0.6.jar
      [ERROR] urls[2] = file:/home/centos/.m2/repository/org/apache/maven/doxia/doxia-sink-api/1.0-alpha-7/doxia-sink-api-1.0-alpha-7.jar
      [ERROR] urls[3] = file:/home/centos/.m2/repository/commons-cli/commons-cli/1.0/commons-cli-1.0.jar
      [ERROR] urls[4] = file:/home/centos/.m2/repository/org/codehaus/plexus/plexus-interactivity-api/1.0-alpha-4/plexus-interactivity-api-1.0-alpha-4.jar
      [ERROR] urls[5] = file:/home/centos/.m2/repository/org/apache/maven/maven-archiver/2.5/maven-archiver-2.5.jar
      [ERROR] urls[6] = file:/home/centos/.m2/repository/org/codehaus/plexus/plexus-io/2.0.7/plexus-io-2.0.7.jar
      [ERROR] urls[7] = file:/home/centos/.m2/repository/commons-io/commons-io/2.2/commons-io-2.2.jar
      [ERROR] urls[8] = file:/home/centos/.m2/repository/org/codehaus/plexus/plexus-archiver/2.4.1/plexus-archiver-2.4.1.jar
      [ERROR] urls[9] = file:/home/centos/.m2/repository/org/apache/commons/commons-compress/1.5/commons-compress-1.5.jar
      [ERROR] urls[10] = file:/home/centos/.m2/repository/org/tukaani/xz/1.2/xz-1.2.jar
      [ERROR] urls[11] = file:/home/centos/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.15/plexus-interpolation-1.15.jar
      [ERROR] urls[12] = file:/home/centos/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar
      [ERROR] urls[13] = file:/home/centos/.m2/repository/com/thoughtworks/xstream/xstream/1.4.2/xstream-1.4.2.jar
      [ERROR] urls[14] = file:/home/centos/.m2/repository/xmlpull/xmlpull/1.1.3.1/xmlpull-1.1.3.1.jar
      [ERROR] urls[15] = file:/home/centos/.m2/repository/xpp3/xpp3_min/1.1.4c/xpp3_min-1.1.4c.jar
      [ERROR] urls[16] = file:/home/centos/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.10/plexus-utils-3.0.10.jar
      [ERROR] urls[17] = file:/home/centos/.m2/repository/org/apache/maven/shared/maven-filtering/1.1/maven-filtering-1.1.jar
      [ERROR] urls[18] = file:/home/centos/.m2/repository/org/sonatype/plexus/plexus-build-api/0.0.4/plexus-build-api-0.0.4.jar
      [ERROR] Number of foreign imports: 1
      [ERROR] import: Entry[import  from realm ClassRealm[project>org.apache.hadoop:hadoop-main:3.0.0-alpha2-SNAPSHOT, parent: ClassRealm[maven.api, parent: null]]]
      [ERROR] 
      [ERROR] -----------------------------------------------------: ExceptionInInitializerError: Unable to make field private final java.util.Comparator java.util.TreeMap.comparator accessible: module java.base does not "opens java.util" to unnamed module @8ad2460
      

        Issue Links

          Activity

          Hide
          ajisakaa Akira Ajisaka added a comment -

          Reading: https://cwiki.apache.org/confluence/display/MAVEN/Java+9+-+Jigsaw
          Probably this issue is related to maven-war-plugin and Jigsaw feature.

          Show
          ajisakaa Akira Ajisaka added a comment - Reading: https://cwiki.apache.org/confluence/display/MAVEN/Java+9+-+Jigsaw Probably this issue is related to maven-war-plugin and Jigsaw feature.
          Hide
          ajisakaa Akira Ajisaka added a comment -

          Related to MWAR-397.

          Show
          ajisakaa Akira Ajisaka added a comment - Related to MWAR-397 .
          Hide
          ajisakaa Akira Ajisaka added a comment -

          maven-war-plugin depends on xstream and xstream does not support JDK9 for now. https://github.com/x-stream/xstream/issues/74

          Show
          ajisakaa Akira Ajisaka added a comment - maven-war-plugin depends on xstream and xstream does not support JDK9 for now. https://github.com/x-stream/xstream/issues/74
          Hide
          ajisakaa Akira Ajisaka added a comment -

          There is a workaround from https://issues.apache.org/jira/browse/MWAR-397?focusedCommentId=15818678&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15818678 :

          $ MAVEN_OPTS="--add-opens java.base/java.lang.reflect=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.text=ALL-UNNAMED --add-opens java.desktop/java.awt.font=ALL-UNNAMED" mvn install -DskipTests
          
          Show
          ajisakaa Akira Ajisaka added a comment - There is a workaround from https://issues.apache.org/jira/browse/MWAR-397?focusedCommentId=15818678&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15818678 : $ MAVEN_OPTS= "--add-opens java.base/java.lang.reflect=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.text=ALL-UNNAMED --add-opens java.desktop/java.awt.font=ALL-UNNAMED" mvn install -DskipTests
          Hide
          ajisakaa Akira Ajisaka added a comment -

          Another workaround: $ MAVEN_OPTS="--permit-illegal-access" mvn install -DskipTests
          http://jigsaw-dev.1059479.n5.nabble.com/Better-tools-for-adjusting-to-strong-encapsulation-td5715904.html

          Show
          ajisakaa Akira Ajisaka added a comment - Another workaround: $ MAVEN_OPTS="--permit-illegal-access" mvn install -DskipTests http://jigsaw-dev.1059479.n5.nabble.com/Better-tools-for-adjusting-to-strong-encapsulation-td5715904.html
          Hide
          ajisakaa Akira Ajisaka added a comment -

          This issue will be fixed by HADOOP-14355. Closing.

          Show
          ajisakaa Akira Ajisaka added a comment - This issue will be fixed by HADOOP-14355 . Closing.

            People

            • Assignee:
              Unassigned
              Reporter:
              ajisakaa Akira Ajisaka
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development