Latest bnd sync
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1370165 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/bundleplugin/src/main/java/aQute/bnd/maven/support/CachedPom.java b/bundleplugin/src/main/java/aQute/bnd/maven/support/CachedPom.java
index 5787e29..d784767 100644
--- a/bundleplugin/src/main/java/aQute/bnd/maven/support/CachedPom.java
+++ b/bundleplugin/src/main/java/aQute/bnd/maven/support/CachedPom.java
@@ -11,6 +11,7 @@
this.maven = mavenEntry;
}
+ @Override
public File getArtifact() throws Exception {
return maven.getArtifact();
}
diff --git a/bundleplugin/src/main/java/aQute/bnd/maven/support/MavenEntry.java b/bundleplugin/src/main/java/aQute/bnd/maven/support/MavenEntry.java
index fe185a1..4e153c3 100644
--- a/bundleplugin/src/main/java/aQute/bnd/maven/support/MavenEntry.java
+++ b/bundleplugin/src/main/java/aQute/bnd/maven/support/MavenEntry.java
@@ -43,7 +43,9 @@
this.pomPath = path + ".pom";
this.artifactPath = path + ".jar";
this.dir = IO.getFile(maven.repository, path).getParentFile();
- this.dir.mkdirs();
+ if (!this.dir.exists() && !this.dir.mkdirs()) {
+ throw new ExceptionInInitializerError("Could not create directory " + this.dir);
+ }
this.pomFile = new File(maven.repository, pomPath);
this.artifactFile = new File(maven.repository, artifactPath);
this.propertiesFile = new File(dir, "bnd.properties");
@@ -98,7 +100,9 @@
// the file.
} else {
- dir.mkdirs();
+ if (!dir.exists() && !dir.mkdirs()) {
+ throw new IOException("Could not create directory " + dir);
+ }
// We really do not have the file
// so we have to find out who has it.
for (final URI url : urls) {
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 93f169b..4609e32 100644
--- a/bundleplugin/src/main/java/aQute/bnd/maven/support/MavenRemoteRepository.java
+++ b/bundleplugin/src/main/java/aQute/bnd/maven/support/MavenRemoteRepository.java
@@ -4,7 +4,6 @@
import java.net.*;
import java.util.*;
-import aQute.bnd.osgi.*;
import aQute.bnd.service.*;
import aQute.bnd.version.*;
import aQute.lib.io.*;
@@ -68,7 +67,7 @@
return false;
}
- public File put(Jar jar) throws Exception {
+ public PutResult put(InputStream stream, PutOptions options) throws Exception {
throw new UnsupportedOperationException("cannot do put");
}
diff --git a/bundleplugin/src/main/java/aQute/bnd/maven/support/Pom.java b/bundleplugin/src/main/java/aQute/bnd/maven/support/Pom.java
index 0055d19..a778d8b 100644
--- a/bundleplugin/src/main/java/aQute/bnd/maven/support/Pom.java
+++ b/bundleplugin/src/main/java/aQute/bnd/maven/support/Pom.java
@@ -296,6 +296,7 @@
return in;
}
+ @Override
public String toString() {
return groupId + "+" + artifactId + "-" + version;
}
diff --git a/bundleplugin/src/main/java/aQute/bnd/maven/support/ProjectPom.java b/bundleplugin/src/main/java/aQute/bnd/maven/support/ProjectPom.java
index 07e10c6..eedff8c 100644
--- a/bundleplugin/src/main/java/aQute/bnd/maven/support/ProjectPom.java
+++ b/bundleplugin/src/main/java/aQute/bnd/maven/support/ProjectPom.java
@@ -136,6 +136,7 @@
// Match any macros
final static Pattern MACRO = Pattern.compile("(\\$\\{\\s*([^}\\s]+)\\s*\\})");
+ @Override
protected String replace(String in) {
System.err.println("Replce: " + in);
if (in == null) {
diff --git a/bundleplugin/src/main/java/aQute/bnd/maven/support/packageinfo b/bundleplugin/src/main/java/aQute/bnd/maven/support/packageinfo
index 7c8de03..a3d9bcc 100644
--- a/bundleplugin/src/main/java/aQute/bnd/maven/support/packageinfo
+++ b/bundleplugin/src/main/java/aQute/bnd/maven/support/packageinfo
@@ -1 +1 @@
-version 1.0
+version 2.0