X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=org.argeo.osgi.boot%2Fsrc%2Forg%2Fargeo%2Fosgi%2Fboot%2FDistributionBundle.java;h=85bc6d5a5f40328e2cb245d49f0b6c55da714b93;hb=088c1b517a543e935d8ab65c3b2fd2d0269b551d;hp=0d0cb93219edeb38f0a21eeabbf7a74a08c4a65f;hpb=86e5f79860a8b3013b40a36c1f06c828d52f5249;p=lgpl%2Fargeo-commons.git diff --git a/org.argeo.osgi.boot/src/org/argeo/osgi/boot/DistributionBundle.java b/org.argeo.osgi.boot/src/org/argeo/osgi/boot/DistributionBundle.java index 0d0cb9321..85bc6d5a5 100644 --- a/org.argeo.osgi.boot/src/org/argeo/osgi/boot/DistributionBundle.java +++ b/org.argeo.osgi.boot/src/org/argeo/osgi/boot/DistributionBundle.java @@ -187,11 +187,13 @@ public class DistributionBundle { try { reader = new BufferedReader(new InputStreamReader(in)); String line = null; - while ((line = reader.readLine()) != null) { + lines: while ((line = reader.readLine()) != null) { StringTokenizer st = new StringTokenizer(line, separator); String moduleName = st.nextToken(); String moduleVersion = st.nextToken(); String relativeUrl = st.nextToken(); + if (relativeUrl.endsWith(".pom")) + continue lines; osgiArtifacts.add(new OsgiArtifact(moduleName, moduleVersion, relativeUrl)); } } catch (Exception e) { @@ -201,8 +203,8 @@ public class DistributionBundle { } /** Convenience method */ - public static DistributionBundle processUrl(String baseUrl, String realtiveUrl, String localCache) { - DistributionBundle distributionBundle = new DistributionBundle(baseUrl, realtiveUrl, localCache); + public static DistributionBundle processUrl(String baseUrl, String relativeUrl, String localCache) { + DistributionBundle distributionBundle = new DistributionBundle(baseUrl, relativeUrl, localCache); distributionBundle.processUrl(); return distributionBundle; } @@ -230,8 +232,8 @@ public class DistributionBundle { localUri = null; } Version version = new Version(osgiArtifact.getVersion()); - if (localUri != null && Files.exists(Paths.get(localUri)) - && version.getQualifier()!=null && version.getQualifier().startsWith("SNAPSHOT")) { + if (localUri != null && Files.exists(Paths.get(localUri)) && version.getQualifier() != null + && version.getQualifier().startsWith("SNAPSHOT")) { urls.add(localCache + osgiArtifact.getRelativeUrl()); } else { urls.add(baseUrl + osgiArtifact.getRelativeUrl());