[ https://issues.apache.org/jira/browse/MRESOLVER-171?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Osipov updated MRESOLVER-171: ------------------------------------- Fix Version/s: 1.6.3 > Resolver fails when compiled on Java 9+ and run on Java 8 due to JDK API > breakage > --------------------------------------------------------------------------------- > > Key: MRESOLVER-171 > URL: https://issues.apache.org/jira/browse/MRESOLVER-171 > Project: Maven Resolver > Issue Type: Bug > Components: Resolver > Affects Versions: 1.6.2 > Reporter: Michael Osipov > Assignee: Michael Osipov > Priority: Major > Fix For: 1.6.3, 1.7.0 > > > When Resolver is compiled with Java 9+ and run with Maven core or something > else with Java 8 one can observe the following: > {noformat} > [ERROR] Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.488 > s <<< FAILURE! - in > org.apache.maven.repository.internal.DefaultVersionResolverTest > [ERROR] testResolveSeparateInstalledClassifiedNonUniqueVersionedArtifacts > Time elapsed: 0.243 s <<< ERROR! > java.lang.NoSuchMethodError: java.nio.ByteBuffer.mark()Ljava/nio/ByteBuffer; > at > org.apache.maven.repository.internal.DefaultVersionResolverTest.testResolveSeparateInstalledClassifiedNonUniqueVersionedArtifacts(DefaultVersionResolverTest.java:50) > [INFO] Running org.apache.maven.repository.internal.DefaultModelResolverTest > [ERROR] Tests run: 10, Failures: 4, Errors: 4, Skipped: 0, Time elapsed: > 0.729 s <<< FAILURE! - in > org.apache.maven.repository.internal.DefaultModelResolverTest > [ERROR] > testResolveDependencySuccessfullyResolvesExistingDependencyWithoutRange Time > elapsed: 0.075 s <<< ERROR! > java.lang.NoSuchMethodError: java.nio.ByteBuffer.mark()Ljava/nio/ByteBuffer; > at > org.apache.maven.repository.internal.DefaultModelResolverTest.testResolveDependencySuccessfullyResolvesExistingDependencyWithoutRange(DefaultModelResolverTest.java:186) > [ERROR] testResolveParentSuccessfullyResolvesExistingParentWithoutRange Time > elapsed: 0.07 s <<< ERROR! > java.lang.NoSuchMethodError: java.nio.ByteBuffer.mark()Ljava/nio/ByteBuffer; > at > org.apache.maven.repository.internal.DefaultModelResolverTest.testResolveParentSuccessfullyResolvesExistingParentWithoutRange(DefaultModelResolverTest.java:114) > [ERROR] > testResolveParentSuccessfullyResolvesExistingParentUsingHighestVersion Time > elapsed: 0.089 s <<< ERROR! > java.lang.NoSuchMethodError: java.nio.ByteBuffer.mark()Ljava/nio/ByteBuffer; > at > org.apache.maven.repository.internal.DefaultModelResolverTest.testResolveParentSuccessfullyResolvesExistingParentUsingHighestVersion(DefaultModelResolverTest.java:126) > [ERROR] > testResolveDependencyThrowsUnresolvableModelExceptionWhenNoMatchingVersionFound > Time elapsed: 0.068 s <<< FAILURE! > org.opentest4j.AssertionFailedError: Expected 'UnresolvableModelException' > not thrown. ==> Unexpected exception type thrown ==> expected: > <org.apache.maven.model.resolution.UnresolvableModelException> but was: > <java.lang.NoSuchMethodError> > at > org.apache.maven.repository.internal.DefaultModelResolverTest.testResolveDependencyThrowsUnresolvableModelExceptionWhenNoMatchingVersionFound(DefaultModelResolverTest.java:154) > Caused by: java.lang.NoSuchMethodError: > java.nio.ByteBuffer.mark()Ljava/nio/ByteBuffer; > at > org.apache.maven.repository.internal.DefaultModelResolverTest.lambda$testResolveDependencyThrowsUnresolvableModelExceptionWhenNoMatchingVersionFound$4(DefaultModelResolverTest.java:156) > at > org.apache.maven.repository.internal.DefaultModelResolverTest.testResolveDependencyThrowsUnresolvableModelExceptionWhenNoMatchingVersionFound(DefaultModelResolverTest.java:154) > [ERROR] > testResolveDependencySuccessfullyResolvesExistingDependencyUsingHighestVersion > Time elapsed: 0.06 s <<< ERROR! > java.lang.NoSuchMethodError: java.nio.ByteBuffer.mark()Ljava/nio/ByteBuffer; > at > org.apache.maven.repository.internal.DefaultModelResolverTest.testResolveDependencySuccessfullyResolvesExistingDependencyUsingHighestVersion(DefaultModelResolverTest.java:198) > [ERROR] > testResolveDependencyThrowsUnresolvableModelExceptionWhenUsingRangesWithoutUpperBound > Time elapsed: 0.061 s <<< FAILURE! > org.opentest4j.AssertionFailedError: Expected 'UnresolvableModelException' > not thrown. ==> Unexpected exception type thrown ==> expected: > <org.apache.maven.model.resolution.UnresolvableModelException> but was: > <java.lang.NoSuchMethodError> > at > org.apache.maven.repository.internal.DefaultModelResolverTest.testResolveDependencyThrowsUnresolvableModelExceptionWhenUsingRangesWithoutUpperBound(DefaultModelResolverTest.java:170) > Caused by: java.lang.NoSuchMethodError: > java.nio.ByteBuffer.mark()Ljava/nio/ByteBuffer; > at > org.apache.maven.repository.internal.DefaultModelResolverTest.lambda$testResolveDependencyThrowsUnresolvableModelExceptionWhenUsingRangesWithoutUpperBound$5(DefaultModelResolverTest.java:172) > at > org.apache.maven.repository.internal.DefaultModelResolverTest.testResolveDependencyThrowsUnresolvableModelExceptionWhenUsingRangesWithoutUpperBound(DefaultModelResolverTest.java:170) > [ERROR] > testResolveParentThrowsUnresolvableModelExceptionWhenNoMatchingVersionFound > Time elapsed: 0.048 s <<< FAILURE! > org.opentest4j.AssertionFailedError: Expected 'UnresolvableModelException' > not thrown. ==> Unexpected exception type thrown ==> expected: > <org.apache.maven.model.resolution.UnresolvableModelException> but was: > <java.lang.NoSuchMethodError> > at > org.apache.maven.repository.internal.DefaultModelResolverTest.testResolveParentThrowsUnresolvableModelExceptionWhenNoMatchingVersionFound(DefaultModelResolverTest.java:81) > Caused by: java.lang.NoSuchMethodError: > java.nio.ByteBuffer.mark()Ljava/nio/ByteBuffer; > at > org.apache.maven.repository.internal.DefaultModelResolverTest.lambda$testResolveParentThrowsUnresolvableModelExceptionWhenNoMatchingVersionFound$1(DefaultModelResolverTest.java:83) > at > org.apache.maven.repository.internal.DefaultModelResolverTest.testResolveParentThrowsUnresolvableModelExceptionWhenNoMatchingVersionFound(DefaultModelResolverTest.java:81) > [ERROR] > testResolveParentThrowsUnresolvableModelExceptionWhenUsingRangesWithoutUpperBound > Time elapsed: 0.037 s <<< FAILURE! > org.opentest4j.AssertionFailedError: Expected 'UnresolvableModelException' > not thrown. ==> Unexpected exception type thrown ==> expected: > <org.apache.maven.model.resolution.UnresolvableModelException> but was: > <java.lang.NoSuchMethodError> > at > org.apache.maven.repository.internal.DefaultModelResolverTest.testResolveParentThrowsUnresolvableModelExceptionWhenUsingRangesWithoutUpperBound(DefaultModelResolverTest.java:98) > Caused by: java.lang.NoSuchMethodError: > java.nio.ByteBuffer.mark()Ljava/nio/ByteBuffer; > at > org.apache.maven.repository.internal.DefaultModelResolverTest.lambda$testResolveParentThrowsUnresolvableModelExceptionWhenUsingRangesWithoutUpperBound$2(DefaultModelResolverTest.java:100) > at > org.apache.maven.repository.internal.DefaultModelResolverTest.testResolveParentThrowsUnresolvableModelExceptionWhenUsingRangesWithoutUpperBound(DefaultModelResolverTest.java:98) > [INFO] Running org.apache.maven.repository.internal.RemoteSnapshotMetadataTest > [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 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.603 s <<< FAILURE! - in > org.apache.maven.repository.internal.RepositorySystemTest > [ERROR] testCollectDependencies Time elapsed: 0.038 s <<< ERROR! > java.lang.NoSuchMethodError: java.nio.ByteBuffer.mark()Ljava/nio/ByteBuffer; > at > org.apache.maven.repository.internal.RepositorySystemTest.testCollectDependencies(RepositorySystemTest.java:133) > [ERROR] testReadArtifactDescriptor Time elapsed: 0.069 s <<< ERROR! > java.lang.NoSuchMethodError: java.nio.ByteBuffer.mark()Ljava/nio/ByteBuffer; > at > org.apache.maven.repository.internal.RepositorySystemTest.testReadArtifactDescriptor(RepositorySystemTest.java:73) > [INFO] Running > org.apache.maven.repository.internal.DefaultArtifactDescriptorReaderTest > [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.877 > s <<< FAILURE! - in > org.apache.maven.repository.internal.DefaultArtifactDescriptorReaderTest > [ERROR] testMng5459 Time elapsed: 0.877 s <<< ERROR! > java.lang.NoSuchMethodError: java.nio.ByteBuffer.mark()Ljava/nio/ByteBuffer; > at > org.apache.maven.repository.internal.DefaultArtifactDescriptorReaderTest.testMng5459(DefaultArtifactDescriptorReaderTest.java:60) > [INFO] Running > org.apache.maven.repository.internal.MavenRepositorySystemUtilsTest > [INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.007 > s - in org.apache.maven.repository.internal.MavenRepositorySystemUtilsTest > [INFO] > [INFO] Results: > [INFO] > [ERROR] Failures: > [ERROR] > DefaultModelResolverTest.testResolveDependencyThrowsUnresolvableModelExceptionWhenNoMatchingVersionFound:154 > Expected 'UnresolvableModelException' not thrown. ==> Unexpected exception > type thrown ==> expected: > <org.apache.maven.model.resolution.UnresolvableModelException> but was: > <java.lang.NoSuchMethodError> > [ERROR] > DefaultModelResolverTest.testResolveDependencyThrowsUnresolvableModelExceptionWhenUsingRangesWithoutUpperBound:170 > Expected 'UnresolvableModelException' not thrown. ==> Unexpected exception > type thrown ==> expected: > <org.apache.maven.model.resolution.UnresolvableModelException> but was: > <java.lang.NoSuchMethodError> > [ERROR] > DefaultModelResolverTest.testResolveParentThrowsUnresolvableModelExceptionWhenNoMatchingVersionFound:81 > Expected 'UnresolvableModelException' not thrown. ==> Unexpected exception > type thrown ==> expected: > <org.apache.maven.model.resolution.UnresolvableModelException> but was: > <java.lang.NoSuchMethodError> > [ERROR] > DefaultModelResolverTest.testResolveParentThrowsUnresolvableModelExceptionWhenUsingRangesWithoutUpperBound:98 > Expected 'UnresolvableModelException' not thrown. ==> Unexpected exception > type thrown ==> expected: > <org.apache.maven.model.resolution.UnresolvableModelException> but was: > <java.lang.NoSuchMethodError> > [ERROR] Errors: > [ERROR] DefaultArtifactDescriptorReaderTest.testMng5459:60 » NoSuchMethod > java.nio.Byt... > [ERROR] > DefaultModelResolverTest.testResolveDependencySuccessfullyResolvesExistingDependencyUsingHighestVersion:198 > » NoSuchMethod > [ERROR] > DefaultModelResolverTest.testResolveDependencySuccessfullyResolvesExistingDependencyWithoutRange:186 > » NoSuchMethod > [ERROR] > DefaultModelResolverTest.testResolveParentSuccessfullyResolvesExistingParentUsingHighestVersion:126 > » NoSuchMethod > [ERROR] > DefaultModelResolverTest.testResolveParentSuccessfullyResolvesExistingParentWithoutRange:114 > » NoSuchMethod > [ERROR] > DefaultVersionResolverTest.testResolveSeparateInstalledClassifiedNonUniqueVersionedArtifacts:50 > » NoSuchMethod > [ERROR] RepositorySystemTest.testCollectDependencies:133 » NoSuchMethod > java.nio.ByteB... > [ERROR] RepositorySystemTest.testReadArtifactDescriptor:73 » NoSuchMethod > java.nio.Byt... > [INFO] > [ERROR] Tests run: 27, Failures: 4, Errors: 8, Skipped: 0 > {noformat} > A similar issue has been reported here: > [https://github.com/hazelcast/hazelcast/issues/14214#issue-387286620] -- This message was sent by Atlassian Jira (v8.3.4#803005)