Uploaded image for project: 'Maven Wagon'
  1. Maven Wagon
  2. WAGON-592

Wagon fails when compiled on Java 9+ and run on Java 8 due to JDK API breakage

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.4.0
    • 3.4.1
    • None
    • None

    Description

      When Wagon is compiled with Java 9+ and run with Maven core or something else with Java 8 one can observe the following:

      [INFO] Running org.apache.maven.repository.internal.DefaultArtifactDescriptorReaderTest
      [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.802 s <<< FAILURE! - in org.apache.maven.repository.internal.DefaultArtifactDescriptorReaderTest
      [ERROR] testMng5459(org.apache.maven.repository.internal.DefaultArtifactDescriptorReaderTest)  Time elapsed: 0.787 s  <<< ERROR!
      java.lang.NoSuchMethodError: java.nio.ByteBuffer.flip()Ljava/nio/ByteBuffer;
              at org.apache.maven.repository.internal.DefaultArtifactDescriptorReaderTest.testMng5459(DefaultArtifactDescriptorReaderTest.java:56)
      
      [INFO] Running org.apache.maven.repository.internal.DefaultModelResolverTest
      [ERROR] Tests run: 10, Failures: 0, Errors: 8, Skipped: 0, Time elapsed: 0.354 s <<< FAILURE! - in org.apache.maven.repository.internal.DefaultModelResolverTest
      [ERROR] testResolveDependencySuccessfullyResolvesExistingDependencyWithoutRange(org.apache.maven.repository.internal.DefaultModelResolverTest)  Time elapsed: 0.038 s  <<< ERROR!
      java.lang.NoSuchMethodError: java.nio.ByteBuffer.flip()Ljava/nio/ByteBuffer;
              at org.apache.maven.repository.internal.DefaultModelResolverTest.testResolveDependencySuccessfullyResolvesExistingDependencyWithoutRange(DefaultModelResolverTest.java:198)
      
      [ERROR] testResolveParentSuccessfullyResolvesExistingParentWithoutRange(org.apache.maven.repository.internal.DefaultModelResolverTest)  Time elapsed: 0.031 s  <<< ERROR!
      java.lang.NoSuchMethodError: java.nio.ByteBuffer.flip()Ljava/nio/ByteBuffer;
              at org.apache.maven.repository.internal.DefaultModelResolverTest.testResolveParentSuccessfullyResolvesExistingParentWithoutRange(DefaultModelResolverTest.java:117)
      
      [ERROR] testResolveParentSuccessfullyResolvesExistingParentUsingHighestVersion(org.apache.maven.repository.internal.DefaultModelResolverTest)  Time elapsed: 0.047 s  <<< ERROR!
      java.lang.NoSuchMethodError: java.nio.ByteBuffer.flip()Ljava/nio/ByteBuffer;
              at org.apache.maven.repository.internal.DefaultModelResolverTest.testResolveParentSuccessfullyResolvesExistingParentUsingHighestVersion(DefaultModelResolverTest.java:128)
      
      [ERROR] testResolveDependencyThrowsUnresolvableModelExceptionWhenNoMatchingVersionFound(org.apache.maven.repository.internal.DefaultModelResolverTest)  Time elapsed: 0.038 s  <<< ERROR!
      java.lang.NoSuchMethodError: java.nio.ByteBuffer.flip()Ljava/nio/ByteBuffer;
              at org.apache.maven.repository.internal.DefaultModelResolverTest.testResolveDependencyThrowsUnresolvableModelExceptionWhenNoMatchingVersionFound(DefaultModelResolverTest.java:160)
      
      [ERROR] testResolveDependencySuccessfullyResolvesExistingDependencyUsingHighestVersion(org.apache.maven.repository.internal.DefaultModelResolverTest)  Time elapsed: 0.031 s  <<< ERROR!
      java.lang.NoSuchMethodError: java.nio.ByteBuffer.flip()Ljava/nio/ByteBuffer;
              at org.apache.maven.repository.internal.DefaultModelResolverTest.testResolveDependencySuccessfullyResolvesExistingDependencyUsingHighestVersion(DefaultModelResolverTest.java:209)
      
      [ERROR] testResolveDependencyThrowsUnresolvableModelExceptionWhenUsingRangesWithoutUpperBound(org.apache.maven.repository.internal.DefaultModelResolverTest)  Time elapsed: 0.032 s  <<< ERROR!
      java.lang.NoSuchMethodError: java.nio.ByteBuffer.flip()Ljava/nio/ByteBuffer;
              at org.apache.maven.repository.internal.DefaultModelResolverTest.testResolveDependencyThrowsUnresolvableModelExceptionWhenUsingRangesWithoutUpperBound(DefaultModelResolverTest.java:180)
      
      [ERROR] testResolveParentThrowsUnresolvableModelExceptionWhenNoMatchingVersionFound(org.apache.maven.repository.internal.DefaultModelResolverTest)  Time elapsed: 0.037 s  <<< ERROR!
      java.lang.NoSuchMethodError: java.nio.ByteBuffer.flip()Ljava/nio/ByteBuffer;
              at org.apache.maven.repository.internal.DefaultModelResolverTest.testResolveParentThrowsUnresolvableModelExceptionWhenNoMatchingVersionFound(DefaultModelResolverTest.java:79)
      
      [ERROR] testResolveParentThrowsUnresolvableModelExceptionWhenUsingRangesWithoutUpperBound(org.apache.maven.repository.internal.DefaultModelResolverTest)  Time elapsed: 0.016 s  <<< ERROR!
      java.lang.NoSuchMethodError: java.nio.ByteBuffer.flip()Ljava/nio/ByteBuffer;
              at org.apache.maven.repository.internal.DefaultModelResolverTest.testResolveParentThrowsUnresolvableModelExceptionWhenUsingRangesWithoutUpperBound(DefaultModelResolverTest.java:99)
      
      [INFO] Running org.apache.maven.repository.internal.DefaultVersionResolverTest
      [ERROR] Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0 s <<< FAILURE! - in org.apache.maven.repository.internal.DefaultVersionResolverTest
      [ERROR] testResolveSeparateInstalledClassifiedNonUniqueVersionedArtifacts(org.apache.maven.repository.internal.DefaultVersionResolverTest)  Time elapsed: 0 s  <<< ERROR!
      java.lang.NoSuchMethodError: java.nio.ByteBuffer.flip()Ljava/nio/ByteBuffer;
              at org.apache.maven.repository.internal.DefaultVersionResolverTest.testResolveSeparateInstalledClassifiedNonUniqueVersionedArtifacts(DefaultVersionResolverTest.java:59)
      
      [INFO] Running org.apache.maven.repository.internal.MavenRepositorySystemUtilsTest
      [INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 s - in org.apache.maven.repository.internal.MavenRepositorySystemUtilsTest
      [INFO] Running org.apache.maven.repository.internal.RemoteSnapshotMetadataTest
      [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.003 s - in org.apache.maven.repository.internal.RemoteSnapshotMetadataTest
      [INFO] Running org.apache.maven.repository.internal.RepositorySystemTest
      [ERROR] Tests run: 11, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0.271 s <<< FAILURE! - in org.apache.maven.repository.internal.RepositorySystemTest
      [ERROR] testCollectDependencies(org.apache.maven.repository.internal.RepositorySystemTest)  Time elapsed: 0 s  <<< ERROR!
      java.lang.NoSuchMethodError: java.nio.ByteBuffer.flip()Ljava/nio/ByteBuffer;
              at org.apache.maven.repository.internal.RepositorySystemTest.testCollectDependencies(RepositorySystemTest.java:122)
      
      [ERROR] testReadArtifactDescriptor(org.apache.maven.repository.internal.RepositorySystemTest)  Time elapsed: 0.028 s  <<< ERROR!
      java.lang.NoSuchMethodError: java.nio.ByteBuffer.flip()Ljava/nio/ByteBuffer;
              at org.apache.maven.repository.internal.RepositorySystemTest.testReadArtifactDescriptor(RepositorySystemTest.java:63)
      

      A similar issue has been reported here: https://github.com/hazelcast/hazelcast/issues/14214#issue-387286620

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: