Uploaded image for project: 'Maven Checkstyle Plugin'
  1. Maven Checkstyle Plugin
  2. MCHECKSTYLE-319

Upgrade mavenVersion from 2.2.1 to 3.3.9

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.17
    • Fix Version/s: None
    • Component/s: checkstyle:checkstyle
    • Labels:
      None

      Description

      In order to solve e.g. the problem shown below, as per https://github.com/jcgay/maven-color/wiki/Problems (also https://emmanuelbernard.com/blog/2015/07/27/maven-color/ = https://github.com/jcgay/maven-color/issues/11, and https://github.com/jcgay/maven-color/issues/8), wouldn't it be time for maven-checkstyle-plugin to upgrade its mavenVersion from ancient 2.2.1 to something recent such as 3.3.9 ?

      I've done a svn checkout http://svn.apache.org/repos/asf/maven/plugins/trunk/maven-checkstyle-plugin/ and briefly attempted the upgrade, see attached patch as a starting point, which compiles, but it then leads to 13/24 test failures .. Perhaps someone with more Maven plugin development skill than I have could resolve this?

      BTW, slightly OT: I'm surprised that this org.apache.maven.plugins:maven-plugins parent (v28 used by maven-checkstyle-plugin trunk currently) does not define all those various versions in one place with a dependencyManagement, so that something like maven-checkstyle-plugin could simply inherit from that?

      — maven-checkstyle-plugin:2.18-SNAPSHOT:checkstyle (checkstyle) @ hello-api —
      ------------------------------------------------------------------------
      Reactor Summary:

      hello-api .......................................... FAILURE [ 5.616 s]
      hello-impl ......................................... SKIPPED
      hello-features ..................................... SKIPPED
      hello-karaf ........................................ SKIPPED
      hello-artifacts .................................... SKIPPED
      hello .............................................. SKIPPED
      ------------------------------------------------------------------------
      BUILD FAILURE
      ------------------------------------------------------------------------
      Total time: 10.739 s
      Finished at: 2016-05-24T13:15:22+02:00
      Final Memory: 54M/339M
      ------------------------------------------------------------------------
      Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:2.18-SNAPSHOT:checkstyle (checkstyle) on project hello-api: Execution checkstyle of goal org.apache.maven.plugins:maven-checkstyle-plugin:2.18-SNAPSHOT:checkstyle failed: An API incompatibility was encountered while executing org.apache.maven.plugins:maven-checkstyle-plugin:2.18-SNAPSHOT:checkstyle: java.lang.NoSuchMethodError: org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;Ljava/lang/Throwable;)V
      -----------------------------------------------------
      realm = plugin>org.apache.maven.plugins:maven-checkstyle-plugin:2.18-SNAPSHOT
      strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
      urls[0] = file:/home/vorburger/.m2/repository/org/apache/maven/plugins/maven-checkstyle-plugin/2.18-SNAPSHOT/maven-checkstyle-plugin-2.18-SNAPSHOT.jar
      urls[1] = file:/home/vorburger/.m2/repository/com/puppycrawl/tools/checkstyle/6.16/checkstyle-6.16.jar
      urls[2] = file:/home/vorburger/.m2/repository/org/apache/commons/commons-lang3/3.4/commons-lang3-3.4.jar
      urls[3] = file:/home/vorburger/.m2/repository/antlr/antlr/2.7.7/antlr-2.7.7.jar
      urls[4] = file:/home/vorburger/.m2/repository/org/antlr/antlr4-runtime/4.5.2-1/antlr4-runtime-4.5.2-1.jar
      urls[5] = file:/home/vorburger/.m2/repository/commons-beanutils/commons-beanutils/1.9.2/commons-beanutils-1.9.2.jar
      urls[6] = file:/home/vorburger/.m2/repository/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar
      urls[7] = file:/home/vorburger/.m2/repository/commons-cli/commons-cli/1.3.1/commons-cli-1.3.1.jar
      urls[8] = file:/home/vorburger/.m2/repository/com/google/guava/guava/19.0/guava-19.0.jar
      urls[9] = file:/usr/lib/jvm/java-8-openjdk-amd64/jre/../lib/tools.jar
      urls[10] = file:/home/vorburger/.m2/repository/org/opendaylight/odlparent/checkstyle/0.2.0-SNAPSHOT/checkstyle-0.2.0-SNAPSHOT.jar
      urls[11] = file:/home/vorburger/.m2/repository/org/opendaylight/odlparent/odl-license/0.1.0-SNAPSHOT/odl-license-0.1.0-SNAPSHOT.jar
      urls[12] = file:/home/vorburger/.m2/repository/org/slf4j/slf4j-jdk14/1.5.6/slf4j-jdk14-1.5.6.jar
      urls[13] = file:/home/vorburger/.m2/repository/org/slf4j/jcl-over-slf4j/1.5.6/jcl-over-slf4j-1.5.6.jar
      urls[14] = file:/home/vorburger/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar
      urls[15] = file:/home/vorburger/.m2/repository/org/codehaus/plexus/plexus-interactivity-api/1.0-alpha-4/plexus-interactivity-api-1.0-alpha-4.jar
      urls[16] = file:/home/vorburger/.m2/repository/backport-util-concurrent/backport-util-concurrent/3.1/backport-util-concurrent-3.1.jar
      urls[17] = file:/home/vorburger/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
      urls[18] = file:/home/vorburger/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
      urls[19] = file:/home/vorburger/.m2/repository/org/apache/maven/reporting/maven-reporting-api/3.0/maven-reporting-api-3.0.jar
      urls[20] = file:/home/vorburger/.m2/repository/org/apache/maven/reporting/maven-reporting-impl/2.3/maven-reporting-impl-2.3.jar
      urls[21] = file:/home/vorburger/.m2/repository/org/apache/maven/shared/maven-shared-utils/0.6/maven-shared-utils-0.6.jar
      urls[22] = file:/home/vorburger/.m2/repository/com/google/code/findbugs/jsr305/2.0.1/jsr305-2.0.1.jar
      urls[23] = file:/home/vorburger/.m2/repository/org/apache/maven/doxia/doxia-core/1.2/doxia-core-1.2.jar
      urls[24] = file:/home/vorburger/.m2/repository/xerces/xercesImpl/2.9.1/xercesImpl-2.9.1.jar
      urls[25] = file:/home/vorburger/.m2/repository/xml-apis/xml-apis/1.3.04/xml-apis-1.3.04.jar
      urls[26] = file:/home/vorburger/.m2/repository/org/apache/httpcomponents/httpclient/4.0.2/httpclient-4.0.2.jar
      urls[27] = file:/home/vorburger/.m2/repository/org/apache/httpcomponents/httpcore/4.0.1/httpcore-4.0.1.jar
      urls[28] = file:/home/vorburger/.m2/repository/commons-codec/commons-codec/1.3/commons-codec-1.3.jar
      urls[29] = file:/home/vorburger/.m2/repository/commons-validator/commons-validator/1.3.1/commons-validator-1.3.1.jar
      urls[30] = file:/home/vorburger/.m2/repository/commons-digester/commons-digester/1.6/commons-digester-1.6.jar
      urls[31] = file:/home/vorburger/.m2/repository/org/apache/maven/doxia/doxia-sink-api/1.4/doxia-sink-api-1.4.jar
      urls[32] = file:/home/vorburger/.m2/repository/org/apache/maven/doxia/doxia-logging-api/1.4/doxia-logging-api-1.4.jar
      urls[33] = file:/home/vorburger/.m2/repository/org/apache/maven/doxia/doxia-decoration-model/1.4/doxia-decoration-model-1.4.jar
      urls[34] = file:/home/vorburger/.m2/repository/org/apache/maven/doxia/doxia-site-renderer/1.4/doxia-site-renderer-1.4.jar
      urls[35] = file:/home/vorburger/.m2/repository/org/apache/maven/doxia/doxia-module-xhtml/1.4/doxia-module-xhtml-1.4.jar
      urls[36] = file:/home/vorburger/.m2/repository/org/apache/maven/doxia/doxia-module-fml/1.4/doxia-module-fml-1.4.jar
      urls[37] = file:/home/vorburger/.m2/repository/org/codehaus/plexus/plexus-i18n/1.0-beta-7/plexus-i18n-1.0-beta-7.jar
      urls[38] = file:/home/vorburger/.m2/repository/org/apache/velocity/velocity-tools/2.0/velocity-tools-2.0.jar
      urls[39] = file:/home/vorburger/.m2/repository/commons-chain/commons-chain/1.1/commons-chain-1.1.jar
      urls[40] = file:/home/vorburger/.m2/repository/dom4j/dom4j/1.1/dom4j-1.1.jar
      urls[41] = file:/home/vorburger/.m2/repository/sslext/sslext/1.2-0/sslext-1.2-0.jar
      urls[42] = file:/home/vorburger/.m2/repository/org/apache/struts/struts-core/1.3.8/struts-core-1.3.8.jar
      urls[43] = file:/home/vorburger/.m2/repository/org/apache/struts/struts-taglib/1.3.8/struts-taglib-1.3.8.jar
      urls[44] = file:/home/vorburger/.m2/repository/org/apache/struts/struts-tiles/1.3.8/struts-tiles-1.3.8.jar
      urls[45] = file:/home/vorburger/.m2/repository/org/apache/maven/doxia/doxia-integration-tools/1.6/doxia-integration-tools-1.6.jar
      urls[46] = file:/home/vorburger/.m2/repository/commons-io/commons-io/1.4/commons-io-1.4.jar
      urls[47] = file:/home/vorburger/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
      urls[48] = file:/home/vorburger/.m2/repository/org/codehaus/plexus/plexus-resources/1.0.1/plexus-resources-1.0.1.jar
      urls[49] = file:/home/vorburger/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.24/plexus-utils-3.0.24.jar
      urls[50] = file:/home/vorburger/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.21/plexus-interpolation-1.21.jar
      urls[51] = file:/home/vorburger/.m2/repository/org/codehaus/plexus/plexus-velocity/1.1.8/plexus-velocity-1.1.8.jar
      urls[52] = file:/home/vorburger/.m2/repository/org/apache/velocity/velocity/1.5/velocity-1.5.jar
      urls[53] = file:/home/vorburger/.m2/repository/commons-lang/commons-lang/2.1/commons-lang-2.1.jar
      urls[54] = file:/home/vorburger/.m2/repository/oro/oro/2.0.8/oro-2.0.8.jar
      urls[55] = file:/home/vorburger/.m2/repository/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar
      Number of foreign imports: 1
      import: Entry[import from realm ClassRealm[project>org.opendaylight.vorburger.hello:hello-api:0.1.0-SNAPSHOT, parent: ClassRealm[maven.api, parent: null]]]

      -----------------------------------------------------
      -> [Help 1]

      To see the full stack trace of the errors, re-run Maven with the -e switch.
      Re-run Maven using the -X switch to enable full debug logging.

      For more information about the errors and possible solutions, please read the following articles:
      [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException

        Attachments

        1. MCHECKSTYLE-319.diff
          2 kB
          Michael Vorburger

          Issue Links

            Activity

              People

              • Assignee:
                gboue Guillaume Boué
                Reporter:
                vorburger Michael Vorburger
              • Votes:
                2 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: