Sync with latest bnd code for testing purposes
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1354104 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/bundleplugin/src/main/java/aQute/bnd/maven/MavenDependencyGraph.java b/bundleplugin/src/main/java/aQute/bnd/maven/MavenDependencyGraph.java
index d34f2b2..bbc45b8 100644
--- a/bundleplugin/src/main/java/aQute/bnd/maven/MavenDependencyGraph.java
+++ b/bundleplugin/src/main/java/aQute/bnd/maven/MavenDependencyGraph.java
@@ -14,7 +14,7 @@
final List<Artifact> dependencies = new ArrayList<Artifact>();
final List<URL> repositories = new ArrayList<URL>();
final XPath xpath = xpathFactory.newXPath();
- final Map<URL,Artifact> cache = new HashMap<URL,Artifact>();
+ final Map<URI,Artifact> cache = new HashMap<URI,Artifact>();
Artifact root;
enum Scope {
@@ -89,12 +89,11 @@
String path = getPath(repository.toString(), groupId, artifactId, version);
try {
- URL url = new URL(path + ".pom");
+ URI url = new URL(path + ".pom").toURI();
if (cache.containsKey(url)) {
return cache.get(url);
- } else {
- return new Artifact(url);
}
+ return new Artifact(url.toURL());
}
catch (Exception e) {
System.err.println("Failed to get " + artifactId + " from " + repository);
diff --git a/bundleplugin/src/main/java/aQute/bnd/maven/MavenDeploy.java b/bundleplugin/src/main/java/aQute/bnd/maven/MavenDeploy.java
index ec5e2b7..b7a1c12 100644
--- a/bundleplugin/src/main/java/aQute/bnd/maven/MavenDeploy.java
+++ b/bundleplugin/src/main/java/aQute/bnd/maven/MavenDeploy.java
@@ -138,7 +138,7 @@
}
}
- private void optional(Command command, String key, String value) {
+ private void optional(Command command, @SuppressWarnings("unused") String key, String value) {
if (value == null)
return;
diff --git a/bundleplugin/src/main/java/aQute/bnd/maven/MavenDeployCmd.java b/bundleplugin/src/main/java/aQute/bnd/maven/MavenDeployCmd.java
index 0209f5c..29de79d 100644
--- a/bundleplugin/src/main/java/aQute/bnd/maven/MavenDeployCmd.java
+++ b/bundleplugin/src/main/java/aQute/bnd/maven/MavenDeployCmd.java
@@ -173,7 +173,7 @@
}
}
- private void optional(Command command, String key, String value) {
+ private void optional(Command command, @SuppressWarnings("unused") String key, String value) {
if (value == null)
return;
diff --git a/bundleplugin/src/main/java/aQute/bnd/maven/MavenRepository.java b/bundleplugin/src/main/java/aQute/bnd/maven/MavenRepository.java
index 05bb5eb..00e7863 100644
--- a/bundleplugin/src/main/java/aQute/bnd/maven/MavenRepository.java
+++ b/bundleplugin/src/main/java/aQute/bnd/maven/MavenRepository.java
@@ -25,7 +25,7 @@
return false;
}
- public File[] get(String bsn, String version) throws Exception {
+ private File[] get(String bsn, String version) throws Exception {
VersionRange range = new VersionRange("0");
if (version != null)
range = new VersionRange(version);
diff --git a/bundleplugin/src/main/java/aQute/bnd/maven/support/MavenRemoteRepository.java b/bundleplugin/src/main/java/aQute/bnd/maven/support/MavenRemoteRepository.java
index d1c0472..17bf92f 100644
--- a/bundleplugin/src/main/java/aQute/bnd/maven/support/MavenRemoteRepository.java
+++ b/bundleplugin/src/main/java/aQute/bnd/maven/support/MavenRemoteRepository.java
@@ -16,16 +16,6 @@
Registry registry;
Maven maven;
- public File[] get(String bsn, String range) throws Exception {
- File f = get(bsn, range, Strategy.HIGHEST, null);
- if (f == null)
- return null;
-
- return new File[] {
- f
- };
- }
-
public File get(String bsn, String version, Strategy strategy, Map<String,String> properties) throws Exception {
String groupId = null;