Sync with latest bnd 'next' branch
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1404983 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/bundleplugin/src/main/java/aQute/bnd/build/WorkspaceRepository.java b/bundleplugin/src/main/java/aQute/bnd/build/WorkspaceRepository.java
index 9e06e7e..296a45a 100644
--- a/bundleplugin/src/main/java/aQute/bnd/build/WorkspaceRepository.java
+++ b/bundleplugin/src/main/java/aQute/bnd/build/WorkspaceRepository.java
@@ -128,24 +128,15 @@
List<Version> versions = new ArrayList<Version>();
Collection<Project> projects = workspace.getAllProjects();
for (Project project : projects) {
- File[] build = project.build(false);
- if (build != null) {
- for (File file : build) {
- Jar jar = new Jar(file);
- try {
- if (bsn.equals(jar.getBsn())) {
- String v = jar.getVersion();
- if ( v == null)
- v = "0";
- else if (!Verifier.isVersion(v))
- continue; // skip
-
- versions.add(new Version(v));
- }
- }
- finally {
- jar.close();
- }
+ for (Builder builder : project.getSubBuilders()) {
+ if (bsn.equals(builder.getBsn())) {
+ String v = builder.getVersion();
+ if (v == null)
+ v = "0";
+ else if (!Verifier.isVersion(v))
+ continue; // skip
+
+ versions.add(new Version(v));
}
}
}