-
Bug
-
Resolution: Done
-
Major
-
2.2.0-beta-1
-
None
If I try to resolve org.eclipse.jetty:jetty-util:9.2.9.v20150224 from Aether using Shrinkwrap Resolver I get the following exceptions:
Mar 05, 2015 11:11:09 AM org.jboss.shrinkwrap.resolver.impl.maven.logging.LogTransferListener transferCorrupted
WARNING: Corrupted download of org/eclipse/jetty/jetty-util/maven-metadata.xml from http://repo1.maven.org/maven2/. Reason:
org.eclipse.aether.transfer.ChecksumFailureException: Checksum validation failed, expected aa9a47a6b065b471fa6302c2f031757fff2774d9 but is ab31eef7c4b6c6c2b074ba461bb816b776b95458
Mar 05, 2015 11:11:09 AM org.jboss.shrinkwrap.resolver.impl.maven.logging.LogTransferListener transferFailed
WARNING: Failed downloading org/eclipse/jetty/jetty-util/maven-metadata.xml from http://repo1.maven.org/maven2/. Reason:
org.eclipse.aether.transfer.MetadataTransferException: Could not transfer metadata org.eclipse.jetty:jetty-util/maven-metadata.xml from/to central (http://repo1.maven.org/maven2): NullPointerException
Mar 05, 2015 11:11:09 AM org.jboss.shrinkwrap.resolver.impl.maven.MavenWorkingSessionImpl resolveVersionRange
SEVERE: Version range request failed
org.eclipse.aether.transfer.MetadataNotFoundException: Could not find metadata org.eclipse.jetty:jetty-util/maven-metadata.xml in local (/home/stephane/.m2/repository)
at org.eclipse.aether.internal.impl.DefaultMetadataResolver.resolve(DefaultMetadataResolver.java:260)
at org.eclipse.aether.internal.impl.DefaultMetadataResolver.resolveMetadata(DefaultMetadataResolver.java:218)
at org.apache.maven.repository.internal.DefaultVersionRangeResolver.getVersions(DefaultVersionRangeResolver.java:232)
at org.apache.maven.repository.internal.DefaultVersionRangeResolver.resolveVersionRange(DefaultVersionRangeResolver.java:182)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveVersionRange(DefaultRepositorySystem.java:280)
at org.jboss.shrinkwrap.resolver.impl.maven.bootstrap.MavenRepositorySystem.resolveVersionRange(MavenRepositorySystem.java:148)
at org.jboss.shrinkwrap.resolver.impl.maven.MavenWorkingSessionImpl.resolveVersionRange(MavenWorkingSessionImpl.java:294)
at org.jboss.shrinkwrap.resolver.impl.maven.MavenResolveStageBaseImpl.resolveVersionRange(MavenResolveStageBaseImpl.java:36)
at org.jboss.shrinkwrap.resolver.impl.maven.PomlessResolveStageBaseImpl.resolveVersionRange(PomlessResolveStageBaseImpl.java:36)
at org.jboss.shrinkwrap.resolver.impl.maven.MavenResolveStageBaseImpl.resolveVersionRange(MavenResolveStageBaseImpl.java:16)
at org.jboss.shrinkwrap.resolver.impl.maven.MavenResolverSystemBaseImpl.resolveVersionRange(MavenResolverSystemBaseImpl.java:163)
at org.jboss.shrinkwrap.resolver.impl.maven.MavenResolverSystemBaseImpl.resolveVersionRange(MavenResolverSystemBaseImpl.java:44)
at com.redhat.ceylon.cmr.maven.AetherUtils.search(AetherUtils.java:316)
at com.redhat.ceylon.cmr.maven.AetherRepository.completeVersions(AetherRepository.java:118)
at com.redhat.ceylon.cmr.impl.AbstractNodeRepositoryManager.completeVersions(AbstractNodeRepositoryManager.java:532)
at com.redhat.ceylon.cmr.ceylon.RepoUsingTool.getModuleVersions(RepoUsingTool.java:213)
at com.redhat.ceylon.tools.info.CeylonInfoTool.run(CeylonInfoTool.java:250)
at com.redhat.ceylon.tools.test.InfoToolTests.testAetherModule(InfoToolTests.java:82)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)Mar 05, 2015 11:11:09 AM org.jboss.shrinkwrap.resolver.impl.maven.MavenWorkingSessionImpl resolveVersionRange
SEVERE: Version range request failed
org.eclipse.aether.transfer.MetadataTransferException: Could not transfer metadata org.eclipse.jetty:jetty-util/maven-metadata.xml from/to central (http://repo1.maven.org/maven2): NullPointerException
at org.eclipse.aether.connector.wagon.WagonRepositoryConnector$5.wrap(WagonRepositoryConnector.java:995)
at org.eclipse.aether.connector.wagon.WagonRepositoryConnector$5.wrap(WagonRepositoryConnector.java:983)
at org.eclipse.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:725)
at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
at org.jboss.shrinkwrap.resolver.impl.maven.logging.LogTransferListener.transferProgressed(LogTransferListener.java:81)
at org.eclipse.aether.connector.wagon.WagonTransferListenerAdapter.transferProgress(WagonTransferListenerAdapter.java:72)
at org.apache.maven.wagon.events.TransferEventSupport.fireTransferProgress(TransferEventSupport.java:121)
at org.apache.maven.wagon.AbstractWagon.fireTransferProgress(AbstractWagon.java:554)
at org.apache.maven.wagon.AbstractWagon.transfer(AbstractWagon.java:539)
at org.apache.maven.wagon.AbstractWagon.getTransfer(AbstractWagon.java:354)
at org.apache.maven.wagon.AbstractWagon.getTransfer(AbstractWagon.java:317)
at org.apache.maven.wagon.AbstractWagon.getTransfer(AbstractWagon.java:286)
at org.apache.maven.wagon.StreamWagon.getIfNewer(StreamWagon.java:97)
at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:61)
at org.eclipse.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:660)
... 4 moreMar 05, 2015 11:11:12 AM org.jboss.shrinkwrap.resolver.impl.maven.logging.LogTransferListener transferFailed
WARNING: Failed downloading javax/servlet/javax.servlet-api/3.1.0/javax.servlet-api-3.1.0.pom from https://oss.sonatype.org/content/groups/jetty/. Reason:
org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact javax.servlet:javax.servlet-api:pom:3.1.0 in sonatype-snapshots (https://oss.sonatype.org/content/groups/jetty)
Mar 05, 2015 11:11:13 AM org.jboss.shrinkwrap.resolver.impl.maven.logging.LogTransferListener transferFailed
WARNING: Failed downloading net/java/jvnet-parent/3/jvnet-parent-3.pom from https://oss.sonatype.org/content/groups/jetty/. Reason:
org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact net.java:jvnet-parent:pom:3 in sonatype-snapshots (https://oss.sonatype.org/content/groups/jetty)
Mar 05, 2015 11:11:14 AM org.jboss.shrinkwrap.resolver.impl.maven.logging.LogTransferListener transferFailed
WARNING: Failed downloading net/java/jvnet-parent/3/jvnet-parent-3.pom from http://download.java.net/maven/glassfish/. Reason:
org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact net.java:jvnet-parent:pom:3 in glassfish-repository (http://download.java.net/maven/glassfish)
Not sure if the checksum is a problem of Maven Central or not, but pretty sure the NPE is a bug. As for the ArtifactNotFoundException I can't make much sense of it.
The code I use is:
MavenVersionRangeResult resolveVersionRange = resolver.resolveVersionRange(groupId+":"+artifactId+":["+version+",]"); List<MavenCoordinate> versions = resolveVersionRange.getVersions();
With a resolver:
ConfigurableMavenResolverSystem factory = Resolvers.use(ConfigurableMavenResolverSystem.class, classLoader);
return factory.fromClassloaderResource(settings.xml, classLoader);
And settings.xml:
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> <localRepository/> <interactiveMode/> <usePluginRegistry/> <offline/> <pluginGroups/> <servers/> <mirrors/> <proxies/> <profiles/> <activeProfiles/> </settings>