Slow performance with ShrinkWrap
vmassol Jul 18, 2018 11:27 AMHi guys,
I'm using Shrinkwrap on XWiki and it's great. However it's very slow ATM and I'm wondering why. Doesn't Shrinkwrap check if the artifact is in the local repo or in the CP before checking in the maven remote repos specified? Is it possible to have this behavior?
Here's how I use Shrinkwrap:
List<MavenResolvedArtifact> artifacts = resolveArtifactWithDependencies(
String.format("org.xwiki.platform:xwiki-platform-distribution-war-dependencies:pom:%s", version));
protected List<MavenResolvedArtifact> resolveArtifactWithDependencies(String gav)
{
return getConfigurableMavenResolverSystem()
.resolve(gav)
.withTransitivity()
.asList(MavenResolvedArtifact.class);
}
protected ConfigurableMavenResolverSystem getConfigurableMavenResolverSystem()
{
return Maven.configureResolver()
.withClassPathResolution(true)
.withRemoteRepo(
"mavenXWikiSnapshot", "http://nexus.xwiki.org/nexus/content/groups/public-snapshots", "default")
.withRemoteRepo(
"mavenXWiki", "http://nexus.xwiki.org/nexus/content/groups/public", "default");
}
And in the logs I get tons of stuff like:
Jul 18, 2018 5:24:06 PM org.jboss.shrinkwrap.resolver.impl.maven.logging.LogTransferListener transferFailed
WARNING: Failed downloading org/xwiki/commons/xwiki-commons-pom/10.7-SNAPSHOT/maven-metadata.xml from https://repo1.maven.org/maven2/. Reason:
org.eclipse.aether.transfer.MetadataNotFoundException: Could not find metadata org.xwiki.commons:xwiki-commons-pom:10.7-SNAPSHOT/maven-metadata.xml in central (https://repo1.maven.org/maven2)
Jul 18, 2018 5:24:07 PM org.jboss.shrinkwrap.resolver.impl.maven.logging.LogTransferListener transferFailed
WARNING: Failed downloading org/xwiki/commons/xwiki-commons/10.7-SNAPSHOT/maven-metadata.xml from https://repo1.maven.org/maven2/. Reason:
org.eclipse.aether.transfer.MetadataNotFoundException: Could not find metadata org.xwiki.commons:xwiki-commons:10.7-SNAPSHOT/maven-metadata.xml in central (https://repo1.maven.org/maven2)
Jul 18, 2018 5:24:07 PM org.jboss.shrinkwrap.resolver.impl.maven.logging.AetherLoggerFactory$Logger warn
WARNING: Unknown repository update policy '', assuming 'never'
Jul 18, 2018 5:24:07 PM org.jboss.shrinkwrap.resolver.impl.maven.logging.AetherLoggerFactory$Logger warn
WARNING: Unknown repository update policy '', assuming 'never'
Jul 18, 2018 5:24:07 PM org.jboss.shrinkwrap.resolver.impl.maven.logging.LogTransferListener transferFailed
WARNING: Failed downloading org/xwiki/platform/xwiki-platform-distribution-war-dependencies/10.7-SNAPSHOT/maven-metadata.xml from https://repo1.maven.org/maven2/. Reason:
org.eclipse.aether.transfer.MetadataNotFoundException: Could not find metadata org.xwiki.platform:xwiki-platform-distribution-war-dependencies:10.7-SNAPSHOT/maven-metadata.xml in central (https://repo1.maven.org/maven2)
Jul 18, 2018 5:24:07 PM org.jboss.shrinkwrap.resolver.impl.maven.logging.LogTransferListener transferFailed
WARNING: Failed downloading org/xwiki/platform/xwiki-platform-distribution-war-dependencies/10.7-SNAPSHOT/maven-metadata.xml from http://nexus.xwiki.org/nexus/content/groups/public/. Reason:
org.eclipse.aether.transfer.MetadataNotFoundException: Could not find metadata org.xwiki.platform:xwiki-platform-distribution-war-dependencies:10.7-SNAPSHOT/maven-metadata.xml in mavenXWiki (http://nexus.xwiki.org/nexus/content/groups/public)
Jul 18, 2018 5:24:07 PM org.jboss.shrinkwrap.resolver.impl.maven.logging.AetherLoggerFactory$Logger warn
WARNING: Unknown repository update policy '', assuming 'never'
Jul 18, 2018 5:24:07 PM org.jboss.shrinkwrap.resolver.impl.maven.logging.AetherLoggerFactory$Logger warn
WARNING: Unknown repository update policy '', assuming 'never'
Jul 18, 2018 5:24:07 PM org.jboss.shrinkwrap.resolver.impl.maven.logging.AetherLoggerFactory$Logger warn
WARNING: Unknown repository update policy '', assuming 'never'
Jul 18, 2018 5:24:07 PM org.jboss.shrinkwrap.resolver.impl.maven.logging.LogTransferListener transferFailed
WARNING: Failed downloading org/xwiki/platform/xwiki-platform-distribution/10.7-SNAPSHOT/maven-metadata.xml from http://nexus.xwiki.org/nexus/content/groups/public/. Reason:
org.eclipse.aether.transfer.MetadataNotFoundException: Could not find metadata org.xwiki.platform:xwiki-platform-distribution:10.7-SNAPSHOT/maven-metadata.xml in mavenXWiki (http://nexus.xwiki.org/nexus/content/groups/public)
Jul 18, 2018 5:24:07 PM org.jboss.shrinkwrap.resolver.impl.maven.logging.LogTransferListener transferFailed
WARNING: Failed downloading org/xwiki/platform/xwiki-platform-distribution/10.7-SNAPSHOT/maven-metadata.xml from https://repo1.maven.org/maven2/. Reason:
org.eclipse.aether.transfer.MetadataNotFoundException: Could not find metadata org.xwiki.platform:xwiki-platform-distribution:10.7-SNAPSHOT/maven-metadata.xml in central (https://repo1.maven.org/maven2)
Jul 18, 2018 5:24:07 PM org.jboss.shrinkwrap.resolver.impl.maven.logging.AetherLoggerFactory$Logger warn
[...]
Thanks for any help
-Vincent