Archiva
  1. Archiva
  2. MRM-837

Cannot download SNAPSHOT version

    Details

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

      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

          Activity

          Hide
          Brett Porter added a comment -

          have you tried 1.0.2? Several related bugs were fixed.

          Show
          Brett Porter added a comment - have you tried 1.0.2? Several related bugs were fixed.
          Hide
          Baptiste MATHUS added a comment -

          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 - 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
          Baptiste MATHUS added a comment -

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

          Show
          Baptiste MATHUS added a comment - I just upgraded to archiva 1.0.2 but unfortunately it does not seem to solve the problem...
          Hide
          Baptiste MATHUS added a comment -

          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 - 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.
          Brett Porter made changes -
          Field Original Value New Value
          Fix Version/s 1.1.x [ 14081 ]
          Hide
          Mirko Jahn added a comment -

          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 - 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
          Mirko Jahn added a comment -

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

          Show
          Mirko Jahn added a comment - oh, I forgot, I used the latest version 1.1.2 from the standalone download on windows.
          Maria Odea Ching made changes -
          Link This issue is related to MRM-964 [ MRM-964 ]
          Hide
          Brett Porter added a comment -

          for testing

          Show
          Brett Porter added a comment - for testing
          Brett Porter made changes -
          Fix Version/s Backlog [ 13571 ]
          Fix Version/s 1.4 [ 16133 ]
          Hide
          Brett Porter added a comment -

          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 - still exists in 1.4. I'm surprised that Maven accepted this, as it's only meant to work with -SNAPSHOT.
          Hide
          Brett Porter added a comment -

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

          Show
          Brett Porter added a comment - on the other hand SNAPSHOT should work and isn't. Both can likely be corrected.
          Brett Porter made changes -
          Link This issue is related to MRM-935 [ MRM-935 ]
          Hide
          Baptiste MATHUS added a comment -

          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 - 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
          Brett Porter added a comment -

          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 - 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.
          Brett Porter made changes -
          Link This issue relates to MRM-1456 [ MRM-1456 ]
          Olivier Lamy made changes -
          Fix Version/s 2.0.1 [ 16133 ]
          Fix Version/s 2.0.2 [ 20129 ]
          Olivier Lamy made changes -
          Fix Version/s 2.0.2 [ 20129 ]
          Fix Version/s 2.1.0 [ 20146 ]
          Olivier Lamy made changes -
          Fix Version/s 2.1.0 [ 20146 ]
          Fix Version/s 2.1.1 [ 20331 ]
          Olivier Lamy made changes -
          Fix Version/s 2.1.1 [ 20331 ]
          Fix Version/s 2.1.2 [ 20549 ]
          Olivier Lamy made changes -
          Fix Version/s 2.1.2 [ 20549 ]
          Fix Version/s 2.2.0 [ 20570 ]

            People

            • Assignee:
              Unassigned
              Reporter:
              Baptiste MATHUS
            • Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: