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

[Test] MavenCliTest.testStyleColors failed with Java 16 and 17

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 4.0.0-alpha-1
    • Fix Version/s: None
    • Component/s: Embedding
    • Labels:
      None

      Description

      To reproduce - run mvn verify in maven-embedder module with Java 16 (b23+) or Java 17

      [INFO] Running org.apache.maven.cli.MavenCliTest
      [ERROR] Tests run: 14, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.88 s <<< FAILURE! - in org.apache.maven.cli.MavenCliTest
      [ERROR] testStyleColors(org.apache.maven.cli.MavenCliTest)  Time elapsed: 0.024 s  <<< ERROR!
      java.lang.NullPointerException
              at org.apache.maven.cli.MavenCliTest.testStyleColors(MavenCliTest.java:338)
      

      More detailed - it fails in org.apache.maven.cli.ResolveFile#resolveFile where baseDirectory is null
      return Paths.get( baseDirectory, file.getPath() ).normalize().toFile();

      Additional check added with https://bugs.openjdk.java.net/browse/JDK-8254876 ie https://github.com/openjdk/jdk/commit/450452bb8cb617682a3eb28ae651cb829a45dcc6

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                martinkanters Martin Kanters
                Reporter:
                slachiewicz Sylwester Lachiewicz
              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: