Uploaded image for project: 'Undertow'
  1. Undertow
  2. UNDERTOW-2091

spotbugs-maven-plugin needs to be updated to work with JDK17

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.3.0.Alpha1, 2.3.0.Final
    • 2.2.17.Final
    • None
    • Hide
      JAVA_HOME=<PATH_TO_JDK17> mvn clean verify -DskipTests --show-version --no-transfer-progress -Dmaven.test.failure.ignore=true -Dmaven.javadoc.skip=true -Denforcer.skip -Dfindbugs
      
      Show
      JAVA_HOME=<PATH_TO_JDK17> mvn clean verify -DskipTests --show-version --no-transfer-progress -Dmaven.test.failure.ignore= true -Dmaven.javadoc.skip= true -Denforcer.skip -Dfindbugs

      At the moment there is `spotbugs-maven-plugin` in version 3.1.7 used in Undertow. When we try to build Undertow with JDK17, we can see following failure:

      [ERROR] Failed to execute goal com.github.spotbugs:spotbugs-maven-plugin:3.1.7:spotbugs (spotbugs) on project undertow-parent: Execution spotbugs of goal com.github.spotbugs:spotbugs-maven-plugin:3.1.7:spotbugs failed: Unable to load the mojo 'spotbugs' in the plugin 'com.github.spotbugs:spotbugs-maven-plugin:3.1.7'. A required class is missing: Could not initialize class org.codehaus.groovy.vmplugin.v7.Java7
      [ERROR] -----------------------------------------------------
      [ERROR] realm =    plugin>com.github.spotbugs:spotbugs-maven-plugin:3.1.7
      [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
      [ERROR] urls[0] = file:/home/jstourac/.m2/repository/com/github/spotbugs/spotbugs-maven-plugin/3.1.7/spotbugs-maven-plugin-3.1.7.jar
      [ERROR] urls[1] = file:/home/jstourac/.m2/repository/com/github/spotbugs/spotbugs/3.1.7/spotbugs-3.1.7.jar
      [ERROR] urls[2] = file:/home/jstourac/.m2/repository/org/ow2/asm/asm/6.2/asm-6.2.jar
      [ERROR] urls[3] = file:/home/jstourac/.m2/repository/org/ow2/asm/asm-analysis/6.2/asm-analysis-6.2.jar
      [ERROR] urls[4] = file:/home/jstourac/.m2/repository/org/ow2/asm/asm-commons/6.2/asm-commons-6.2.jar
      [ERROR] urls[5] = file:/home/jstourac/.m2/repository/org/ow2/asm/asm-tree/6.2/asm-tree-6.2.jar
      [ERROR] urls[6] = file:/home/jstourac/.m2/repository/org/ow2/asm/asm-util/6.2/asm-util-6.2.jar
      [ERROR] urls[7] = file:/home/jstourac/.m2/repository/org/ow2/asm/asm-xml/6.2/asm-xml-6.2.jar
      [ERROR] urls[8] = file:/home/jstourac/.m2/repository/org/apache/bcel/bcel/6.2/bcel-6.2.jar
      [ERROR] urls[9] = file:/home/jstourac/.m2/repository/net/jcip/jcip-annotations/1.0/jcip-annotations-1.0.jar
      [ERROR] urls[10] = file:/home/jstourac/.m2/repository/org/dom4j/dom4j/2.1.0/dom4j-2.1.0.jar
      [ERROR] urls[11] = file:/home/jstourac/.m2/repository/jaxen/jaxen/1.1.6/jaxen-1.1.6.jar
      [ERROR] urls[12] = file:/home/jstourac/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar
      [ERROR] urls[13] = file:/home/jstourac/.m2/repository/com/github/spotbugs/spotbugs-annotations/3.1.7/spotbugs-annotations-3.1.7.jar
      [ERROR] urls[14] = file:/home/jstourac/.m2/repository/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar
      [ERROR] urls[15] = file:/home/jstourac/.m2/repository/org/apache/ant/ant/1.10.5/ant-1.10.5.jar
      [ERROR] urls[16] = file:/home/jstourac/.m2/repository/org/apache/ant/ant-launcher/1.10.5/ant-launcher-1.10.5.jar
      [ERROR] urls[17] = file:/home/jstourac/.m2/repository/org/codehaus/groovy/groovy-dateutil/2.5.3/groovy-dateutil-2.5.3-indy.jar
      [ERROR] urls[18] = file:/home/jstourac/.m2/repository/org/codehaus/groovy/groovy/2.5.3/groovy-2.5.3.jar
      [ERROR] urls[19] = file:/home/jstourac/.m2/repository/org/codehaus/groovy/groovy-ant/2.5.3/groovy-ant-2.5.3.jar
      [ERROR] urls[20] = file:/home/jstourac/.m2/repository/org/codehaus/groovy/groovy-groovydoc/2.5.3/groovy-groovydoc-2.5.3.jar
      [ERROR] urls[21] = file:/home/jstourac/.m2/repository/org/codehaus/groovy/groovy-xml/2.5.3/groovy-xml-2.5.3.jar
      [ERROR] urls[22] = file:/home/jstourac/.m2/repository/org/apache/maven/reporting/maven-reporting-impl/3.0.0/maven-reporting-impl-3.0.0.jar
      [ERROR] urls[23] = file:/home/jstourac/.m2/repository/org/apache/maven/shared/maven-shared-utils/3.2.0/maven-shared-utils-3.2.0.jar
      [ERROR] urls[24] = file:/home/jstourac/.m2/repository/org/apache/maven/reporting/maven-reporting-api/3.0/maven-reporting-api-3.0.jar
      [ERROR] urls[25] = file:/home/jstourac/.m2/repository/javax/enterprise/cdi-api/1.0/cdi-api-1.0.jar
      [ERROR] urls[26] = file:/home/jstourac/.m2/repository/javax/annotation/jsr250-api/1.0/jsr250-api-1.0.jar
      [ERROR] urls[27] = file:/home/jstourac/.m2/repository/org/eclipse/sisu/org.eclipse.sisu.inject/0.3.3/org.eclipse.sisu.inject-0.3.3.jar
      [ERROR] urls[28] = file:/home/jstourac/.m2/repository/org/apache/maven/maven-builder-support/3.5.0/maven-builder-support-3.5.0.jar
      [ERROR] urls[29] = file:/home/jstourac/.m2/repository/com/google/guava/guava/20.0/guava-20.0.jar
      [ERROR] urls[30] = file:/home/jstourac/.m2/repository/org/apache/maven/resolver/maven-resolver-util/1.0.3/maven-resolver-util-1.0.3.jar
      [ERROR] urls[31] = file:/home/jstourac/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.24/plexus-interpolation-1.24.jar
      [ERROR] urls[32] = file:/home/jstourac/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.7.1/plexus-component-annotations-1.7.1.jar
      [ERROR] urls[33] = file:/home/jstourac/.m2/repository/org/eclipse/aether/aether-util/0.9.0.M2/aether-util-0.9.0.M2.jar
      [ERROR] urls[34] = file:/home/jstourac/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
      [ERROR] urls[35] = file:/home/jstourac/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
      [ERROR] urls[36] = file:/home/jstourac/.m2/repository/org/apache/maven/doxia/doxia-core/1.8/doxia-core-1.8.jar
      [ERROR] urls[37] = file:/home/jstourac/.m2/repository/org/apache/maven/doxia/doxia-logging-api/1.8/doxia-logging-api-1.8.jar
      [ERROR] urls[38] = file:/home/jstourac/.m2/repository/org/apache/httpcomponents/httpclient/4.0.2/httpclient-4.0.2.jar
      [ERROR] urls[39] = file:/home/jstourac/.m2/repository/org/apache/httpcomponents/httpcore/4.0.1/httpcore-4.0.1.jar
      [ERROR] urls[40] = file:/home/jstourac/.m2/repository/org/apache/maven/doxia/doxia-sink-api/1.8/doxia-sink-api-1.8.jar
      [ERROR] urls[41] = file:/home/jstourac/.m2/repository/org/apache/maven/doxia/doxia-decoration-model/1.8.1/doxia-decoration-model-1.8.1.jar
      [ERROR] urls[42] = file:/home/jstourac/.m2/repository/org/apache/maven/doxia/doxia-site-renderer/1.8.1/doxia-site-renderer-1.8.1.jar
      [ERROR] urls[43] = file:/home/jstourac/.m2/repository/org/apache/maven/doxia/doxia-skin-model/1.8.1/doxia-skin-model-1.8.1.jar
      [ERROR] urls[44] = file:/home/jstourac/.m2/repository/org/apache/maven/doxia/doxia-module-xhtml/1.8/doxia-module-xhtml-1.8.jar
      [ERROR] urls[45] = file:/home/jstourac/.m2/repository/org/codehaus/plexus/plexus-i18n/1.0-beta-7/plexus-i18n-1.0-beta-7.jar
      [ERROR] urls[46] = file:/home/jstourac/.m2/repository/org/codehaus/plexus/plexus-velocity/1.2/plexus-velocity-1.2.jar
      [ERROR] urls[47] = file:/home/jstourac/.m2/repository/org/apache/velocity/velocity/1.7/velocity-1.7.jar
      [ERROR] urls[48] = file:/home/jstourac/.m2/repository/org/apache/velocity/velocity-tools/2.0/velocity-tools-2.0.jar
      [ERROR] urls[49] = file:/home/jstourac/.m2/repository/oro/oro/2.0.8/oro-2.0.8.jar
      [ERROR] urls[50] = file:/home/jstourac/.m2/repository/sslext/sslext/1.2-0/sslext-1.2-0.jar
      [ERROR] urls[51] = file:/home/jstourac/.m2/repository/org/apache/maven/doxia/doxia-integration-tools/1.8.1/doxia-integration-tools-1.8.1.jar
      [ERROR] urls[52] = file:/home/jstourac/.m2/repository/commons-beanutils/commons-beanutils/1.9.3/commons-beanutils-1.9.3.jar
      [ERROR] urls[53] = file:/home/jstourac/.m2/repository/commons-logging/commons-logging/1.2/commons-logging-1.2.jar
      [ERROR] urls[54] = file:/home/jstourac/.m2/repository/commons-chain/commons-chain/1.2/commons-chain-1.2.jar
      [ERROR] urls[55] = file:/home/jstourac/.m2/repository/commons-codec/commons-codec/1.11/commons-codec-1.11.jar
      [ERROR] urls[56] = file:/home/jstourac/.m2/repository/commons-collections/commons-collections/3.2.2/commons-collections-3.2.2.jar
      [ERROR] urls[57] = file:/home/jstourac/.m2/repository/commons-digester/commons-digester/1.8.1/commons-digester-1.8.1.jar
      [ERROR] urls[58] = file:/home/jstourac/.m2/repository/commons-io/commons-io/2.6/commons-io-2.6.jar
      [ERROR] urls[59] = file:/home/jstourac/.m2/repository/org/apache/commons/commons-lang3/3.8.1/commons-lang3-3.8.1.jar
      [ERROR] urls[60] = file:/home/jstourac/.m2/repository/commons-validator/commons-validator/1.6/commons-validator-1.6.jar
      [ERROR] urls[61] = file:/home/jstourac/.m2/repository/org/apache/xbean/xbean-reflect/3.7/xbean-reflect-3.7.jar
      [ERROR] urls[62] = file:/home/jstourac/.m2/repository/org/codehaus/plexus/plexus-resources/1.1.0/plexus-resources-1.1.0.jar
      [ERROR] urls[63] = file:/home/jstourac/.m2/repository/org/codehaus/plexus/plexus-utils/3.1.0/plexus-utils-3.1.0.jar
      [ERROR] Number of foreign imports: 1
      [ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
      [ERROR] 
      [ERROR] -----------------------------------------------------
      

      In order to make compilation pass with spotbugs check enabled on JDK17, we need to update that plugin to version at least 4.3.0 or higher.

            flaviarnn Flavia Rainone
            jstourac@redhat.com Jan Stourac
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: