package org.argeo.init.osgi;
+import static java.lang.System.Logger.Level.WARNING;
+
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
+import java.lang.System.Logger;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
* name of the URL and of the content of the index.
*/
public class DistributionBundle {
+ private final static Logger logger = System.getLogger(DistributionBundle.class.getName());
+
private final static String INDEX_FILE_NAME = "modularDistribution.csv";
private final String url;
public void processUrl() {
JarInputStream jarIn = null;
try {
- URL u = new URL(url);
+ URL u = new URI(url).toURL();
// local cache
URI localUri = new URI(localCache + relativeUrl);
try {
localUri = new URI(localCache + relativeUrl);
} catch (URISyntaxException e) {
- OsgiBootUtils.warn(e.getMessage());
+ logger.log(WARNING, e.getMessage());
localUri = null;
}
Version version = new Version(osgiArtifact.getVersion());