Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-289

Artifactory does not allow version to be specified as property

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 1.2.2
    • Fix Version/s: 1.2.5
    • Component/s: None
    • Labels:
      None

      Description

      We have a multi-module build. The master POM, which also defines the modules, has the version defined as a property:

      <project xmlns="http://maven.apache.org/POM/4.0.0" 
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
          http://maven.apache.org/maven-v4_0_0.xsd">
      
      	<modelVersion>4.0.0</modelVersion>
      	<groupId>com.foo.bar</groupId>
      	<artifactId>foo-master</artifactId>
      	<version>${pomVersion}</version>
      	<description>Foo</description>
      	<packaging>pom</packaging>
      
              ...
      
              <modules>
      		<module>foo-child</module>
              </modules>
              ...
      
      	<properties>
      		<pomVersion>1.0</pomVersion>
      	</properties>
      </project>
      

      The module POMs look like this:

      <project xmlns="http://maven.apache.org/POM/4.0.0" 
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
          http://maven.apache.org/maven-v4_0_0.xsd">
      
      	<modelVersion>4.0.0</modelVersion>
      	<parent>
      		<groupId>com.foo.bar</groupId>
      		<artifactId>foo-master</artifactId>
      		<version>${pomVersion}</version>
      	</parent>
      	<artifactId>foo-child</artifactId>
      ...
      	
      </project>
      

      It is not possible to deploy these artifacts to Artifactory.

      2007-12-03 11:34:48,261 [ERROR] webapp.servlet.RepoFilter  - Upload request failed
      java.lang.RuntimeException: Failed to save resource '{foo-repo:com/foo/bar/foo-master/1.0/foo-master-1.0.pom}'.
      	at org.artifactory.repo.JcrRepo.saveResource(JcrRepo.java:407)
      	at org.artifactory.engine.UploadEngine.process(UploadEngine.java:158)
      	at org.artifactory.webapp.servlet.RepoFilter.handleUploadRequest(RepoFilter.java:104)
      	at org.artifactory.webapp.servlet.RepoFilter.doFilterInternal(RepoFilter.java:75)
      	at org.artifactory.webapp.servlet.ArtifactoryFilter.doFilter(ArtifactoryFilter.java:89)
      	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
      	at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:178)
      	at org.artifactory.webapp.servlet.AccessFilter.doFilterInternal(AccessFilter.java:75)
      	at org.artifactory.webapp.servlet.ArtifactoryFilter.doFilter(ArtifactoryFilter.java:89)
      	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:712)
      	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
      	at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211)
      	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:313)
      	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
      	at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:844)
      	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644)
      	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
      	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
      	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396)
      	at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
      Caused by: java.lang.RuntimeException: Failed to execute JcrCallback.
      	at org.artifactory.jcr.JcrHelper.doInSession(JcrHelper.java:190)
      	at org.artifactory.repo.JcrRepo.saveResource(JcrRepo.java:360)
      	... 25 more
      Caused by: javax.jcr.RepositoryException: Failed to import resource '{foo-repo:com/foo/bar/foo-master/1.0/foo-master-1.0.pom}': The target deployment path 'com/foo/bar/foo-master/1.0/foo-master-1.0.pom' does not match the POM's expected path prefix 'com/foo/bar/foo-master/${pomVersion}' (make sure your import path is a m2 repository root). Some files might have been incorrectly imported - Please remove them manually.: The target deployment path 'com/foo/bar/foo-master/1.0/foo-master-1.0.pom' does not match the POM's expected path prefix 'com/foo/bar/foo-master/${pomVersion}' (make sure your import path is a m2 repository root). Some files might have been incorrectly imported - Please remove them manually.
      	at org.artifactory.repo.JcrRepo$9.doInJcr(JcrRepo.java:383)
      	at org.artifactory.repo.JcrRepo$9.doInJcr(JcrRepo.java:362)
      	at org.artifactory.jcr.JcrHelper.doInSession(JcrHelper.java:186)
      	... 26 more
      Caused by: javax.jcr.RepositoryException: The target deployment path 'com/foo/bar/foo-master/1.0/foo-master-1.0.pom' does not match the POM's expected path prefix 'com/foo/bar/foo-master/${pomVersion}' (make sure your import path is a m2 repository root). Some files might have been incorrectly imported - Please remove them manually.
      	at org.artifactory.maven.MavenUtils.validatePomTargetPath(MavenUtils.java:145)
      	at org.artifactory.jcr.JcrHelper.importStream(JcrHelper.java:362)
      	at org.artifactory.repo.JcrRepo$9.doInJcr(JcrRepo.java:374)
      	... 28 more
      

        Attachments

          Activity

            People

            • Assignee:
              yoavl Yoav Landman
              Reporter:
              unguiculus Reinhard Naegele
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: