]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - runtime/org.argeo.slc.repo/src/main/java/org/argeo/slc/repo/maven/Migration_01_03.java
Improve Repo
[gpl/argeo-slc.git] / runtime / org.argeo.slc.repo / src / main / java / org / argeo / slc / repo / maven / Migration_01_03.java
index 325d352b0fecf2557f7cc399b150f6f33c43c911..25ebdab71919484ee85b2ad5b39bcc7fe1377e83 100644 (file)
@@ -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;
@@ -55,7 +54,6 @@ public class Migration_01_03 implements Runnable, SlcNames {
        private Repository repository;
        private String sourceWorkspace;
        private String targetWorkspace;
-       private String osgiProfile = "JavaSE-1.6.profile";
 
        private List<String> excludedBundles = new ArrayList<String>();
        private Map<String, String> symbolicNamesMapping = new HashMap<String, String>();
@@ -126,14 +124,22 @@ public class Migration_01_03 implements Runnable, SlcNames {
                Artifact origArtifact = RepoUtils.asArtifact(origArtifactNode);
 
                // skip eclipse artifacts
-               if ((origArtifact.getGroupId().startsWith("org.eclipse") && !origArtifact
-                               .getArtifactId().equals("org.eclipse.osgi"))
-                               || (origArtifact.getArtifactId().startsWith("org.polymap"))) {
+               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))
@@ -260,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";