]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - org.argeo.slc.repo/src/org/argeo/slc/repo/RepoUtils.java
Merge remote-tracking branch 'origin/master' into testing
[gpl/argeo-slc.git] / org.argeo.slc.repo / src / org / argeo / slc / repo / RepoUtils.java
index 4a175ac594ce641569e269bd37c6c201d753e5a3..a6dc5d94f2706cb5af1eb32a935f9249a6dfb534 100644 (file)
@@ -1,18 +1,3 @@
-/*
- * Copyright (C) 2007-2012 Argeo GmbH
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
 package org.argeo.slc.repo;
 
 import java.io.ByteArrayOutputStream;
@@ -51,22 +36,22 @@ 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.ArgeoMonitor;
-import org.argeo.jcr.ArgeoJcrUtils;
-import org.argeo.jcr.ArgeoNames;
-import org.argeo.jcr.ArgeoTypes;
+import org.argeo.cms.ArgeoNames;
+import org.argeo.cms.ArgeoTypes;
+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;
-import org.argeo.slc.aether.ArtifactIdComparator;
-import org.argeo.slc.jcr.SlcNames;
-import org.argeo.slc.jcr.SlcTypes;
+import org.argeo.slc.SlcNames;
+import org.argeo.slc.SlcTypes;
+import org.argeo.slc.repo.maven.ArtifactIdComparator;
 import org.argeo.slc.repo.maven.MavenConventionsUtils;
-import org.argeo.util.security.Keyring;
+import org.eclipse.aether.artifact.Artifact;
+import org.eclipse.aether.artifact.DefaultArtifact;
 import org.osgi.framework.Constants;
-import org.sonatype.aether.artifact.Artifact;
-import org.sonatype.aether.util.artifact.DefaultArtifact;
 
 /** Utilities around repo */
 public class RepoUtils implements ArgeoNames, SlcNames {
@@ -269,7 +254,6 @@ public class RepoUtils implements ArgeoNames, SlcNames {
                        // probably not a jar, skipping
                        if (log.isDebugEnabled()) {
                                log.debug("Skipping because of " + e);
-                               e.printStackTrace();
                        }
                } finally {
                        IOUtils.closeQuietly(jarInputStream);
@@ -379,10 +363,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 = ArgeoJcrUtils.getRepositoryByUri(
+                                       repository = NodeUtils.getRepositoryByUri(
                                                        repositoryFactory, uri);
                                } else if (uri.startsWith("vm:")) {// alias
-                                       repository = ArgeoJcrUtils.getRepositoryByUri(
+                                       repository = NodeUtils.getRepositoryByUri(
                                                        repositoryFactory, uri);
                                } else {
                                        throw new SlcException("Unsupported repository uri " + uri);
@@ -445,8 +429,7 @@ public class RepoUtils implements ArgeoNames, SlcNames {
                        // Anonymous URI only workspace
                        if (repoNode == null)
                                // Anonymous
-                               currRepo = ArgeoJcrUtils.getRepositoryByUri(repositoryFactory,
-                                               uri);
+                               currRepo = NodeUtils.getRepositoryByUri(repositoryFactory, uri);
                        else {
                                currRepo = RepoUtils.getRepository(repositoryFactory, keyring,
                                                repoNode);
@@ -553,7 +536,7 @@ public class RepoUtils implements ArgeoNames, SlcNames {
                copy(fromNode, toNode, null);
        }
 
-       public static void copy(Node fromNode, Node toNode, ArgeoMonitor monitor) {
+       public static void copy(Node fromNode, Node toNode, JcrMonitor monitor) {
                try {
                        String fromPath = fromNode.getPath();
                        if (monitor != null)