Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-6426

IT for MNG-6127 fails on Java 9+

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • Integration Tests
    • None

    Description

      Failure on Java 10 in Windows:

      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project mng-6127-plugin: Compilation failure
      [ERROR] /D:/Entwicklung/Projekte/maven-integration-testing/core-it-suite/target/test-classes/mng-6127-plugin-execution-configuration-interference/plugin/src/main/java/org/apache/maven/its/mng6127/plugin/TestMojo.java:[67,13] try-with-resources is not supported in -source 6
      [ERROR]   (use -source 7 or higher to enable try-with-resources)
      [ERROR] -> [Help 1]
      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project mng-6127-plugin: Compilation failure
      

      The compiled plugin uses Java 7, but the code introduced in ee3cae93ce70f9ff1898b5c10f3cce59898923af autoresets everything to 1.6.

      Drop all occurencies of maven.compiler.* and remove the try-with-resources statement.

      Attachments

        Activity

          People

            michael-o Michael Osipov
            michael-o Michael Osipov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: