Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.6.0
    • Fix Version/s: 3.6.1
    • Labels:
      None

      Description

      setting maven.test.skip property to true doesn't skip compilation of test sources (despite printing a log message that says so)

      [INFO] — maven-compiler-plugin:3.6.0:testCompile (default-testCompile) @ foo —
      [INFO] Not compiling test sources
      [INFO] Changes detected - recompiling the module!
      [INFO] Compiling 1008 source files to XXX

        Activity

        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Jenkins build maven-plugins #7426 (See https://builds.apache.org/job/maven-plugins/7426/)
        MCOMPILER-284 maven.test.skip doesn't skip test compilation

        The tests classes were still compiled, even when setting "skip" to true (regression introduced in 2.6.0). Adding unit tests and integration tests for this case as well. (gboue: http://svn.apache.org/viewvc/?view=rev&rev=1768086)

        • (add) maven-compiler-plugin/src/it/MCOMPILER-284
        • (add) maven-compiler-plugin/src/it/MCOMPILER-284/pom.xml
        • (add) maven-compiler-plugin/src/it/MCOMPILER-284/src
        • (add) maven-compiler-plugin/src/it/MCOMPILER-284/src/main
        • (add) maven-compiler-plugin/src/it/MCOMPILER-284/src/main/java
        • (add) maven-compiler-plugin/src/it/MCOMPILER-284/src/main/java/com
        • (add) maven-compiler-plugin/src/it/MCOMPILER-284/src/main/java/com/foo
        • (add) maven-compiler-plugin/src/it/MCOMPILER-284/src/main/java/com/foo/MyClass.java
        • (add) maven-compiler-plugin/src/it/MCOMPILER-284/src/test
        • (add) maven-compiler-plugin/src/it/MCOMPILER-284/src/test/java
        • (add) maven-compiler-plugin/src/it/MCOMPILER-284/src/test/java/com
        • (add) maven-compiler-plugin/src/it/MCOMPILER-284/src/test/java/com/foo
        • (add) maven-compiler-plugin/src/it/MCOMPILER-284/src/test/java/com/foo/MyTest.java
        • (add) maven-compiler-plugin/src/it/MCOMPILER-284/verify.bsh
        • (edit) maven-compiler-plugin/src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.java
        • (edit) maven-compiler-plugin/src/test/java/org/apache/maven/plugin/compiler/CompilerMojoTestCase.java
        • (add) maven-compiler-plugin/src/test/resources/unit/compiler-skip-main
        • (add) maven-compiler-plugin/src/test/resources/unit/compiler-skip-main/plugin-config.xml
        • (add) maven-compiler-plugin/src/test/resources/unit/compiler-skip-main/src
        • (add) maven-compiler-plugin/src/test/resources/unit/compiler-skip-main/src/main
        • (add) maven-compiler-plugin/src/test/resources/unit/compiler-skip-main/src/main/java
        • (add) maven-compiler-plugin/src/test/resources/unit/compiler-skip-main/src/main/java/TestSkipMainCompile0.java
        • (add) maven-compiler-plugin/src/test/resources/unit/compiler-skip-main/src/test
        • (add) maven-compiler-plugin/src/test/resources/unit/compiler-skip-main/src/test/java
        • (add) maven-compiler-plugin/src/test/resources/unit/compiler-skip-main/src/test/java/TestSkipMainCompile0Test.java
        • (add) maven-compiler-plugin/src/test/resources/unit/compiler-skip-test
        • (add) maven-compiler-plugin/src/test/resources/unit/compiler-skip-test/plugin-config.xml
        • (add) maven-compiler-plugin/src/test/resources/unit/compiler-skip-test/src
        • (add) maven-compiler-plugin/src/test/resources/unit/compiler-skip-test/src/main
        • (add) maven-compiler-plugin/src/test/resources/unit/compiler-skip-test/src/main/java
        • (add) maven-compiler-plugin/src/test/resources/unit/compiler-skip-test/src/main/java/TestSkipTestCompile0.java
        • (add) maven-compiler-plugin/src/test/resources/unit/compiler-skip-test/src/test
        • (add) maven-compiler-plugin/src/test/resources/unit/compiler-skip-test/src/test/java
        • (add) maven-compiler-plugin/src/test/resources/unit/compiler-skip-test/src/test/java/TestSkipTestCompile0Test.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build maven-plugins #7426 (See https://builds.apache.org/job/maven-plugins/7426/ ) MCOMPILER-284 maven.test.skip doesn't skip test compilation The tests classes were still compiled, even when setting "skip" to true (regression introduced in 2.6.0). Adding unit tests and integration tests for this case as well. (gboue: http://svn.apache.org/viewvc/?view=rev&rev=1768086 ) (add) maven-compiler-plugin/src/it/ MCOMPILER-284 (add) maven-compiler-plugin/src/it/ MCOMPILER-284 /pom.xml (add) maven-compiler-plugin/src/it/ MCOMPILER-284 /src (add) maven-compiler-plugin/src/it/ MCOMPILER-284 /src/main (add) maven-compiler-plugin/src/it/ MCOMPILER-284 /src/main/java (add) maven-compiler-plugin/src/it/ MCOMPILER-284 /src/main/java/com (add) maven-compiler-plugin/src/it/ MCOMPILER-284 /src/main/java/com/foo (add) maven-compiler-plugin/src/it/ MCOMPILER-284 /src/main/java/com/foo/MyClass.java (add) maven-compiler-plugin/src/it/ MCOMPILER-284 /src/test (add) maven-compiler-plugin/src/it/ MCOMPILER-284 /src/test/java (add) maven-compiler-plugin/src/it/ MCOMPILER-284 /src/test/java/com (add) maven-compiler-plugin/src/it/ MCOMPILER-284 /src/test/java/com/foo (add) maven-compiler-plugin/src/it/ MCOMPILER-284 /src/test/java/com/foo/MyTest.java (add) maven-compiler-plugin/src/it/ MCOMPILER-284 /verify.bsh (edit) maven-compiler-plugin/src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.java (edit) maven-compiler-plugin/src/test/java/org/apache/maven/plugin/compiler/CompilerMojoTestCase.java (add) maven-compiler-plugin/src/test/resources/unit/compiler-skip-main (add) maven-compiler-plugin/src/test/resources/unit/compiler-skip-main/plugin-config.xml (add) maven-compiler-plugin/src/test/resources/unit/compiler-skip-main/src (add) maven-compiler-plugin/src/test/resources/unit/compiler-skip-main/src/main (add) maven-compiler-plugin/src/test/resources/unit/compiler-skip-main/src/main/java (add) maven-compiler-plugin/src/test/resources/unit/compiler-skip-main/src/main/java/TestSkipMainCompile0.java (add) maven-compiler-plugin/src/test/resources/unit/compiler-skip-main/src/test (add) maven-compiler-plugin/src/test/resources/unit/compiler-skip-main/src/test/java (add) maven-compiler-plugin/src/test/resources/unit/compiler-skip-main/src/test/java/TestSkipMainCompile0Test.java (add) maven-compiler-plugin/src/test/resources/unit/compiler-skip-test (add) maven-compiler-plugin/src/test/resources/unit/compiler-skip-test/plugin-config.xml (add) maven-compiler-plugin/src/test/resources/unit/compiler-skip-test/src (add) maven-compiler-plugin/src/test/resources/unit/compiler-skip-test/src/main (add) maven-compiler-plugin/src/test/resources/unit/compiler-skip-test/src/main/java (add) maven-compiler-plugin/src/test/resources/unit/compiler-skip-test/src/main/java/TestSkipTestCompile0.java (add) maven-compiler-plugin/src/test/resources/unit/compiler-skip-test/src/test (add) maven-compiler-plugin/src/test/resources/unit/compiler-skip-test/src/test/java (add) maven-compiler-plugin/src/test/resources/unit/compiler-skip-test/src/test/java/TestSkipTestCompile0Test.java
        Hide
        gboue Guillaume Boué added a comment -

        Fixed in r1768086.

        Show
        gboue Guillaume Boué added a comment - Fixed in r1768086 .
        Hide
        antdim A. Di Matteo added a comment - - edited

        I also confirm this regression, as reported on Stack Overflow
        http://stackoverflow.com/q/40427602/5606016

        The issue is always reproducible with the simplest pom file switching between the two plugin versions and trying to use the maven.test.skip option.

        Moreover, the issue is also always reproducible by passing the skip configuration entry directly to the default-testCompile default execution of the testCompile goal (hence, no maven.test.skip passed from the command line).

        Show
        antdim A. Di Matteo added a comment - - edited I also confirm this regression, as reported on Stack Overflow http://stackoverflow.com/q/40427602/5606016 The issue is always reproducible with the simplest pom file switching between the two plugin versions and trying to use the maven.test.skip option. Moreover, the issue is also always reproducible by passing the skip configuration entry directly to the default-testCompile default execution of the testCompile goal (hence, no maven.test.skip passed from the command line).

          People

          • Assignee:
            gboue Guillaume Boué
            Reporter:
            msimacek Michael Simacek
          • Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development