X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=runtime%2Forg.argeo.slc.repo%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Frepo%2Fmaven%2FMigration_01_03.java;h=25ebdab71919484ee85b2ad5b39bcc7fe1377e83;hb=142bc73155f308b5e0dd5e9ae4f505db0ca21eec;hp=1f59f82bda7a0d47cb0ef9db99c335d3ad602733;hpb=6c5db92293024e130ef8ebdb64fc88e32ce5d008;p=gpl%2Fargeo-slc.git diff --git a/runtime/org.argeo.slc.repo/src/main/java/org/argeo/slc/repo/maven/Migration_01_03.java b/runtime/org.argeo.slc.repo/src/main/java/org/argeo/slc/repo/maven/Migration_01_03.java index 1f59f82bd..25ebdab71 100644 --- a/runtime/org.argeo.slc.repo/src/main/java/org/argeo/slc/repo/maven/Migration_01_03.java +++ b/runtime/org.argeo.slc.repo/src/main/java/org/argeo/slc/repo/maven/Migration_01_03.java @@ -2,7 +2,6 @@ package org.argeo.slc.repo.maven; import java.io.IOException; import java.util.ArrayList; -import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -34,6 +33,7 @@ import org.argeo.slc.jcr.SlcTypes; import org.argeo.slc.repo.ArtifactIndexer; import org.argeo.slc.repo.JarFileIndexer; import org.argeo.slc.repo.RepoUtils; +import org.argeo.slc.repo.osgi.OsgiProfile; import org.osgi.framework.Constants; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.util.artifact.DefaultArtifact; @@ -61,7 +61,8 @@ public class Migration_01_03 implements Runnable, SlcNames { private Session origSession; private Session targetSession; - private List systemPackages; + private List systemPackages = OsgiProfile.PROFILE_JAVA_SE_1_6 + .getSystemPackages(); private String artifactBasePath = "/"; @@ -75,8 +76,8 @@ public class Migration_01_03 implements Runnable, SlcNames { targetWorkspace); // works only in OSGi!! - systemPackages = Arrays.asList(System.getProperty( - "org.osgi.framework.system.packages").split(",")); + // systemPackages = Arrays.asList(System.getProperty( + // "org.osgi.framework.system.packages").split(",")); } public void destroy() { @@ -121,6 +122,24 @@ public class Migration_01_03 implements Runnable, SlcNames { protected void processOrigArtifactVersion(Node origArtifactNode) throws RepositoryException, IOException { Artifact origArtifact = RepoUtils.asArtifact(origArtifactNode); + + // skip eclipse artifacts + if ((origArtifact.getGroupId().startsWith("org.eclipse") && !(origArtifact + .getArtifactId().equals("org.eclipse.osgi") + || origArtifact.getArtifactId().equals( + "org.eclipse.osgi.source") || origArtifact + .getArtifactId().startsWith("org.eclipse.rwt.widgets.upload"))) + || origArtifact.getArtifactId().startsWith("com.ibm.icu")) { + if (log.isDebugEnabled()) + log.debug("Skip " + origArtifact); + return; + } + + // skip SpringSource ActiveMQ + if (origArtifact.getArtifactId().startsWith( + "com.springsource.org.apache.activemq")) + return; + String origJarNodeName = MavenConventionsUtils .artifactFileName(origArtifact); if (!origArtifactNode.hasNode(origJarNodeName)) @@ -247,9 +266,16 @@ public class Migration_01_03 implements Runnable, SlcNames { // target coordinates final String targetGroupId; - if (origArtifact.getGroupId().startsWith("org.eclipse") + if (origArtifact.getArtifactId().startsWith( + "org.eclipse.rwt.widgets.upload")) + targetGroupId = "org.argeo.tp.rap"; + else if (origArtifact.getArtifactId().startsWith("org.polymap")) + targetGroupId = "org.argeo.tp.rap"; + else if (origArtifact.getGroupId().startsWith("org.eclipse") && !origArtifact.getArtifactId().equals("org.eclipse.osgi")) - targetGroupId = "org.argeo.tp.eclipse"; + throw new SlcException(origArtifact + " should have been excluded");// targetGroupId + // = + // "org.argeo.tp.eclipse"; else targetGroupId = "org.argeo.tp";