Jeffrey Hagelberg created MRM-1849:
--------------------------------------
Summary: Unable to download -SNAPSHOT jars after 2.0.1 Upgrade
Key: MRM-1849
URL: https://jira.codehaus.org/browse/MRM-1849
Project: Archiva
Issue Type: Bug
Components: Metadata Repository
Affects Versions: 2.0.1
Environment: redhat, Archiva 2.0.1 in tomcat 8.0.9
Reporter: Jeffrey Hagelberg
Priority: Critical
We previously had SNAPSHOT artifacts that were uploaded to Archiva 1.3.6 and
stored without a timestamp in the name. The repository directory for these
looks something like this:
root@somehostname:/apt/iis-maven-repo/archiva-managed-repositories/snapshots/com/whatever/my-artifact/9.1.0.2-SNAPSHOT$
ls -al
total 44
drwxr-xr-x 2 root root 4096 Jun 7 2013 .
drwxr-xr-x 9 root root 4096 Oct 21 2013 ..
-rw-r--r-- 1 root root 2274 Jun 7 2013 my-artifact-9.1.0.2-SNAPSHOT.jar
-rw-r--r-- 1 root root 77 Jun 30 17:37 my-artifact-9.1.0.2-SNAPSHOT.jar.md5
-rw-r--r-- 1 root root 85 Jun 30 17:37 my-artifact-9.1.0.2-SNAPSHOT.jar.sha1
-rw-r--r-- 1 root root 417 Jun 7 2013 my-artifact-9.1.0.2-SNAPSHOT.pom
-rw-r--r-- 1 root root 77 Jun 30 17:37 my-artifact-9.1.0.2-SNAPSHOT.pom.md5
-rw-r--r-- 1 root root 85 Jun 30 17:37 my-artifact-9.1.0.2-SNAPSHOT.pom.sha1
-rw-r--r-- 1 root root 327 Jun 30 17:37 maven-metadata.xml
-rw-r--r-- 1 root root 52 Jun 7 2013 maven-metadata.xml.md5
-rw-r--r-- 1 root root 60 Jun 7 2013 maven-metadata.xml.sha1
With Archiva 1.3.6, we were able to download this jar by adding a dependency on
it:
<dependency>
<groupId>com.whatever</groupId>
<artifactId>my-artifact</artifactId>
<version>9.1.0.2-SNAPSHOT</version>
</dependency>
After the upgrade to 2.0.1, maven is unable to download the artifact. When I
try to download it manually, by entering the URL for the artifact into the web
browser, it is redirected to a URL that is definitely incorrect.
I enter the following URL into the web browser:
http://somehostnamecom:8080/archiva/repository/snapshots/com/whatever/my-artifact/9.1.0.2-SNAPSHOT/my-artifact-9.1.0.2-SNAPHSOT.jar
Archiva redirects the URL to this:
http://somehostnamecom:8080/archiva/repository/snapshots/com/whatever/my-artifact/9.1.0.2-SNAPSHOT/my-artifact-9.1.0.2-null-0.jar
This fails as follows:
HTTP Status 404 - Not a valid artifact path in a Maven 2 repository, filename
'connectoraccess-client-9.1.0.2-null-0.jar' doesn't contain a timestamped
version matching snapshot '9.1.0.2-SNAPSHOT'
type Status report
message Not a valid artifact path in a Maven 2 repository, filename
'connectoraccess-client-9.1.0.2-null-0.jar' doesn't contain a timestamped
version matching snapshot '9.1.0.2-SNAPSHOT'
description The requested resource is not available.
Apache Tomcat/8.0.9
Note the "null" in the filename we were redirected to. There should not be any
redirection in this case because the file we're referencing exists!
It seems we will have to re-upload a whole lot of jars to Archiva using a
timestampped version unless this is fixed.
--
This message was sent by Atlassian JIRA
(v6.1.6#6162)