I've found the issue. The SNAPSHOT jars were corrupted. Everything works fine now that I uploaded working jar files.
daniel.mfreitas wrote: > > Hello all. I'm having some issues with Ivy. I installed Artifactory and I > have my repositories working. I can fetch the repositories by using a > browser or Maven, but when I try to retrieve SNAPSHOTs versions of our > custom libraries, Ivy returns the error: > > [ivy:retrieve] :: com.mycompany#myartifact;1.0-SNAPSHOT: several > problems occured while resolving dependency: > com.mycompany#myartifact;1.0-SNAPSHOT {default=[default]}: > [ivy:retrieve] Index: 0, Size: 0 > [ivy:retrieve] Index: 0, Size: 0 > [ivy:retrieve] Index: 0, Size: 0 > [ivy:retrieve] :::::::::::::::::::::::::::::::::::::::::::::: > > The DEBUG option in ant only give me this additional relevant info: > > C:\dev\projects\training\myproject-in-ivy\server\build.xml:169: impossible > to resolve dependencies: > resolve failed - see output for details > at org.apache.ivy.ant.IvyResolve.doExecute(IvyResolve.java:315) > at org.apache.ivy.ant.IvyTask.execute(IvyTask.java:277) > at > org.apache.ivy.ant.IvyPostResolveTask.ensureResolved(IvyPostResolveTask.java:207) > at > org.apache.ivy.ant.IvyPostResolveTask.prepareAndCheck(IvyPostResolveTask.java:154) > at org.apache.ivy.ant.IvyRetrieve.doExecute(IvyRetrieve.java:49) > at org.apache.ivy.ant.IvyTask.execute(IvyTask.java:277) > at > org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) > at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105) > at org.apache.tools.ant.Task.perform(Task.java:348) > at org.apache.tools.ant.Target.execute(Target.java:357) > at org.apache.tools.ant.Target.performTasks(Target.java:385) > at > org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329) > at org.apache.tools.ant.Project.executeTarget(Project.java:1298) > at > org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) > at org.apache.tools.ant.Project.executeTargets(Project.java:1181) > at org.apache.tools.ant.Main.runBuild(Main.java:698) > at org.apache.tools.ant.Main.startAnt(Main.java:199) > at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257) > at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104) > Caused by: resolve failed - see output for details > at org.apache.ivy.ant.IvyResolve.doExecute(IvyResolve.java:241) > ... 21 more > --- Nested Exception --- > resolve failed - see output for details > at org.apache.ivy.ant.IvyResolve.doExecute(IvyResolve.java:241) > at org.apache.ivy.ant.IvyTask.execute(IvyTask.java:277) > at > org.apache.ivy.ant.IvyPostResolveTask.ensureResolved(IvyPostResolveTask.java:207) > at > org.apache.ivy.ant.IvyPostResolveTask.prepareAndCheck(IvyPostResolveTask.java:154) > at org.apache.ivy.ant.IvyRetrieve.doExecute(IvyRetrieve.java:49) > at org.apache.ivy.ant.IvyTask.execute(IvyTask.java:277) > at > org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) > at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105) > at org.apache.tools.ant.Task.perform(Task.java:348) > at org.apache.tools.ant.Target.execute(Target.java:357) > at org.apache.tools.ant.Target.performTasks(Target.java:385) > at > org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329) > at org.apache.tools.ant.Project.executeTarget(Project.java:1298) > at > org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) > at org.apache.tools.ant.Project.executeTargets(Project.java:1181) > at org.apache.tools.ant.Main.runBuild(Main.java:698) > at org.apache.tools.ant.Main.startAnt(Main.java:199) > at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257) > at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104) > > Strangely enough. If I upload a 1.0 version of my artifact to artifactory > and use Ivy to fetch it and store it in the cache, and THEN ask it to > retrieve the SNAPSHOT it works as expected. > > Here's my settings: > > ====ivy.xml======== > <?xml version="1.0" encoding="ISO-8859-1"?> > <ivy-module version="2.0" xmlns:m="http://ant.apache.org/ivy/maven"> > <info organisation="my.company" module="myproject" /> > <configurations> > <conf name="default" transitive="false" /> > </configurations> > <dependencies defaultconf="default"> > > ... Lots of commons dependencies working OK ... > > <!-- Doesn't work unless revision 1.0 is present in Ivy cache --> > <dependency org="com.mycompany" name="myartifact" > rev="1.0-SNAPSHOT"/> > </dependencies> > </ivy-module> > > ====ivysettings.xml======== > > <ivysettings> > <property name="ivy.checksums" value="" /> > <property name="maven2.repository.url" > value="http://localhost:8081/artifactory/maven2-repos/" /> > <property name="maven1.pattern.jars" > value="[organisation]/jars/[module]-[revision](-[classifier]).[ext]" /> > <property name="maven2.pattern.jars" > value="[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]" > /> > > <settings defaultResolver="chained" defaultConflictManager="all"/> > <resolvers> > <chain name="chained" returnFirst="true"> > <ibiblio name="mycompany-repository" m2compatible="true" > usepoms="false" root="http://localhost:8081/artifactory/local-repos/" > pattern="${maven2.pattern.jars}"/> > <ibiblio name="maven2-repository" m2compatible="true" > usepoms="false" root="http://localhost:8081/artifactory/maven2-repos/" > pattern="${maven2.pattern.jars}" /> > <ibiblio name="maven1-repository" m2compatible="false" > root="http://localhost:8081/artifactory/maven1-repos/" > pattern="${maven1.pattern.jars}" /> > </chain> > </resolvers> > </ivysettings> > > Any ideas where the problem might be? > -- View this message in context: http://www.nabble.com/Ivy-fails-to-retrieve-SNAPSHOT-if-local-cache-does-not-have-non-SNAPSHOT-artifacts-tp22083351p22084990.html Sent from the ivy-user mailing list archive at Nabble.com.