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;
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;
* 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>();
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() {
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)";
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);
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