You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by Georges Labrèche <gl...@stream57.com> on 2009/04/16 22:54:21 UTC
Retrieving Time Stamped Snapshots
Hello,
I'm Trying to resolve my Ivy snapshot artifact retrieval issues and stumbled on the following archived mail:
http://www.nabble.com/How-to-retrieve-updated-snapshot-builds-from-a-Maven-repo--td21374500.html
Basically I have been having the same issue even when implementing the fix that has been elaborated by Lez.
I am using Archiva as my Artifact Repository Manager (http://archiva.apache.org/)
This is what I have:
In my ivysettings.xml:
<chain name="archiva-chain" changingPattern=".*-SNAPSHOT" checkmodified="true">
<ibiblio name="archiva-internal"
m2compatible="true"
root="http://localhost:8081/archiva/repository/internal/"/>
<ibiblio name=" archiva-snapshots"
m2compatible="true"
root="http://localhost:8081/archiva/repository/snapshots/"/>
</chain>
In my ivy.xml
<dependency org="company " name="artifact" rev="1.0-SNAPSHOT" changing="true">
<artifact name="artifact" type="dll" ext="dll"/>
</dependency>
My snapshots folder in http://localhost:8081/archiva/repository/snapshots/ contains the "company" folder which itself contains the "artifact" folder which itself contains the "1.0-SNAPSHOT" folder with the maven-metadata.xml that looks like so:
<metadata>
<groupId>company</groupId>
<artifactId>artifact</artifactId>
<versioning>
<latest>1.0-SNAPSHOT</latest>
<snapshot>
<buildNumber>1</buildNumber>
<timestamp>20090415.193900</timestamp>
</snapshot>
<versions>
<version>1.0-SNAPSHOT</version>
</versions>
<lastUpdated>20090415193900</lastUpdated>
</versioning>
</metadata>
In the 1.0-SNAPSHOT folder I have my artifact file: artifact-1.0-20090415.193900-1.dll.
When executing and ivy retrieve from the CLI, the console output informs me that it is trying to retrieve the following file:
http://localhost:8081/archiva/repository/snapshots/company/artifact/1.0-SNAPSHOT/artifact -1.0-SNAPSHOT.dll <http://localhost:8081/archiva/repository/snapshots/company/artifact/1.0-SNAPSHOT/artifact%20-1.0-SNAPSHOT.dll>
Which obviously does not work because such a file does not exist; when dealing with snapshots, we are using time stamps and the filename of the artifact is artifact-1.0-20090415.193900-1.dll, not artifact-1.0-SNAPSHOT.dll. Somehow it seems that the resolver is not reading the maven-metadata.xml file to figure out which time stamped artifact file to retrieve.
I've tried explicitly setting the pattern and usepoms attributes in the ibiblio resolver but not dice:
<ibiblio name="snapshots"
m2compatible="true"
root="http://localhost:8081/archiva/repository/snapshots/"
pattern="[organization]/[module]/[revision]/[artifact]-[revision].[ext]"
usepoms="true"/>
Any ideas?
Thanks and regards
- Georges
RE: Retrieving Time Stamped Snapshots
Posted by Georges Labrèche <gl...@stream57.com>.
Hello,
I have resolved the issue with two fixes:
Fix number one:
In the repository, the folder containing the artifact (the "1.0-SNAPSHOT" folder) should also contain the maven-metadata.xml file.
With Archiva this file is automatically included if we choose to generate a POM when uploading the artifact (which I had not done)
Fix number two:
The value for the changingPattern attribute was erroneous.
It should be ".*SNAPSHOT" instead of ".*-SNAPSHOT"
I hope this helps as a reference!
Thanks and Regards,
- Georges
-----Original Message-----
From: Georges Labrèche [mailto:glabreche@stream57.com]
Sent: Thursday, April 16, 2009 4:54 PM
To: ivy-user@ant.apache.org
Cc: lhazlewood@apache.org
Subject: Retrieving Time Stamped Snapshots
Hello,
I'm Trying to resolve my Ivy snapshot artifact retrieval issues and stumbled on the following archived mail:
http://www.nabble.com/How-to-retrieve-updated-snapshot-builds-from-a-Maven-repo--td21374500.html
Basically I have been having the same issue even when implementing the fix that has been elaborated by Lez.
I am using Archiva as my Artifact Repository Manager (http://archiva.apache.org/)
This is what I have:
In my ivysettings.xml:
<chain name="archiva-chain" changingPattern=".*-SNAPSHOT" checkmodified="true">
<ibiblio name="archiva-internal"
m2compatible="true"
root="http://localhost:8081/archiva/repository/internal/"/>
<ibiblio name=" archiva-snapshots"
m2compatible="true"
root="http://localhost:8081/archiva/repository/snapshots/"/>
</chain>
In my ivy.xml
<dependency org="company " name="artifact" rev="1.0-SNAPSHOT" changing="true">
<artifact name="artifact" type="dll" ext="dll"/>
</dependency>
My snapshots folder in http://localhost:8081/archiva/repository/snapshots/ contains the "company" folder which itself contains the "artifact" folder which itself contains the "1.0-SNAPSHOT" folder with the maven-metadata.xml that looks like so:
<metadata>
<groupId>company</groupId>
<artifactId>artifact</artifactId>
<versioning>
<latest>1.0-SNAPSHOT</latest>
<snapshot>
<buildNumber>1</buildNumber>
<timestamp>20090415.193900</timestamp>
</snapshot>
<versions>
<version>1.0-SNAPSHOT</version>
</versions>
<lastUpdated>20090415193900</lastUpdated>
</versioning>
</metadata>
In the 1.0-SNAPSHOT folder I have my artifact file: artifact-1.0-20090415.193900-1.dll.
When executing and ivy retrieve from the CLI, the console output informs me that it is trying to retrieve the following file:
http://localhost:8081/archiva/repository/snapshots/company/artifact/1.0-SNAPSHOT/artifact -1.0-SNAPSHOT.dll <http://localhost:8081/archiva/repository/snapshots/company/artifact/1.0-SNAPSHOT/artifact%20-1.0-SNAPSHOT.dll>
Which obviously does not work because such a file does not exist; when dealing with snapshots, we are using time stamps and the filename of the artifact is artifact-1.0-20090415.193900-1.dll, not artifact-1.0-SNAPSHOT.dll. Somehow it seems that the resolver is not reading the maven-metadata.xml file to figure out which time stamped artifact file to retrieve.
I've tried explicitly setting the pattern and usepoms attributes in the ibiblio resolver but not dice:
<ibiblio name="snapshots"
m2compatible="true"
root="http://localhost:8081/archiva/repository/snapshots/"
pattern="[organization]/[module]/[revision]/[artifact]-[revision].[ext]"
usepoms="true"/>
Any ideas?
Thanks and regards
- Georges