jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Archiva
  • MRM-837

Cannot download SNAPSHOT version

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 1.0
  • Fix Version/s: 1.4
  • Component/s: browser
  • Labels:
    None
  • Environment:
    Precisely, this bugs happens in the 1.0-beta-3
    IBM Aix Unix

Description

Hi all,
Our versioning is quite special, I agree : 2.1.0.beta-2.SNAPSHOT at the moment.

The thing is: archiva accepts that this kind of artifact version be deployed, but then it doesn't allow you to download it...
In fact, when trying to download, say, the artifactId-2.1.0.beta-2.20080613.125403-1.jar artifact, archiva throws the following exception:

Error 404 Not Found

The following resource does not exist: http://archiva:4000/repository//mm/socle-technique/2.1.0.beta-2.SNAPSHOT/socle-technique-2.1.0.beta-2.20080613.125403-1.jar

org.apache.maven.archiva.repository.layout.LayoutException: Invalid path to Artifact: filename format is invalid,expected timestamp format in filename.
at java.lang.Throwable.(Throwable.java:57)
at java.lang.Throwable.(Throwable.java:68)
at org.apache.maven.archiva.common.ArchivaException.(ArchivaException.java:38)
at org.apache.maven.archiva.repository.layout.LayoutException.(LayoutException.java:39)
at org.apache.maven.archiva.repository.content.DefaultPathParser.toArtifactReference(DefaultPathParser.java:134)
at org.apache.maven.archiva.repository.content.RepositoryRequest.toArtifactReference(RepositoryRequest.java:121)
at org.apache.maven.archiva.repository.content.RepositoryRequest.toNativePath(RepositoryRequest.java:271)
at org.apache.maven.archiva.web.repository.ProxiedDavServer.process(ProxiedDavServer.java:163)
at org.codehaus.plexus.webdav.servlet.multiplexed.MultiplexedWebDavServlet.service(MultiplexedWebDavServlet.java:119)
at org.apache.maven.archiva.web.repository.RepositoryServlet.service(RepositoryServlet.java:167)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:830)
at com.opensymphony.webwork.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:189)
at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821)
at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:39)
at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821)
at com.opensymphony.webwork.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:88)
at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821)
at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:471)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:633)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
at org.mortbay.http.HttpServer.service(HttpServer.java:909)
at org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:982)
at org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)
at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)

I guess the versioning we used there is quite wrong (in a release process, I think we should not suffix SNAPSHOT after a qualifier...), but the thing is: IMO, archiva should be coherent:
if this naming scheme is incorrect, then archiva should reject the artifact when trying to deploy it (we use the archiva webdav interface when doing mvn deploy).
In fact, it's quite puzzling to having successfully deployed an artifact, but being unable to download it.

Cheers.

Issue Links

is related to

Bug - A problem which impairs or prevents the functions of the product. MRM-935 Archiva doesn't supports artifact with <version>SNAPSHOT</version>

  • Major - Major loss of function.
  • Open - The issue is open and ready for the assignee to start work on it.

Wish - General wishlist item MRM-964 Method isVersion() for validating an uploaded artifact version is open to criticism

  • Critical - Crashes, loss of data, severe memory leak.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.
relates to

Bug - A problem which impairs or prevents the functions of the product. MRM-1456 Repository Purge : Error : Invalid path to Artifact: filename format is invalid,expected timestamp format in filename.

  • Major - Major loss of function.
  • Open - The issue is open and ready for the assignee to start work on it.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Brett Porter added a comment - 13/Jun/08 9:02 PM

have you tried 1.0.2? Several related bugs were fixed.

Show
Brett Porter added a comment - 13/Jun/08 9:02 PM have you tried 1.0.2? Several related bugs were fixed.
Hide
Permalink
Baptiste MATHUS added a comment - 14/Jun/08 7:07 AM

