Uploaded image for project: 'Archiva'
  1. Archiva
  2. MRM-935

Archiva doesn't supports artifact with <version>SNAPSHOT</version>

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.1.1
    • Fix Version/s: 2.2.0
    • Component/s: repository scanning
    • Labels:
      None

      Description

      We are using SNAPSHOT version of axiom library. In trunk axiom developers are using "SNAPSHOT" string as a version
      (not a X.X.X-SNAPSHOT, but just SNAPSHOT). Link below.

      http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/pom.xml?view=markup

      Archiva doesn't support this kind of version. During repository synchronization and also during downloading the artifact
      archiva throws exceptions:

      2008-09-08 11:00:39,109 [pool-2-thread-1] ERROR org.apache.maven.archiva.repository.scanner.functors.ConsumerProcessFileClosur
      e  - Consumer [repository-purge] had an error when processing file [/home/maven.repo/data/repositories/snapshots/org/apache/ws
      /commons/axiom/axiom-tests/SNAPSHOT/axiom-tests-20070912.093446-2.pom]: String index out of range: -1
      java.lang.StringIndexOutOfBoundsException: String index out of range: -1
              at java.lang.String.substring(String.java:1938)
              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.AbstractDefaultRepositoryContent.toArtifactReference(AbstractDefaultRepositoryContent.java:51)
              at org.apache.maven.archiva.repository.content.ManagedDefaultRepositoryContent.toArtifactReference(ManagedDefaultRepositoryContent.java:323)
              at org.apache.maven.archiva.consumers.core.repository.DaysOldRepositoryPurge.process(DaysOldRepositoryPurge.java:81)
              at org.apache.maven.archiva.consumers.core.repository.RepositoryPurgeConsumer.processFile(RepositoryPurgeConsumer.java:186)
              at org.apache.maven.archiva.repository.scanner.functors.ConsumerProcessFileClosure.execute(ConsumerProcessFileClosure.java:51)
              at org.apache.commons.collections.functors.IfClosure.execute(IfClosure.java:117)
              at org.apache.commons.collections.CollectionUtils.forAllDo(CollectionUtils.java:388)
              at org.apache.maven.archiva.repository.scanner.RepositoryScannerInstance.directoryWalkStep(RepositoryScannerInstance.java:137)
              at org.codehaus.plexus.util.DirectoryWalker.fireStep(DirectoryWalker.java:174)
              at org.codehaus.plexus.util.DirectoryWalker.scanDir(DirectoryWalker.java:392)
              at org.codehaus.plexus.util.DirectoryWalker.scanDir(DirectoryWalker.java:386)
              at org.codehaus.plexus.util.DirectoryWalker.scanDir(DirectoryWalker.java:386)
              at org.codehaus.plexus.util.DirectoryWalker.scanDir(DirectoryWalker.java:386)
              at org.codehaus.plexus.util.DirectoryWalker.scanDir(DirectoryWalker.java:386)
              at org.codehaus.plexus.util.DirectoryWalker.scanDir(DirectoryWalker.java:386)
              at org.codehaus.plexus.util.DirectoryWalker.scanDir(DirectoryWalker.java:386)
              at org.codehaus.plexus.util.DirectoryWalker.scanDir(DirectoryWalker.java:386)
              at org.codehaus.plexus.util.DirectoryWalker.scan(DirectoryWalker.java:345)
              at org.apache.maven.archiva.repository.scanner.DefaultRepositoryScanner.scan(DefaultRepositoryScanner.java:122)
              at org.apache.maven.archiva.repository.scanner.DefaultRepositoryScanner.scan(DefaultRepositoryScanner.java:66)
              at org.apache.maven.archiva.scheduled.executors.ArchivaRepositoryScanningTaskExecutor.executeTask(ArchivaRepositoryScanningTaskExecutor.java:111)
              at org.codehaus.plexus.taskqueue.execution.ThreadedTaskQueueExecutor$ExecutorRunnable$1.run(ThreadedTaskQueueExecutor.java:116)
              at edu.emory.mathcs.backport.java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:442)
              at edu.emory.mathcs.backport.java.util.concurrent.FutureTask.run(FutureTask.java:176)
              at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:987)
              at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:528)
              at java.lang.Thread.run(Thread.java:619)
      
      
      HTTP ERROR: 500
      
      String index out of range: -1
      RequestURI=/archiva/repository/snapshots/org/apache/ws/commons/axiom/axiom-impl/SNAPSHOT/axiom-impl-20070911.125712-1.pom
      
      Caused by:
      
      java.lang.StringIndexOutOfBoundsException: String index out of range: -1
      	at java.lang.String.substring(String.java:1938)
      	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:513)
      	at org.apache.maven.archiva.webdav.ArchivaDavResourceFactory.doGet(ArchivaDavResourceFactory.java:423)
      	at org.apache.maven.archiva.webdav.ArchivaDavResourceFactory.createResource(ArchivaDavResourceFactory.java:251)
      	at org.apache.maven.archiva.webdav.RepositoryServlet.service(RepositoryServlet.java:117)
      	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.ajp.Ajp13Connection.access$2700(Ajp13Connection.java:42)
      	at org.mortbay.jetty.ajp.Ajp13Connection$RequestHandler.headerComplete(Ajp13Connection.java:221)
      	at org.mortbay.jetty.ajp.Ajp13Parser.parseNext(Ajp13Parser.java:474)
      	at org.mortbay.jetty.ajp.Ajp13Parser.parseAvailable(Ajp13Parser.java:142)
      	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
      	at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
      	at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
      

      The issue is critical. Archiva should allow at least downloading.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                olamy Olivier Lamy
                Reporter:
                michal.stochmialek Michal Stochmialek
              • Votes:
                4 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: