4 Replies Latest reply on Oct 22, 2015 7:04 AM by mvitorovic

    Shrinkwrap and timestmaped snapshots

    mvitorovic

      Hi all,

       

      I'm trying to build a war containing some snapshots. The repository contains timestamped snapshots, but the shrinkwrap resolver is not picking them up. It is searching for non-timestamped snapshots through all known repositories.

       

              final File[] libraries = Maven.resolver().loadPomFromFile("pom.xml", "jboss").importRuntimeDependencies()
                                                          .resolve().withTransitivity().asFile();
      

       

      And running tests say:

      Oct 22, 2015 9:07:05 AM org.jboss.shrinkwrap.resolver.impl.maven.logging.LogTransferListener transferFailed
      WARNING: Failed downloading org/openepics/names-client/maven-metadata.xml from http://gwteventservice.googlecode.com/svn/maven/repository-snapshots/. Reason: 
      org.eclipse.aether.transfer.MetadataNotFoundException: Could not find metadata org.openepics:names-client/maven-metadata.xml in gwteventservice-snapshots (http://gwteventservice.googlecode.com/svn/maven/repository-snapshots/)
      (etc...)
      

       

      Any help on what to do is greatly appreciated.

       

      Br, Miha

        • 1. Re: Shrinkwrap and timestmaped snapshots
          mjobanek

          Hi,

          I'm trying to build a war containing some snapshots. The repository contains timestamped snapshots,

          What repository? Your local repository or the http://gwteventservice.googlecode.com/svn/maven/repository-snapshots/

          The warning says that there wasn't downloaded the org/openepics/names-client/maven-metadata.xml - the reason is that there is no org directory there in the repository.

          Could you provide the pom.xml file please?

          • 2. Re: Shrinkwrap and timestmaped snapshots
            mvitorovic

            Actually, it was a wrong appears to be working now. Sorry, false report.

             

            Just a couple of questions:

            • for snapshots the Shrinkwrap is always checking the repositories if there is a more recent version, right?
            • Why does it go through all the repositories reporting a bunch of errors in the process? Can it not determine where the current snapshot was downloaded?

            Thanks, Miha

            • 3. Re: Shrinkwrap and timestmaped snapshots
              mjobanek
              • for snapshots the Shrinkwrap is always checking the repositories if there is a more recent version, right?

              Well, it check whether the required artifact is in remote repository and if not it uses the one downloaded into local repository

              If you want to stop checking the remote repositories, you can use "offline mode":

              Maven.configureResolver().workOffline()
              

               

              • Why does it go through all the repositories reporting a bunch of errors in the process? Can it not determine where the current snapshot was downloaded?

              This is known bug https://issues.jboss.org/browse/SHRINKRES-199

              However, I'm afraid that it is hard to fix it - this behaviour is performed by Eclipse Aether itself. Aether is a library for working with maven artifact repositories and this library is used in ShrinkWrap Resolver.

              • 4. Re: Shrinkwrap and timestmaped snapshots
                mvitorovic

                Thanks.