Incremental improvements.
authorMathieu Baudier <mbaudier@argeo.org>
Thu, 26 Jun 2014 17:45:26 +0000 (17:45 +0000)
committerMathieu Baudier <mbaudier@argeo.org>
Thu, 26 Jun 2014 17:45:26 +0000 (17:45 +0000)
git-svn-id: https://svn.argeo.org/slc/trunk@7112 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

runtime/org.argeo.slc.repo/src/main/java/org/argeo/slc/repo/osgi/ArchiveWrapper.java
runtime/org.argeo.slc.repo/src/main/java/org/argeo/slc/repo/osgi/BndWrapper.java
runtime/org.argeo.slc.repo/src/main/java/org/argeo/slc/repo/osgi/MavenWrapper.java
runtime/org.argeo.slc.repo/src/main/java/org/argeo/slc/repo/osgi/OsgiFactoryImpl.java

index 1ffcf5332d21f52ac383e47d7593bd4ef80ad50c..3355424c509bcdd3fedd9d4fa5ba18ac029f300e 100644 (file)
@@ -119,7 +119,7 @@ public class ArchiveWrapper implements Runnable, ModuleSet, Distribution {
                                if (baseName.endsWith("-sources")) {
                                        String bundle = baseName.substring(0, baseName.length()
                                                        - "-sources".length());
-                                       log.debug(name + "," + baseName + ", " + bundle);
+                                       // log.debug(name + "," + baseName + ", " + bundle);
                                        String bundlePath = FilenameUtils.getPath(name) + bundle
                                                        + ".jar";
                                        if (wrappers.containsKey(bundlePath)) {
@@ -196,6 +196,7 @@ public class ArchiveWrapper implements Runnable, ModuleSet, Distribution {
                                }
                        }
 
+                       // FIXME Fail if not all wrappers matched
                } catch (Exception e) {
                        throw new SlcException("Cannot wrap distribution " + uri, e);
                } finally {
index bb2bf24044d77bd4a30ea0455457674180428ec8..2604e1473b083b4d8a9d75b44fdea9352ae08e82 100644 (file)
@@ -49,7 +49,7 @@ public class BndWrapper implements Constants, CategorizedNameVersion,
                                String sourceSymbolicName = sourceManifest.getMainAttributes()
                                                .getValue(BUNDLE_SYMBOLICNAME);
                                if (sourceSymbolicName != null
-                                               && sourceSymbolicName.equals(name))
+                                               && !sourceSymbolicName.equals(name))
                                        log.warn("The new symbolic name ("
                                                        + name
                                                        + ") is not consistant with the wrapped bundle symbolic name ("
index 35668373a36d0e1a8b6dcb90a05312eed7c61f18..5330e67e2fcb7a4ffaf9e2fd9216a44cdcb8c89d 100644 (file)
@@ -38,7 +38,13 @@ public class MavenWrapper extends BndWrapper implements Runnable {
                try {
                        distSession = osgiFactory.openDistSession();
                        javaSession = osgiFactory.openJavaSession();
-                       Node origArtifact = osgiFactory.getMaven(distSession, sourceCoords);
+                       Node origArtifact;
+                       try {
+                               origArtifact = osgiFactory.getMaven(distSession, sourceCoords);
+                       } catch (Exception e1) {
+                               origArtifact = osgiFactory.getMaven(distSession, sourceCoords
+                                               + ":" + getVersion());
+                       }
 
                        in = origArtifact.getNode(Node.JCR_CONTENT)
                                        .getProperty(Property.JCR_DATA).getBinary().getStream();
index 86a15ef27076416a678c2d9fe2630468ccbdf846..dd90a26861343afce89b7efb337d124df3b064ad 100644 (file)
@@ -228,4 +228,12 @@ public class OsgiFactoryImpl implements OsgiFactory, SlcNames {
                this.mirrors = mirrors;
        }
 
+       public void setMavenRepositories(List<String> mavenRepositories) {
+               this.mavenRepositories = mavenRepositories;
+       }
+
+       public void setMavenProxyBase(String mavenProxyBase) {
+               this.mavenProxyBase = mavenProxyBase;
+       }
+
 }