Adapt to root node as base artifact
authorMathieu Baudier <mbaudier@argeo.org>
Mon, 13 Feb 2012 16:53:08 +0000 (16:53 +0000)
committerMathieu Baudier <mbaudier@argeo.org>
Mon, 13 Feb 2012 16:53:08 +0000 (16:53 +0000)
git-svn-id: https://svn.argeo.org/slc/trunk@5075 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

runtime/org.argeo.slc.repo/src/main/java/org/argeo/slc/repo/maven/proxy/MavenProxyServiceImpl.java

index c2b4e53d1f31f581d5b278fa713ce047fb6a7351..21b28d450bb4f3d3a69860f5add82c423e670c40 100644 (file)
@@ -28,6 +28,9 @@ public class MavenProxyServiceImpl extends AbstractUrlProxy implements
 
        private List<RemoteRepository> defaultRepositories = new ArrayList<RemoteRepository>();
 
+       private boolean rootNodeIsArtifactBase = RepoConstants.ARTIFACTS_BASE_PATH
+                       .equals("/");
+
        /** Inititalizes the artifacts area. */
        @Override
        protected void beforeInitSessionSave(Session session)
@@ -94,7 +97,10 @@ public class MavenProxyServiceImpl extends AbstractUrlProxy implements
 
        /** The JCR path where this file could be found */
        public String getNodePath(String path) {
-               return RepoConstants.ARTIFACTS_BASE_PATH + path;
+               if (rootNodeIsArtifactBase)
+                       return path;
+               else
+                       return RepoConstants.ARTIFACTS_BASE_PATH + path;
        }
 
        public void setDefaultRepositories(