The server is the one at work. I'll try to find some time next week to see if it fixes/improves the current behaviour. I'll comment (or close) this bug when done.
Thanks for the answer.

Show
Baptiste MATHUS added a comment - 14/Jun/08 7:07 AM The server is the one at work. I'll try to find some time next week to see if it fixes/improves the current behaviour. I'll comment (or close) this bug when done. Thanks for the answer.
Hide
Permalink
Baptiste MATHUS added a comment - 16/Jun/08 3:45 AM

I just upgraded to archiva 1.0.2 but unfortunately it does not seem to solve the problem...

Show
Baptiste MATHUS added a comment - 16/Jun/08 3:45 AM I just upgraded to archiva 1.0.2 but unfortunately it does not seem to solve the problem...
Hide
Permalink
Baptiste MATHUS added a comment - 16/Jun/08 7:37 AM

After some verifications, I found a workaround. Seems like archiva does not like the "." between version and the SNAPSHOT suffix. Replacing this . with a - makes it downloadable by archiva without problem.
As a reminder, here are the tested pattern:

  • 2.1.0.beta-2.SNAPSHOT CANNOT be downloaded
  • 2.1.0.beta-2-SNAPSHOT is OK
  • 2.1.0.beta2-SNAPSHOT is OK

I guess there's something to do about it. As I said above: either forbid the upload into archiva, else archiva should be fixed to allow download.
In the meantime, we'll now use hyphen instead of dot.

Cheers.

Show
Baptiste MATHUS added a comment - 16/Jun/08 7:37 AM After some verifications, I found a workaround. Seems like archiva does not like the "." between version and the SNAPSHOT suffix. Replacing this . with a - makes it downloadable by archiva without problem. As a reminder, here are the tested pattern:
  • 2.1.0.beta-2.SNAPSHOT CANNOT be downloaded
  • 2.1.0.beta-2-SNAPSHOT is OK
  • 2.1.0.beta2-SNAPSHOT is OK
I guess there's something to do about it. As I said above: either forbid the upload into archiva, else archiva should be fixed to allow download. In the meantime, we'll now use hyphen instead of dot. Cheers.
Hide
Permalink
Mirko Jahn added a comment - 02/Oct/08 7:07 PM

I have a very similar problem. I get an error 500 when I specify a version with "SNAPSHOT". However, as soon as I use the common pattern "1.0.0.SNAPSHOT", everything is fine.

Here is the stacktrace:
HTTP ERROR: 500

String index out of range: -1

RequestURI=/archiva/repository/sectest/com/xxx/xzy/SNAPSHOT/xzy-20081002.165542-1.pom
Caused by:

java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(Unknown Source)
at org.apache.maven.archiva.repository.content.FilenameParser.expect(FilenameParser.java:107)
at org.apache.maven.archiva.repository.content.DefaultPathParser.toArtifactReference(DefaultPathParser.java:119)
at org.apache.maven.archiva.repository.content.RepositoryRequest.toArtifactReference(RepositoryRequest.java:79)
at org.apache.maven.archiva.webdav.ArchivaDavResourceFactory.fetchContentFromProxies(ArchivaDavResourceFactory.java:529)
at org.apache.maven.archiva.webdav.ArchivaDavResourceFactory.doGet(ArchivaDavResourceFactory.java:439)
at org.apache.maven.archiva.webdav.ArchivaDavResourceFactory.createResource(ArchivaDavResourceFactory.java:256)
at org.apache.maven.archiva.webdav.RepositoryServlet.service(RepositoryServlet.java:118)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)
at com.opensymphony.webwork.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:189)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:39)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at com.opensymphony.webwork.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:88)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:722)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:404)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:828)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)

