Fix MANIFEST generation
[gpl/argeo-slc.git] / org.argeo.slc.repo / src / org / argeo / slc / repo / RepoUtils.java
index a6dc5d94f2706cb5af1eb32a935f9249a6dfb534..22fe6b05e528f3973d450ab22002b255722a554d 100644 (file)
@@ -34,14 +34,13 @@ import javax.jcr.nodetype.NodeType;
 
 import org.apache.commons.io.FilenameUtils;
 import org.apache.commons.io.IOUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.argeo.api.cms.CmsLog;
+import org.argeo.api.cms.keyring.Keyring;
 import org.argeo.cms.ArgeoNames;
 import org.argeo.cms.ArgeoTypes;
+import org.argeo.cms.jcr.CmsJcrUtils;
 import org.argeo.jcr.JcrMonitor;
 import org.argeo.jcr.JcrUtils;
-import org.argeo.api.NodeUtils;
-import org.argeo.api.security.Keyring;
 import org.argeo.slc.DefaultNameVersion;
 import org.argeo.slc.NameVersion;
 import org.argeo.slc.SlcException;
@@ -55,7 +54,7 @@ import org.osgi.framework.Constants;
 
 /** Utilities around repo */
 public class RepoUtils implements ArgeoNames, SlcNames {
-       private final static Log log = LogFactory.getLog(RepoUtils.class);
+       private final static CmsLog log = CmsLog.getLog(RepoUtils.class);
 
        /** Packages a regular sources jar as PDE source. */
        public static void packagesAsPdeSource(File sourceFile,
@@ -363,10 +362,10 @@ public class RepoUtils implements ArgeoNames, SlcNames {
                        if (repoNode.isNodeType(ArgeoTypes.ARGEO_REMOTE_REPOSITORY)) {
                                String uri = repoNode.getProperty(ARGEO_URI).getString();
                                if (uri.startsWith("http")) {// http, https
-                                       repository = NodeUtils.getRepositoryByUri(
+                                       repository = CmsJcrUtils.getRepositoryByUri(
                                                        repositoryFactory, uri);
                                } else if (uri.startsWith("vm:")) {// alias
-                                       repository = NodeUtils.getRepositoryByUri(
+                                       repository = CmsJcrUtils.getRepositoryByUri(
                                                        repositoryFactory, uri);
                                } else {
                                        throw new SlcException("Unsupported repository uri " + uri);
@@ -429,7 +428,7 @@ public class RepoUtils implements ArgeoNames, SlcNames {
                        // Anonymous URI only workspace
                        if (repoNode == null)
                                // Anonymous
-                               currRepo = NodeUtils.getRepositoryByUri(repositoryFactory, uri);
+                               currRepo = CmsJcrUtils.getRepositoryByUri(repositoryFactory, uri);
                        else {
                                currRepo = RepoUtils.getRepository(repositoryFactory, keyring,
                                                repoNode);
@@ -627,8 +626,7 @@ public class RepoUtils implements ArgeoNames, SlcNames {
                                monitor.worked(1);
 
                } catch (RepositoryException e) {
-                       throw new SlcException("Cannot copy " + fromNode + " to " + toNode,
-                                       e);
+                       throw new SlcException("Cannot copy " + fromNode + " to " + toNode, e);
                }
        }