Uploaded image for project: 'Maven Enforcer Plugin'
  1. Maven Enforcer Plugin
  2. MENFORCER-362

requireJavaVersion rule breaks with Java 15

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Invalid
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Standard Rules
    • Labels:
      None
    • Environment:

      Description

      I have a sample reproduction project (attached) that builds fine with Java 14. When I switch to Java 15, it breaks with the following stack trace:

      Execution lovely-iron-fist of goal org.apache.maven.plugins:maven-enforcer-plugin:1.4.1:enforce failed: An API incompatibility was encountered while executing org.apache.maven.plugins:maven-enforcer-plugin:1.4.1:enforce: java.lang.ExceptionInInitializerError: null
      [ERROR] -----------------------------------------------------
      [ERROR] realm =    plugin>org.apache.maven.plugins:maven-enforcer-plugin:1.4.1
      [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
      [ERROR] urls[0] = file:/Users/maarten/.m2/repository/org/apache/maven/plugins/maven-enforcer-plugin/1.4.1/maven-enforcer-plugin-1.4.1.jar
      [ERROR] urls[1] = file:/Users/maarten/.m2/repository/org/codehaus/mojo/extra-enforcer-rules/1.3/extra-enforcer-rules-1.3.jar
      [ERROR] urls[2] = file:/Users/maarten/.m2/repository/org/apache/maven/shared/maven-dependency-tree/2.2/maven-dependency-tree-2.2.jar
      [ERROR] urls[3] = file:/Users/maarten/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
      [ERROR] urls[4] = file:/Users/maarten/.m2/repository/org/eclipse/aether/aether-util/0.9.0.M2/aether-util-0.9.0.M2.jar
      [ERROR] urls[5] = file:/Users/maarten/.m2/repository/commons-codec/commons-codec/1.11/commons-codec-1.11.jar
      [ERROR] urls[6] = file:/Users/maarten/.m2/repository/org/apache/maven/shared/maven-common-artifact-filters/1.4/maven-common-artifact-filters-1.4.jar
      [ERROR] urls[7] = file:/Users/maarten/.m2/repository/org/sonatype/ossindex/maven/ossindex-maven-enforcer-rules/3.1.0/ossindex-maven-enforcer-rules-3.1.0.jar
      [ERROR] urls[8] = file:/Users/maarten/.m2/repository/org/sonatype/ossindex/maven/ossindex-maven-common/3.1.0/ossindex-maven-common-3.1.0.jar
      [ERROR] urls[9] = file:/Users/maarten/.m2/repository/org/sonatype/ossindex/ossindex-service-client/1.1.1/ossindex-service-client-1.1.1.jar
      [ERROR] urls[10] = file:/Users/maarten/.m2/repository/org/sonatype/ossindex/ossindex-service-api/1.1.1/ossindex-service-api-1.1.1.jar
      [ERROR] urls[11] = file:/Users/maarten/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.9.0/jackson-annotations-2.9.0.jar
      [ERROR] urls[12] = file:/Users/maarten/.m2/repository/javax/ws/rs/javax.ws.rs-api/2.0.1/javax.ws.rs-api-2.0.1.jar
      [ERROR] urls[13] = file:/Users/maarten/.m2/repository/org/sonatype/goodies/package-url-java/1.0.1/package-url-java-1.0.1.jar
      [ERROR] urls[14] = file:/Users/maarten/.m2/repository/joda-time/joda-time/2.9.9/joda-time-2.9.9.jar
      [ERROR] urls[15] = file:/Users/maarten/.m2/repository/com/google/code/gson/gson/2.8.2/gson-2.8.2.jar
      [ERROR] urls[16] = file:/Users/maarten/.m2/repository/org/apache/httpcomponents/httpclient/4.5.5/httpclient-4.5.5.jar
      [ERROR] urls[17] = file:/Users/maarten/.m2/repository/org/apache/httpcomponents/httpcore/4.4.9/httpcore-4.4.9.jar
      [ERROR] urls[18] = file:/Users/maarten/.m2/repository/com/google/guava/guava/28.1-android/guava-28.1-android.jar
      [ERROR] urls[19] = file:/Users/maarten/.m2/repository/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar
      [ERROR] urls[20] = file:/Users/maarten/.m2/repository/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar
      [ERROR] urls[21] = file:/Users/maarten/.m2/repository/org/checkerframework/checker-compat-qual/2.5.5/checker-compat-qual-2.5.5.jar
      [ERROR] urls[22] = file:/Users/maarten/.m2/repository/com/google/errorprone/error_prone_annotations/2.3.2/error_prone_annotations-2.3.2.jar
      [ERROR] urls[23] = file:/Users/maarten/.m2/repository/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3.jar
      [ERROR] urls[24] = file:/Users/maarten/.m2/repository/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar
      [ERROR] urls[25] = file:/Users/maarten/.m2/repository/org/sonatype/sisu/sisu-inject-bean/1.4.2/sisu-inject-bean-1.4.2.jar
      [ERROR] urls[26] = file:/Users/maarten/.m2/repository/org/sonatype/sisu/sisu-guice/2.1.7/sisu-guice-2.1.7-noaop.jar
      [ERROR] urls[27] = file:/Users/maarten/.m2/repository/backport-util-concurrent/backport-util-concurrent/3.1/backport-util-concurrent-3.1.jar
      [ERROR] urls[28] = file:/Users/maarten/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.11/plexus-interpolation-1.11.jar
      [ERROR] urls[29] = file:/Users/maarten/.m2/repository/org/slf4j/slf4j-jdk14/1.5.6/slf4j-jdk14-1.5.6.jar
      [ERROR] urls[30] = file:/Users/maarten/.m2/repository/org/slf4j/jcl-over-slf4j/1.5.6/jcl-over-slf4j-1.5.6.jar
      [ERROR] urls[31] = file:/Users/maarten/.m2/repository/org/apache/maven/reporting/maven-reporting-api/2.2.1/maven-reporting-api-2.2.1.jar
      [ERROR] urls[32] = file:/Users/maarten/.m2/repository/org/apache/maven/doxia/doxia-sink-api/1.1/doxia-sink-api-1.1.jar
      [ERROR] urls[33] = file:/Users/maarten/.m2/repository/org/apache/maven/doxia/doxia-logging-api/1.1/doxia-logging-api-1.1.jar
      [ERROR] urls[34] = file:/Users/maarten/.m2/repository/commons-cli/commons-cli/1.2/commons-cli-1.2.jar
      [ERROR] urls[35] = file:/Users/maarten/.m2/repository/org/codehaus/plexus/plexus-interactivity-api/1.0-alpha-4/plexus-interactivity-api-1.0-alpha-4.jar
      [ERROR] urls[36] = file:/Users/maarten/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
      [ERROR] urls[37] = file:/Users/maarten/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
      [ERROR] urls[38] = file:/Users/maarten/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.22/plexus-utils-3.0.22.jar
      [ERROR] urls[39] = file:/Users/maarten/.m2/repository/commons-lang/commons-lang/2.3/commons-lang-2.3.jar
      [ERROR] urls[40] = file:/Users/maarten/.m2/repository/org/apache/maven/enforcer/enforcer-api/1.4.1/enforcer-api-1.4.1.jar
      [ERROR] urls[41] = file:/Users/maarten/.m2/repository/org/apache/maven/enforcer/enforcer-rules/1.4.1/enforcer-rules-1.4.1.jar
      [ERROR] urls[42] = file:/Users/maarten/.m2/repository/org/beanshell/bsh/2.0b4/bsh-2.0b4.jar
      [ERROR] urls[43] = file:/Users/maarten/.m2/repository/org/codehaus/plexus/plexus-i18n/1.0-beta-6/plexus-i18n-1.0-beta-6.jar
      [ERROR] urls[44] = file:/Users/maarten/.m2/repository/org/apache/maven/plugin-testing/maven-plugin-testing-harness/1.3/maven-plugin-testing-harness-1.3.jar
      [ERROR] urls[45] = file:/Users/maarten/.m2/repository/org/codehaus/plexus/plexus-archiver/2.2/plexus-archiver-2.2.jar
      [ERROR] urls[46] = file:/Users/maarten/.m2/repository/org/codehaus/plexus/plexus-io/2.0.4/plexus-io-2.0.4.jar
      [ERROR] urls[47] = file:/Users/maarten/.m2/repository/junit/junit/4.11/junit-4.11.jar
      [ERROR] urls[48] = file:/Users/maarten/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar
      [ERROR] Number of foreign imports: 1
      [ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
      
      

        Attachments

        1. maven-enforcer-java-15.zip
          4 kB
          Maarten Mulders

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mthmulders Maarten Mulders
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: