Uploaded image for project: 'Maven Surefire'
  1. Maven Surefire
  2. SUREFIRE-2149

Several ITs fail with Maven 3.9.0

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0.0-M8
    • 3.0.0
    • None

    Description

      See errors in continuous build since the switch to Maven 3.9.0

      Error:  Failures: 
      Error:    Surefire772BothReportsIT.testReportGeneration:57 Expecting failsafe report file
      Error:    Surefire772BothReportsIT.testSkippedSurefireReportGeneration:85 Expecting failsafe report file
      Error:    Surefire772NoSurefireReportsIT.testOptionalSurefireReportGeneration:75 Expecting failsafe report file
      Error:    Surefire772NoSurefireReportsIT.testReportGeneration:49 Expecting failsafe report file
      Error:    Surefire772NoSurefireReportsIT.testSkipOptionalSurefireReportGeneration:88 Expecting failsafe report file
      Error:    Surefire772NoSurefireReportsIT.testSkippedSurefireReportGeneration:62 Expecting failsafe report file
      Error:  Errors: 
      Error:    Surefire946KillMainProcessInReusableForkIT.dummyDep:88 ยป SurefireVerifier Exit code was non-zero: 1; command line and log = 
      /home/runner/.m2/wrapper/dists/apache-maven-3.9.0-bin/7u41pcsb933vr4m6u83d7ofakm/apache-maven-3.9.0/bin/mvn -e --batch-mode -Dmaven.repo.local=/home/runner/.m2/repository org.apache.maven.plugins:maven-clean-plugin:clean -Dsurefire.version=3.0.0-M10-SNAPSHOT -Djacoco.agent=-javaagent:/home/runner/.m2/repository/org/jacoco/org.jacoco.agent/0.8.8/org.jacoco.agent-0.8.8-runtime.jar=destfile=/home/runner/work/maven-surefire/maven-surefire/surefire-its/target/jacoco.exec,includes=**/failsafe/*:**/failsafe/**/*:**/surefire/*:**/surefire/**/*,excludes=**/HelpMojo.class:**/shadefire/**/*:org/jacoco/**/*:com/vladium/emma/rt/* -nsu install -Ddistinct.classifier=exitexit
      

      Surefire772 ITs:

      The reason for these failures is that org.apache.maven.surefire.its.fixture.MavenLauncher#skipClean still uses the pre-3.0.0 name of the respective maven-clean-plugin property.

      Before maven-clean-plugin version 3.0.0: -Dclean.skip=true
      Since maven-clean-plugin version 3.0.0: -Dmaven.clean.skip=true

      Maven 3.9.0 uses maven-clean-plugin in version 3.2 by default. Maven 3.8.x still uses version 2.5 by default.

      In order to support both versions it might be best to set both properties.

      Surefire946 IT:

      The log output of the test project says the following:

      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:3.1.0:install (default-install) on project surefire-946-dummy-dependency: The packaging plugin for this project did not assign a main file to the project but it has attachments. Change packaging to 'pom'. -> [Help 1]
      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-install-plugin:3.1.0:install (default-install) on project surefire-946-dummy-dependency: The packaging plugin for this project did not assign a main file to the project but it has attachments. Change packaging to 'pom'.
      

      This appears to be caused by the changes to the maven-install-plugin mentioned here: https://issues.apache.org/jira/browse/MINSTALL-151

      Similarly, Maven 3.8.x still uses the maven-install-plugin in the very old version 2.4 by default, so it wasn't affected by this issue.

      Easiest way to avoid the problem is to use the maven-install-plugin of that particular test project in a fixed version 2.5.2, the last one before 3.0.0-M1.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            sjaranowski Slawomir Jaranowski
            andpab Andreas Pabst
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment