0 Replies Latest reply on Nov 23, 2017 5:26 AM by Ondra Chaloupka

    Resolving artifact only from the local repository

    Ondra Chaloupka Expert

      Hi,

       

      I wonder if there is a way to say to ShrinkWrap to resolve an artifact only from local repository?

       

      I have this code

       

      File[] libs = Maven.resolver()
      .loadPomFromFile("pom.xml")
      .resolve("org.jboss.narayana.rts:lra-annotations")
      .withTransitivity().as(File.class);
      

       

      then the ShrikWrap resolution takes time. I know the artifact is in my local repo and I would like to advice to ShrikWrap to check only the local repo and fails if there is no such artifact. I know if there isn't, there is a trouble with my tests.

      Currently the resolution log looks[1] where places on different repositories are checked, spending time checking them.

       

      Thanks

      Ondra

       

      [1]

      Nov 23, 2017 10:39:19 AM org.jboss.shrinkwrap.resolver.impl.maven.logging.LogTransferListener transferFailed

      WARNING: Failed downloading org/jboss/narayana/rts/lra-annotations/5.7.2.Final-SNAPSHOT/maven-metadata.xml from http://repo1.maven.org/maven2/. Reason:

      org.eclipse.aether.transfer.MetadataNotFoundException: Could not find metadata org.jboss.narayana.rts:lra-annotations:5.7.2.Final-SNAPSHOT/maven-metadata.xml in central (http://repo1.maven.org/maven2)

      Nov 23, 2017 10:39:20 AM org.jboss.shrinkwrap.resolver.impl.maven.logging.LogTransferListener transferFailed

      WARNING: Failed downloading org/jboss/narayana/rts/lra-annotations/5.7.2.Final-SNAPSHOT/maven-metadata.xml from https://repository.jboss.org/nexus/content/repositories/thirdparty-releases/. Reason:

      org.eclipse.aether.transfer.MetadataNotFoundException: Could not find metadata org.jboss.narayana.rts:lra-annotations:5.7.2.Final-SNAPSHOT/maven-metadata.xml in jbossThirdParty (https://repository.jboss.org/nexus/content/repositories/thirdparty-releases/)

      Nov 23, 2017 10:39:20 AM org.jboss.shrinkwrap.resolver.impl.maven.logging.LogTransferListener transferFailed

      WARNING: Failed downloading org/jboss/narayana/rts/lra-annotations/5.7.2.Final-SNAPSHOT/maven-metadata.xml from https://repository.jboss.org/nexus/content/groups/public/. Reason:

      org.eclipse.aether.transfer.MetadataNotFoundException: Could not find metadata org.jboss.narayana.rts:lra-annotations:5.7.2.Final-SNAPSHOT/maven-metadata.xml in jboss-public-repository-group (https://repository.jboss.org/nexus/content/groups/public/)

      Nov 23, 2017 10:39:21 AM org.jboss.shrinkwrap.resolver.impl.maven.logging.LogTransferListener transferFailed

      WARNING: Failed downloading org/jboss/narayana/rts/lra-annotations/5.7.2.Final-SNAPSHOT/maven-metadata.xml from http://download.java.net/maven/2/. Reason:

      org.eclipse.aether.transfer.MetadataNotFoundException: Could not find metadata org.jboss.narayana.rts:lra-annotations:5.7.2.Final-SNAPSHOT/maven-metadata.xml in download-java-net (http://download.java.net/maven/2/)

      Nov 23, 2017 10:39:21 AM org.jboss.shrinkwrap.resolver.impl.maven.logging.LogTransferListener transferFailed

      WARNING: Failed downloading org/jboss/narayana/rts/lra-parent/5.7.2.Final-SNAPSHOT/maven-metadata.xml from http://repo1.maven.org/maven2/. Reason:

      org.eclipse.aether.transfer.MetadataNotFoundException: Could not find metadata org.jboss.narayana.rts:lra-parent:5.7.2.Final-SNAPSHOT/maven-metadata.xml in central (http://repo1.maven.org/maven2)

      Nov 23, 2017 10:39:22 AM org.jboss.shrinkwrap.resolver.impl.maven.logging.LogTransferListener transferFailed

      WARNING: Failed downloading org/jboss/narayana/rts/lra-parent/5.7.2.Final-SNAPSHOT/maven-metadata.xml from https://repository.jboss.org/nexus/content/repositories/thirdparty-releases/. Reason:

      org.eclipse.aether.transfer.MetadataNotFoundException: Could not find metadata org.jboss.narayana.rts:lra-parent:5.7.2.Final-SNAPSHOT/maven-metadata.xml in jbossThirdParty (https://repository.jboss.org/nexus/content/repositories/thirdparty-releases/)

      Nov 23, 2017 10:39:22 AM org.jboss.shrinkwrap.resolver.impl.maven.logging.LogTransferListener transferFailed

      WARNING: Failed downloading org/jboss/narayana/rts/lra-parent/5.7.2.Final-SNAPSHOT/maven-metadata.xml from https://repository.jboss.org/nexus/content/groups/public/. Reason:

      org.eclipse.aether.transfer.MetadataNotFoundException: Could not find metadata org.jboss.narayana.rts:lra-parent:5.7.2.Final-SNAPSHOT/maven-metadata.xml in jboss-public-repository-group (https://repository.jboss.org/nexus/content/groups/public/)

      Nov 23, 2017 10:39:24 AM org.jboss.shrinkwrap.resolver.impl.maven.logging.LogTransferListener transferFailed

      WARNING: Failed downloading org/jboss/narayana/rts/lra-parent/5.7.2.Final-SNAPSHOT/maven-metadata.xml from http://download.java.net/maven/2/. Reason:

      org.eclipse.aether.transfer.MetadataNotFoundException: Could not find metadata org.jboss.narayana.rts:lra-parent:5.7.2.Final-SNAPSHOT/maven-metadata.xml in download-java-net (http://download.java.net/maven/2/)

      Nov 23, 2017 10:39:24 AM org.jboss.shrinkwrap.resolver.impl.maven.logging.LogTransferListener transferFailed

      WARNING: Failed downloading org/jboss/narayana/rts/rest-tx/5.7.2.Final-SNAPSHOT/maven-metadata.xml from http://repo1.maven.org/maven2/. Reason:

      org.eclipse.aether.transfer.MetadataNotFoundException: Could not find metadata org.jboss.narayana.rts:rest-tx:5.7.2.Final-SNAPSHOT/maven-metadata.xml in central (http://repo1.maven.org/maven2)

      Nov 23, 2017 10:39:24 AM org.jboss.shrinkwrap.resolver.impl.maven.logging.LogTransferListener transferFailed

      WARNING: Failed downloading org/jboss/narayana/rts/rest-tx/5.7.2.Final-SNAPSHOT/maven-metadata.xml from https://repository.jboss.org/nexus/content/repositories/thirdparty-releases/. Reason:

      org.eclipse.aether.transfer.MetadataNotFoundException: Could not find metadata org.jboss.narayana.rts:rest-tx:5.7.2.Final-SNAPSHOT/maven-metadata.xml in jbossThirdParty (https://repository.jboss.org/nexus/content/repositories/thirdparty-releases/)

      Nov 23, 2017 10:39:24 AM org.jboss.shrinkwrap.resolver.impl.maven.logging.LogTransferListener transferFailed

      WARNING: Failed downloading org/jboss/narayana/rts/rest-tx/5.7.2.Final-SNAPSHOT/maven-metadata.xml from https://repository.jboss.org/nexus/content/groups/public/. Reason:

      org.eclipse.aether.transfer.MetadataNotFoundException: Could not find metadata org.jboss.narayana.rts:rest-tx:5.7.2.Final-SNAPSHOT/maven-metadata.xml in jboss-public-repository-group (https://repository.jboss.org/nexus/content/groups/public/)

      Nov 23, 2017 10:39:26 AM org.jboss.shrinkwrap.resolver.impl.maven.logging.LogTransferListener transferFailed

      WARNING: Failed downloading org/jboss/narayana/rts/rest-tx/5.7.2.Final-SNAPSHOT/maven-metadata.xml from http://download.java.net/maven/2/. Reason:

      org.eclipse.aether.transfer.MetadataNotFoundException: Could not find metadata org.jboss.narayana.rts:rest-tx:5.7.2.Final-SNAPSHOT/maven-metadata.xml in download-java-net (http://download.java.net/maven/2/)

      Nov 23, 2017 10:39:26 AM org.jboss.shrinkwrap.resolver.impl.maven.logging.LogTransferListener transferFailed

      WARNING: Failed downloading org/jboss/narayana/narayana-all/5.7.2.Final-SNAPSHOT/maven-metadata.xml from http://repo1.maven.org/maven2/. Reason:

      org.eclipse.aether.transfer.MetadataNotFoundException: Could not find metadata org.jboss.narayana:narayana-all:5.7.2.Final-SNAPSHOT/maven-metadata.xml in central (http://repo1.maven.org/maven2)

      Nov 23, 2017 10:39:27 AM org.jboss.shrinkwrap.resolver.impl.maven.logging.LogTransferListener transferFailed

      WARNING: Failed downloading org/jboss/narayana/narayana-all/5.7.2.Final-SNAPSHOT/maven-metadata.xml from https://repository.jboss.org/nexus/content/repositories/thirdparty-releases/. Reason:

      org.eclipse.aether.transfer.MetadataNotFoundException: Could not find metadata org.jboss.narayana:narayana-all:5.7.2.Final-SNAPSHOT/maven-metadata.xml in jbossThirdParty (https://repository.jboss.org/nexus/content/repositories/thirdparty-releases/)

      Nov 23, 2017 10:39:27 AM org.jboss.shrinkwrap.resolver.impl.maven.logging.LogTransferListener transferFailed

      WARNING: Failed downloading org/jboss/narayana/narayana-all/5.7.2.Final-SNAPSHOT/maven-metadata.xml from https://repository.jboss.org/nexus/content/groups/public/. Reason:

      org.eclipse.aether.transfer.MetadataNotFoundException: Could not find metadata org.jboss.narayana:narayana-all:5.7.2.Final-SNAPSHOT/maven-metadata.xml in jboss-public-repository-group (https://repository.jboss.org/nexus/content/groups/public/)

      Nov 23, 2017 10:39:29 AM org.jboss.shrinkwrap.resolver.impl.maven.logging.LogTransferListener transferFailed

      WARNING: Failed downloading org/jboss/narayana/narayana-all/5.7.2.Final-SNAPSHOT/maven-metadata.xml from http://download.java.net/maven/2/. Reason:

      org.eclipse.aether.transfer.MetadataNotFoundException: Could not find metadata org.jboss.narayana:narayana-all:5.7.2.Final-SNAPSHOT/maven-metadata.xml in download-java-net (http://download.java.net/maven/2/)