Show
Mirko Jahn added a comment - 02/Oct/08 7:07 PM I have a very similar problem. I get an error 500 when I specify a version with "SNAPSHOT". However, as soon as I use the common pattern "1.0.0.SNAPSHOT", everything is fine. Here is the stacktrace: HTTP ERROR: 500 String index out of range: -1 RequestURI=/archiva/repository/sectest/com/xxx/xzy/SNAPSHOT/xzy-20081002.165542-1.pom Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(Unknown Source) at org.apache.maven.archiva.repository.content.FilenameParser.expect(FilenameParser.java:107) at org.apache.maven.archiva.repository.content.DefaultPathParser.toArtifactReference(DefaultPathParser.java:119) at org.apache.maven.archiva.repository.content.RepositoryRequest.toArtifactReference(RepositoryRequest.java:79) at org.apache.maven.archiva.webdav.ArchivaDavResourceFactory.fetchContentFromProxies(ArchivaDavResourceFactory.java:529) at org.apache.maven.archiva.webdav.ArchivaDavResourceFactory.doGet(ArchivaDavResourceFactory.java:439) at org.apache.maven.archiva.webdav.ArchivaDavResourceFactory.createResource(ArchivaDavResourceFactory.java:256) at org.apache.maven.archiva.webdav.RepositoryServlet.service(RepositoryServlet.java:118) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093) at com.opensymphony.webwork.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:189) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:39) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at com.opensymphony.webwork.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:88) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:722) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:404) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:828) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395) at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
Hide
Permalink
Mirko Jahn added a comment - 02/Oct/08 7:08 PM

oh, I forgot, I used the latest version 1.1.2 from the standalone download on windows.

Show
Mirko Jahn added a comment - 02/Oct/08 7:08 PM oh, I forgot, I used the latest version 1.1.2 from the standalone download on windows.
Hide
Permalink
Brett Porter added a comment - 23/Feb/10 2:12 AM

for testing

Show
Brett Porter added a comment - 23/Feb/10 2:12 AM for testing
Hide
Permalink
Brett Porter added a comment - 23/Feb/10 5:05 AM

still exists in 1.4. I'm surprised that Maven accepted this, as it's only meant to work with -SNAPSHOT.

Show
Brett Porter added a comment - 23/Feb/10 5:05 AM still exists in 1.4. I'm surprised that Maven accepted this, as it's only meant to work with -SNAPSHOT.
Hide
Permalink
Brett Porter added a comment - 23/Feb/10 5:06 AM

on the other hand SNAPSHOT should work and isn't. Both can likely be corrected.

Show
Brett Porter added a comment - 23/Feb/10 5:06 AM on the other hand SNAPSHOT should work and isn't. Both can likely be corrected.
Hide
Permalink
Baptiste MATHUS added a comment - 23/Feb/10 7:05 AM

Totally agree with you Brett. .SNAPSHOT isn't maven-compliant, and btw we don't use this naming anymore. But as you point out, I guess it should work. At least, I think archiva should be able to serve any content. Particularly, it should be able to serve content that was deployed by the standard maven way.

Cheers

Show
Baptiste MATHUS added a comment - 23/Feb/10 7:05 AM Totally agree with you Brett. .SNAPSHOT isn't maven-compliant, and btw we don't use this naming anymore. But as you point out, I guess it should work. At least, I think archiva should be able to serve any content. Particularly, it should be able to serve content that was deployed by the standard maven way. Cheers
Hide
Permalink
Brett Porter added a comment - 31/Dec/10 9:42 PM

On trunk the error is:

Timestamped snapshots must contain the main version, filename was 'MRM-837-20100223.110535-1.jar'

This will need to be checked in both locations.

Show
Brett Porter added a comment - 31/Dec/10 9:42 PM On trunk the error is:
Timestamped snapshots must contain the main version, filename was 'MRM-837-20100223.110535-1.jar'
This will need to be checked in both locations.

People

  • Assignee:
    Unassigned
    Reporter:
    Baptiste MATHUS
Vote (2)
Watch (2)

Dates

  • Created:
    13/Jun/08 11:11 AM
    Updated:
    09/Feb/11 7:45 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.