]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - org.argeo.slc.repo/src/org/argeo/slc/repo/osgi/ArgeoOsgiDistributionImpl.java
Adapt to changes in Argeo Commons
[gpl/argeo-slc.git] / org.argeo.slc.repo / src / org / argeo / slc / repo / osgi / ArgeoOsgiDistributionImpl.java
index 7521395e849ab7ad4597e52c145d17e62839b3d6..3d6adcd7b1f63df0ce33310f696e129528d6d5c3 100644 (file)
@@ -4,6 +4,7 @@ import java.io.IOException;
 import java.io.Writer;
 import java.nio.file.Files;
 import java.nio.file.Path;
+import java.nio.file.Paths;
 import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.Iterator;
@@ -14,9 +15,8 @@ import java.util.SortedSet;
 import java.util.TreeMap;
 import java.util.TreeSet;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.argeo.slc.CategorizedNameVersion;
+import org.argeo.api.cms.CmsLog;
+import org.argeo.slc.CategoryNameVersion;
 import org.argeo.slc.ModuleSet;
 import org.argeo.slc.NameVersion;
 import org.argeo.slc.build.Distribution;
@@ -31,7 +31,7 @@ import org.osgi.framework.Constants;
  * A consistent and versioned OSGi distribution, which can be built and tested.
  */
 public class ArgeoOsgiDistributionImpl extends ArtifactDistribution implements ArgeoOsgiDistribution {
-       private final static Log log = LogFactory.getLog(ArgeoOsgiDistributionImpl.class);
+       private final static CmsLog log = CmsLog.getLog(ArgeoOsgiDistributionImpl.class);
 
        private List<Object> modules = new ArrayList<Object>();
 
@@ -42,7 +42,7 @@ public class ArgeoOsgiDistributionImpl extends ArtifactDistribution implements A
        public void init() {
                if (log.isDebugEnabled())
                        log.debug(describe());
-//             migrateTov2(Paths.get(System.getProperty("user.home"), "dev/git/gpl/argeo-tp/argeo-tp"));
+               migrateTov2(Paths.get(System.getProperty("user.home"), "dev/git/unstable/argeo-tp/argeo-tp"));
        }
 
        public void destroy() {
@@ -59,7 +59,7 @@ public class ArgeoOsgiDistributionImpl extends ArtifactDistribution implements A
                                str = str + "\t(Maven)";
                        else if (nv instanceof UriWrapper)
                                str = str + "\t(URI)";
-                       else if (nv instanceof OsgiCategorizedNV)
+                       else if (nv instanceof ArchiveWrapperCNV)
                                str = str + "\t(OSGi from archive)";
                        else if (nv instanceof BndWrapper)
                                str = str + "\t(Plain BND from archive)";
@@ -81,8 +81,8 @@ public class ArgeoOsgiDistributionImpl extends ArtifactDistribution implements A
                while (nvIt.hasNext()) {
                        NameVersion nv = nvIt.next();
                        try {
-                               if (nv instanceof CategorizedNameVersion) {
-                                       CategorizedNameVersion cnv = (CategorizedNameVersion) nv;
+                               if (nv instanceof CategoryNameVersion) {
+                                       CategoryNameVersion cnv = (CategoryNameVersion) nv;
                                        // TODO add branch?
                                        Path categoryBase = baseDir.resolve(cnv.getCategory());
                                        Files.createDirectories(categoryBase);
@@ -138,8 +138,8 @@ public class ArgeoOsgiDistributionImpl extends ArtifactDistribution implements A
                                                        if (log.isTraceEnabled())
                                                                log.trace("Wrote " + bndPath);
                                                }
-                                       } else if (cnv instanceof OsgiCategorizedNV) {
-                                               OsgiCategorizedNV onv = (OsgiCategorizedNV) cnv;
+                                       } else if (cnv instanceof ArchiveWrapperCNV) {
+                                               ArchiveWrapperCNV onv = (ArchiveWrapperCNV) cnv;
                                                ArchiveWrapper aw = onv.getBuild();
                                                archiveWrappers.add(aw);
                                                // TODO specify and implement archive wrapper support