I am trying to set up Maven with a Repository located in our local Network and I already have set up a Repository for snapshots and one for Releases (both apache archiva).
Downloading the packages from the release repository works fine. However I keep getting errors, when I try to load SNAPSHOT versions from the snapshot repository, when I try to download a SNAPSHOT I deployed myself:
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.
Missing:
----------
1) my.company:product2:jar.lastUpdated:0.0.2-SNAPSHOT
Try downloading the file manually from the project website.
[...]
Path to dependency:
1) my.company:product1:war:0.0.1-SNAPSHOT
2) my.company:product2:jar.lastUpdated:0.0.2-SNAPSHOT
----------
1 required artifact is missing.
for artifact:
my.company:product1:war:0.0.1-SNAPSHOT
from the specified remote repositories:
my-internal (http://my-repo:8080/archiva/repository/internal),
central (http://repo1.maven.org/maven2),
my-snapshots (http://my-repo:8080/archiva/repository/snapshots),
The package is available in the snapshots-repo, network is up, login works fine.
My pom.xml looks like this:
[...]
<repositories>
<repository>
<id>my-snapshots</id>
<name>my name Snapshots Repository</name>
<url>http://my-snapshots:8080/archiva/repository/snapshots</url>
<snapshots>
<enabled/>
<updatePolicy/>
<checksumPolicy/>
</snapshots>
</repository>
<repository>
<id>my-internal</id>
<name>my name internal Repository</name>
<url>http://my-repo:8080/archiva/repository/internal</url>
</repository>
</repositories>
[...]
<dependency>
<groupId>my.company</groupId>
<artifactId>frontend-api</artifactId>
<version>0.0.2-SNAPSHOT</version>
<type>jar.lastUpdated</type>
</dependency>
[...]
I checked also the maven-metadata.xml that was downloaded from the snapshot-repo:
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<groupId>my.company</groupId>
<artifactId>product2</artifactId>
<version>0.0.2-SNAPSHOT</version>
<versioning>
<snapshot>
<buildNumber>7</buildNumber>
<timestamp>20090824.130209</timestamp>
</snapshot>
<lastUpdated>20090824130209</lastUpdated>
</versioning>
</metadata>
It shows the correct date and timestamp (a package containing this timestamp is present in the repo).
Am I missing something concerning the repository setup or the SNAPSHOT concept? Did anybody had the same problem? Or does somebody know about some detailed documentation about SNAPSHOTs and Repositories?