-/*
- * Copyright (C) 2007-2012 Argeo GmbH
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
package org.argeo.osgi.boot;
import java.io.BufferedReader;
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) {
}
/** 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;
}
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());