Update to upstream version 3.3.0

- Build against osgi-{core,compendium}
This commit is contained in:
Michael Simacek 2016-10-05 12:48:24 +02:00
parent d70a097f62
commit 23fa04639a
9 changed files with 138 additions and 853 deletions

5
.gitignore vendored
View File

@ -8,3 +8,8 @@
/biz.aQute.bnd-3.2.0.pom
/biz.aQute.bndlib-3.2.0.pom
/biz.aQute.bnd.annotation-3.2.0.pom
/3.3.0.REL.tar.gz
/aQute.libg-3.3.0.pom
/biz.aQute.bnd-3.3.0.pom
/biz.aQute.bndlib-3.3.0.pom
/biz.aQute.bnd.annotation-3.3.0.pom

View File

@ -1,7 +1,7 @@
From a8e35193386a52fc560bc2da907df2868819a9e3 Mon Sep 17 00:00:00 2001
From 2da86d459a4806760d2883ed3c6296f904c80593 Mon Sep 17 00:00:00 2001
From: Michael Simacek <msimacek@redhat.com>
Date: Thu, 26 May 2016 15:43:14 +0200
Subject: [PATCH 1/3] Port to Java 8
Subject: [PATCH 1/2] Port to Java 8
---
aQute.libg/src/aQute/lib/collections/DoubleKeyMap.java | 14 --------------
@ -59,7 +59,7 @@ index 493d7bc..8a48a72 100644
final T[] list;
diff --git a/biz.aQute.bnd/src/aQute/bnd/ant/BndTask.java b/biz.aQute.bnd/src/aQute/bnd/ant/BndTask.java
index 6f5f107..b35d2e1 100644
index efd43a3..9fd21fd 100644
--- a/biz.aQute.bnd/src/aQute/bnd/ant/BndTask.java
+++ b/biz.aQute.bnd/src/aQute/bnd/ant/BndTask.java
@@ -217,7 +217,7 @@ public class BndTask extends BaseTask {

View File

@ -0,0 +1,75 @@
From fbc8e82303b4168ff9fcd7bc6cabd5e65a5b7495 Mon Sep 17 00:00:00 2001
From: Michael Simacek <msimacek@redhat.com>
Date: Tue, 4 Oct 2016 18:02:26 +0200
Subject: [PATCH 2/2] Disable removed commands
---
biz.aQute.bnd/src/aQute/bnd/main/bnd.java | 45 -------------------------------
1 file changed, 45 deletions(-)
diff --git a/biz.aQute.bnd/src/aQute/bnd/main/bnd.java b/biz.aQute.bnd/src/aQute/bnd/main/bnd.java
index 8cd120d..1ceb4c6 100644
--- a/biz.aQute.bnd/src/aQute/bnd/main/bnd.java
+++ b/biz.aQute.bnd/src/aQute/bnd/main/bnd.java
@@ -100,7 +100,6 @@ import aQute.bnd.osgi.Processor;
import aQute.bnd.osgi.Resource;
import aQute.bnd.osgi.Verifier;
import aQute.bnd.osgi.eclipse.EclipseClasspath;
-import aQute.bnd.repository.maven.provider.NexusCommand;
import aQute.bnd.service.Actionable;
import aQute.bnd.service.RepositoryPlugin;
import aQute.bnd.service.action.Action;
@@ -4136,50 +4135,6 @@ public class bnd extends Processor {
}
/**
- * Resolve command
- *
- * @throws Exception
- */
-
- public void _resolve(ResolveCommand.ResolveOptions options) throws Exception {
- ResolveCommand rc = new ResolveCommand(this);
- String help = options._command().subCmd(options, rc);
- if (help != null)
- out.println(help);
- getInfo(rc);
- rc.close();
- }
-
- /**
- * Remote command
- *
- * @throws Exception
- */
-
- public void _remote(RemoteCommand.RemoteOptions options) throws Exception {
- RemoteCommand rc = new RemoteCommand(this, options);
- String help = options._command().subCmd(options, rc);
- if (help != null)
- out.println(help);
- getInfo(rc);
- rc.close();
- }
-
- /**
- * Nexus commands
- *
- * @throws Exception
- */
-
- public void _nexus(NexusCommand.NexusOptions options) throws Exception {
- NexusCommand rc = new NexusCommand(this, options);
- String help = options._command().subCmd(options, rc);
- if (help != null)
- out.println(help);
- getInfo(rc);
- rc.close();
- }
- /**
* Export a bndrun file
*/
--
2.7.4

View File

@ -1,584 +0,0 @@
From bfeef908b83862b6364dfcc856a26caf3be1765e Mon Sep 17 00:00:00 2001
From: Michael Simacek <msimacek@redhat.com>
Date: Thu, 26 May 2016 16:57:46 +0200
Subject: [PATCH 2/3] Remove unavailable parts
---
biz.aQute.bnd/src/aQute/bnd/main/bnd.java | 30 -----------------
biz.aQute.bndlib/src/aQute/bnd/build/Project.java | 4 +--
.../src/aQute/bnd/component/AnnotationReader.java | 38 ++++++++--------------
.../src/aQute/bnd/component/ComponentDef.java | 1 -
.../src/aQute/bnd/component/FieldOption.java | 5 +++
.../src/aQute/bnd/component/HeaderReader.java | 1 -
.../src/aQute/bnd/component/ReferenceDef.java | 2 --
.../src/aQute/bnd/component/ReferenceScope.java | 13 ++++++++
.../src/aQute/bnd/component/ServiceScope.java | 14 ++++++++
.../src/aQute/bnd/http/HttpRequest.java | 23 -------------
.../src/aQute/bnd/obr/OBRFragment.java | 22 ++++++-------
biz.aQute.bndlib/src/aQute/bnd/osgi/Builder.java | 3 --
biz.aQute.bndlib/src/aQute/bnd/osgi/Contracts.java | 18 +++++-----
.../src/aQute/bnd/osgi/resource/CapReqBuilder.java | 12 +++----
.../src/aQute/bnd/osgi/resource/ResourceUtils.java | 18 ++++------
15 files changed, 76 insertions(+), 128 deletions(-)
create mode 100644 biz.aQute.bndlib/src/aQute/bnd/component/FieldOption.java
create mode 100644 biz.aQute.bndlib/src/aQute/bnd/component/ReferenceScope.java
create mode 100644 biz.aQute.bndlib/src/aQute/bnd/component/ServiceScope.java
diff --git a/biz.aQute.bnd/src/aQute/bnd/main/bnd.java b/biz.aQute.bnd/src/aQute/bnd/main/bnd.java
index 0a7affe..512d58f 100644
--- a/biz.aQute.bnd/src/aQute/bnd/main/bnd.java
+++ b/biz.aQute.bnd/src/aQute/bnd/main/bnd.java
@@ -4124,36 +4124,6 @@ public class bnd extends Processor {
}
/**
- * Resolve command
- *
- * @throws Exception
- */
-
- public void _resolve(ResolveCommand.ResolveOptions options) throws Exception {
- ResolveCommand rc = new ResolveCommand(this);
- String help = options._command().subCmd(options, rc);
- if (help != null)
- out.println(help);
- getInfo(rc);
- rc.close();
- }
-
- /**
- * Remote command
- *
- * @throws Exception
- */
-
- public void _remote(RemoteCommand.RemoteOptions options) throws Exception {
- RemoteCommand rc = new RemoteCommand(this, options);
- String help = options._command().subCmd(options, rc);
- if (help != null)
- out.println(help);
- getInfo(rc);
- rc.close();
- }
-
- /**
* Export a bndrun file
*/
diff --git a/biz.aQute.bndlib/src/aQute/bnd/build/Project.java b/biz.aQute.bndlib/src/aQute/bnd/build/Project.java
index b0740f1..8ad8831 100644
--- a/biz.aQute.bndlib/src/aQute/bnd/build/Project.java
+++ b/biz.aQute.bndlib/src/aQute/bnd/build/Project.java
@@ -43,8 +43,6 @@ import java.util.regex.Pattern;
import org.osgi.framework.namespace.IdentityNamespace;
import org.osgi.resource.Capability;
import org.osgi.resource.Requirement;
-import org.osgi.service.repository.ContentNamespace;
-import org.osgi.service.repository.Repository;
import aQute.bnd.build.Container.TYPE;
import aQute.bnd.header.Attrs;
@@ -1341,6 +1339,7 @@ public class Project extends Processor {
// If not, and if the repository implements the OSGi Repository
// Service, use a capability search on the osgi.content namespace.
+ /*
if (result == null && plugin instanceof Repository) {
Repository repo = (Repository) plugin;
@@ -1373,6 +1372,7 @@ public class Project extends Processor {
result = plugin.get(id, bndVersion, null, blocker);
}
}
+ */
if (result != null)
return toContainer(bsn, "hash", attrs, result, blocker);
diff --git a/biz.aQute.bndlib/src/aQute/bnd/component/AnnotationReader.java b/biz.aQute.bndlib/src/aQute/bnd/component/AnnotationReader.java
index 28d13ac..2a890fc 100644
--- a/biz.aQute.bndlib/src/aQute/bnd/component/AnnotationReader.java
+++ b/biz.aQute.bndlib/src/aQute/bnd/component/AnnotationReader.java
@@ -14,16 +14,11 @@ import java.util.regex.Pattern;
import org.osgi.service.component.annotations.Activate;
import org.osgi.service.component.annotations.Component;
-import org.osgi.service.component.annotations.ConfigurationPolicy;
import org.osgi.service.component.annotations.Deactivate;
-import org.osgi.service.component.annotations.FieldOption;
import org.osgi.service.component.annotations.Modified;
import org.osgi.service.component.annotations.Reference;
import org.osgi.service.component.annotations.ReferenceCardinality;
import org.osgi.service.component.annotations.ReferencePolicy;
-import org.osgi.service.component.annotations.ReferenceScope;
-import org.osgi.service.component.annotations.ServiceScope;
-import org.osgi.service.metatype.annotations.Designate;
import aQute.bnd.annotation.xml.XMLAttribute;
import aQute.bnd.component.DSAnnotations.Options;
@@ -232,8 +227,6 @@ public class AnnotationReader extends ClassDataCollector {
doModified();
else if (a instanceof Reference)
doReference((Reference) a, annotation);
- else if (a instanceof Designate)
- doDesignate((Designate) a);
else if (annotation.getName().getFQN().startsWith("aQute.bnd.annotation.component"))
handleMixedUsageError(annotation);
else {
@@ -290,11 +283,6 @@ public class AnnotationReader extends ClassDataCollector {
}
}
- protected void doDesignate(Designate a) {
- if (a.factory() && component.configurationPolicy == null)
- component.configurationPolicy = ConfigurationPolicy.REQUIRE;
- }
-
/**
*
*/
@@ -536,15 +524,15 @@ public class AnnotationReader extends ClassDataCollector {
}
def.className = className.getFQN();
def.name = reference.name();
- def.bind = reference.bind();
+ def.bind = "";
def.unbind = reference.unbind();
def.updated = reference.updated();
- def.field = reference.field();
- def.fieldOption = reference.fieldOption();
+ def.field = "";
+ def.fieldOption = FieldOption.REPLACE;
def.cardinality = reference.cardinality();
def.policy = reference.policy();
def.policyOption = reference.policyOption();
- def.scope = reference.scope();
+ def.scope = ReferenceScope.BUNDLE;
// Check if we have a target, this must be a filter
def.target = reference.target();
@@ -857,17 +845,17 @@ public class AnnotationReader extends ClassDataCollector {
component.factory = comp.factory();
if (annotation.get("immediate") != null)
component.immediate = comp.immediate();
- if (annotation.get("servicefactory") != null)
- component.scope = comp.servicefactory() ? ServiceScope.BUNDLE : ServiceScope.SINGLETON;
- if (annotation.get("scope") != null && comp.scope() != ServiceScope.DEFAULT) {
- component.scope = comp.scope();
- if (comp.scope() == ServiceScope.PROTOTYPE) {
- component.updateVersion(V1_3);
- }
- }
+// if (annotation.get("servicefactory") != null)
+// component.scope = comp.servicefactory() ? ServiceScope.BUNDLE : ServiceScope.SINGLETON;
+// if (annotation.get("scope") != null && comp.scope() != ServiceScope.DEFAULT) {
+// component.scope = comp.scope();
+// if (comp.scope() == ServiceScope.PROTOTYPE) {
+// component.updateVersion(V1_3);
+// }
+// }
if (annotation.get("configurationPid") != null) {
- component.configurationPid = comp.configurationPid();
+ component.configurationPid = new String[] {comp.configurationPid()};
if (component.configurationPid.length > 1) {
component.updateVersion(V1_3);
} else {
diff --git a/biz.aQute.bndlib/src/aQute/bnd/component/ComponentDef.java b/biz.aQute.bndlib/src/aQute/bnd/component/ComponentDef.java
index 38309fe..ba53142 100644
--- a/biz.aQute.bndlib/src/aQute/bnd/component/ComponentDef.java
+++ b/biz.aQute.bndlib/src/aQute/bnd/component/ComponentDef.java
@@ -9,7 +9,6 @@ import java.util.Map;
import java.util.TreeMap;
import org.osgi.service.component.annotations.ConfigurationPolicy;
-import org.osgi.service.component.annotations.ServiceScope;
import aQute.bnd.osgi.Analyzer;
import aQute.bnd.osgi.Descriptors.TypeRef;
diff --git a/biz.aQute.bndlib/src/aQute/bnd/component/FieldOption.java b/biz.aQute.bndlib/src/aQute/bnd/component/FieldOption.java
new file mode 100644
index 0000000..4b65c12
--- /dev/null
+++ b/biz.aQute.bndlib/src/aQute/bnd/component/FieldOption.java
@@ -0,0 +1,5 @@
+package aQute.bnd.component;
+enum FieldOption {
+ UPDATE,
+ REPLACE
+}
diff --git a/biz.aQute.bndlib/src/aQute/bnd/component/HeaderReader.java b/biz.aQute.bndlib/src/aQute/bnd/component/HeaderReader.java
index 2a64e20..b070fbd 100644
--- a/biz.aQute.bndlib/src/aQute/bnd/component/HeaderReader.java
+++ b/biz.aQute.bndlib/src/aQute/bnd/component/HeaderReader.java
@@ -16,7 +16,6 @@ import org.osgi.service.component.annotations.ConfigurationPolicy;
import org.osgi.service.component.annotations.ReferenceCardinality;
import org.osgi.service.component.annotations.ReferencePolicy;
import org.osgi.service.component.annotations.ReferencePolicyOption;
-import org.osgi.service.component.annotations.ServiceScope;
import aQute.bnd.component.error.DeclarativeServicesAnnotationError;
import aQute.bnd.component.error.DeclarativeServicesAnnotationError.ErrorType;
diff --git a/biz.aQute.bndlib/src/aQute/bnd/component/ReferenceDef.java b/biz.aQute.bndlib/src/aQute/bnd/component/ReferenceDef.java
index cc48f2d..d21d63b 100644
--- a/biz.aQute.bndlib/src/aQute/bnd/component/ReferenceDef.java
+++ b/biz.aQute.bndlib/src/aQute/bnd/component/ReferenceDef.java
@@ -1,10 +1,8 @@
package aQute.bnd.component;
-import org.osgi.service.component.annotations.FieldOption;
import org.osgi.service.component.annotations.ReferenceCardinality;
import org.osgi.service.component.annotations.ReferencePolicy;
import org.osgi.service.component.annotations.ReferencePolicyOption;
-import org.osgi.service.component.annotations.ReferenceScope;
import aQute.bnd.osgi.Analyzer;
import aQute.bnd.osgi.Verifier;
diff --git a/biz.aQute.bndlib/src/aQute/bnd/component/ReferenceScope.java b/biz.aQute.bndlib/src/aQute/bnd/component/ReferenceScope.java
new file mode 100644
index 0000000..70f2b78
--- /dev/null
+++ b/biz.aQute.bndlib/src/aQute/bnd/component/ReferenceScope.java
@@ -0,0 +1,13 @@
+package aQute.bnd.component;
+enum ReferenceScope {
+ BUNDLE("bundle"),
+ PROTOTYPE("prototype"),
+ PROTOTYPE_REQUIRED("prototype_required");
+ private final String value;
+ ReferenceScope(String value) {
+ this.value = value;
+ }
+ public String toString() {
+ return value;
+ }
+}
diff --git a/biz.aQute.bndlib/src/aQute/bnd/component/ServiceScope.java b/biz.aQute.bndlib/src/aQute/bnd/component/ServiceScope.java
new file mode 100644
index 0000000..aa49766
--- /dev/null
+++ b/biz.aQute.bndlib/src/aQute/bnd/component/ServiceScope.java
@@ -0,0 +1,14 @@
+package aQute.bnd.component;
+enum ServiceScope {
+ SINGLETON("singleton"),
+ BUNDLE("bundle"),
+ PROTOTYPE("prototype"),
+ DEFAULT("<<default>>");
+ private final String value;
+ ServiceScope(String value) {
+ this.value = value;
+ }
+ public String toString() {
+ return value;
+ }
+}
diff --git a/biz.aQute.bndlib/src/aQute/bnd/http/HttpRequest.java b/biz.aQute.bndlib/src/aQute/bnd/http/HttpRequest.java
index 8ab406f..2ed3278 100644
--- a/biz.aQute.bndlib/src/aQute/bnd/http/HttpRequest.java
+++ b/biz.aQute.bndlib/src/aQute/bnd/http/HttpRequest.java
@@ -9,9 +9,6 @@ import java.util.Map;
import java.util.concurrent.Executor;
import java.util.concurrent.TimeUnit;
-import org.osgi.util.promise.Deferred;
-import org.osgi.util.promise.Promise;
-
import aQute.bnd.osgi.Processor;
import aQute.bnd.service.url.TaggedData;
import aQute.lib.converter.TypeReference;
@@ -196,26 +193,6 @@ public class HttpRequest<T> {
return this;
}
- public Promise<T> async(final URL url) {
- this.url = url;
- final Deferred<T> deferred = new Deferred<>();
- Executor e = Processor.getExecutor();
- e.execute(new Runnable() {
-
- @Override
- public void run() {
- try {
- T result = (T) client.send(HttpRequest.this);
- deferred.resolve(result);
- } catch (Exception t) {
- deferred.fail(t);
- }
- }
-
- });
- return deferred.getPromise();
- }
-
@Override
public String toString() {
return "HttpRequest [verb=" + verb + ", upload=" + upload + ", download=" + download + ", headers=" + headers
diff --git a/biz.aQute.bndlib/src/aQute/bnd/obr/OBRFragment.java b/biz.aQute.bndlib/src/aQute/bnd/obr/OBRFragment.java
index 80cb5d2..ac0f70c 100644
--- a/biz.aQute.bndlib/src/aQute/bnd/obr/OBRFragment.java
+++ b/biz.aQute.bndlib/src/aQute/bnd/obr/OBRFragment.java
@@ -15,10 +15,8 @@ import org.osgi.framework.namespace.ExecutionEnvironmentNamespace;
import org.osgi.framework.namespace.HostNamespace;
import org.osgi.framework.namespace.IdentityNamespace;
import org.osgi.framework.namespace.PackageNamespace;
-import org.osgi.namespace.service.ServiceNamespace;
import org.osgi.resource.Capability;
import org.osgi.resource.Namespace;
-import org.osgi.service.repository.ContentNamespace;
import aQute.bnd.header.Attrs;
import aQute.bnd.header.Parameters;
@@ -217,10 +215,10 @@ public class OBRFragment {
//
for (Entry<String,Attrs> export : d.getParameters(Constants.EXPORT_SERVICE).entrySet()) {
- CapReqBuilder exportedService = new CapReqBuilder(ServiceNamespace.SERVICE_NAMESPACE);
+ CapReqBuilder exportedService = new CapReqBuilder("osgi.service");
String service = Processor.removeDuplicateMarker(export.getKey());
- exportedService.addAttribute(ServiceNamespace.SERVICE_NAMESPACE, service);
- exportedService.addAttribute(ServiceNamespace.CAPABILITY_OBJECTCLASS_ATTRIBUTE,
+ exportedService.addAttribute("osgi.service", service);
+ exportedService.addAttribute("objectClass",
export.getValue().get("objectclass"));
resource.addCapability(exportedService);
}
@@ -230,10 +228,10 @@ public class OBRFragment {
//
for (Entry<String,Attrs> imported : d.getParameters(Constants.IMPORT_SERVICE).entrySet()) {
- CapReqBuilder importedService = new CapReqBuilder(ServiceNamespace.SERVICE_NAMESPACE);
+ CapReqBuilder importedService = new CapReqBuilder("osgi.service");
String service = Processor.removeDuplicateMarker(imported.getKey());
importedService.addDirective(Namespace.REQUIREMENT_FILTER_DIRECTIVE,
- filter(ServiceNamespace.SERVICE_NAMESPACE, service, imported.getValue()));
+ filter("osgi.service", service, imported.getValue()));
resource.addRequirement(importedService);
}
@@ -276,16 +274,16 @@ public class OBRFragment {
if (!reporter.isOk())
return reporter;
- CapReqBuilder content = new CapReqBuilder(ContentNamespace.CONTENT_NAMESPACE);
+ CapReqBuilder content = new CapReqBuilder("osgi.content");
String sha = SHA1.digest(file).asHex();
- content.addAttribute(ContentNamespace.CONTENT_NAMESPACE, sha);
- content.addAttribute(ContentNamespace.CAPABILITY_SIZE_ATTRIBUTE, (long) file.length());
- content.addAttribute(ContentNamespace.CAPABILITY_MIME_ATTRIBUTE, MIME_TYPE_OSGI_BUNDLE);
+ content.addAttribute("osgi.content", sha);
+ content.addAttribute("size", (long) file.length());
+ content.addAttribute("mime", MIME_TYPE_OSGI_BUNDLE);
if (base != null) {
String path = file.getAbsolutePath();
if (base.startsWith(path)) {
- content.addAttribute(ContentNamespace.CAPABILITY_URL_ATTRIBUTE,
+ content.addAttribute("url",
path.substring(base.length()).replace(File.separatorChar, '/'));
} else {
reporter.error("Base path %s is not parent of file path: %s", base, file.getAbsolutePath());
diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/Builder.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/Builder.java
index c61ae1f..aa5f386 100644
--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/Builder.java
+++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/Builder.java
@@ -35,7 +35,6 @@ import aQute.bnd.make.component.ServiceComponent;
import aQute.bnd.make.metatype.MetatypePlugin;
import aQute.bnd.maven.PomPropertiesResource;
import aQute.bnd.maven.PomResource;
-import aQute.bnd.metatype.MetatypeAnnotations;
import aQute.bnd.osgi.Descriptors.PackageRef;
import aQute.bnd.osgi.Descriptors.TypeRef;
import aQute.bnd.service.SignerPlugin;
@@ -1569,7 +1568,6 @@ public class Builder extends Analyzer {
static ServiceComponent serviceComponent = new ServiceComponent();
static DSAnnotations dsAnnotations = new DSAnnotations();
static MetatypePlugin metatypePlugin = new MetatypePlugin();
- static MetatypeAnnotations metatypeAnnotations = new MetatypeAnnotations();
@Override
protected void setTypeSpecificPlugins(Set<Object> list) {
@@ -1578,7 +1576,6 @@ public class Builder extends Analyzer {
list.add(serviceComponent);
list.add(dsAnnotations);
list.add(metatypePlugin);
- list.add(metatypeAnnotations);
super.setTypeSpecificPlugins(list);
}
diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/Contracts.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/Contracts.java
index bf0c8e4..6fda472 100644
--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/Contracts.java
+++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/Contracts.java
@@ -7,8 +7,6 @@ import java.util.List;
import java.util.Map.Entry;
import java.util.Set;
-import org.osgi.namespace.contract.ContractNamespace;
-
import aQute.bnd.header.Attrs;
import aQute.bnd.header.Parameters;
import aQute.bnd.osgi.Descriptors.PackageRef;
@@ -73,13 +71,13 @@ class Contracts {
contract: for (Entry<String,Attrs> p : pcs.entrySet()) {
String namespace = p.getKey();
- if (namespace.equals(ContractNamespace.CONTRACT_NAMESPACE)) {
+ if (namespace.equals("osgi.contract")) {
Attrs capabilityAttrs = p.getValue();
- String name = capabilityAttrs.get(ContractNamespace.CONTRACT_NAMESPACE);
+ String name = capabilityAttrs.get("osgi.contract");
if (name == null) {
analyzer.warning("No name (attr %s) defined in bundle %s from contract namespace: %s",
- ContractNamespace.CONTRACT_NAMESPACE, from, capabilityAttrs);
+ "osgi.contract", from, capabilityAttrs);
continue contract;
}
@@ -96,7 +94,7 @@ class Contracts {
Contract c = new Contract();
c.name = name;
- String list = capabilityAttrs.get(ContractNamespace.CAPABILITY_USES_DIRECTIVE + ":");
+ String list = capabilityAttrs.get("uses" + ":");
if (list == null || list.length() == 0) {
analyzer.warning("Contract %s has no uses: directive in %s.", name, from);
continue contract; // next contract
@@ -104,7 +102,7 @@ class Contracts {
c.uses = Processor.split(list);
- c.version = (Version) capabilityAttrs.getTyped(ContractNamespace.CAPABILITY_VERSION_ATTRIBUTE);
+ c.version = (Version) capabilityAttrs.getTyped("version");
c.from = from;
if (c.version == null) {
@@ -159,14 +157,14 @@ class Contracts {
void addToRequirements(Parameters requirements) {
for (Contract c : contracts) {
Attrs attrs = new Attrs(c.decorators);
- attrs.put(ContractNamespace.CONTRACT_NAMESPACE, c.name);
- String name = ContractNamespace.CONTRACT_NAMESPACE;
+ attrs.put("osgi.contract", c.name);
+ String name = "osgi.contract";
while (requirements.containsKey(name))
name += "~";
Formatter f = new Formatter();
try {
- f.format("(&(%s=%s)(version=%s))", ContractNamespace.CONTRACT_NAMESPACE, c.name, c.version);
+ f.format("(&(%s=%s)(version=%s))", "osgi.contract", c.name, c.version);
// TODO : shall we also assert the attributes?
diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/CapReqBuilder.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/CapReqBuilder.java
index 251c762..bd9c7fb 100644
--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/CapReqBuilder.java
+++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/CapReqBuilder.java
@@ -17,14 +17,10 @@ import org.osgi.framework.namespace.ExecutionEnvironmentNamespace;
import org.osgi.framework.namespace.HostNamespace;
import org.osgi.framework.namespace.IdentityNamespace;
import org.osgi.framework.namespace.PackageNamespace;
-import org.osgi.namespace.contract.ContractNamespace;
-import org.osgi.namespace.extender.ExtenderNamespace;
-import org.osgi.namespace.service.ServiceNamespace;
import org.osgi.resource.Capability;
import org.osgi.resource.Namespace;
import org.osgi.resource.Requirement;
import org.osgi.resource.Resource;
-import org.osgi.service.repository.ContentNamespace;
import aQute.bnd.header.Attrs;
import aQute.bnd.header.Parameters;
@@ -412,11 +408,11 @@ public class CapReqBuilder {
}
public boolean isService() {
- return ServiceNamespace.SERVICE_NAMESPACE.equals(getNamespace());
+ return "osgi.service".equals(getNamespace());
}
public boolean isContract() {
- return ContractNamespace.CONTRACT_NAMESPACE.equals(getNamespace());
+ return "osgi.contract".equals(getNamespace());
}
public boolean isIdentity() {
@@ -424,7 +420,7 @@ public class CapReqBuilder {
}
public boolean isContent() {
- return ContentNamespace.CONTENT_NAMESPACE.equals(getNamespace());
+ return "osgi.content".equals(getNamespace());
}
public boolean isEE() {
@@ -432,7 +428,7 @@ public class CapReqBuilder {
}
public boolean isExtender() {
- return ExtenderNamespace.EXTENDER_NAMESPACE.equals(getNamespace());
+ return "osgi.extender".equals(getNamespace());
}
public Attrs toAttrs() {
diff --git a/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/ResourceUtils.java b/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/ResourceUtils.java
index 05d9023..c90b42e 100644
--- a/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/ResourceUtils.java
+++ b/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/ResourceUtils.java
@@ -23,14 +23,10 @@ import org.osgi.framework.namespace.ExecutionEnvironmentNamespace;
import org.osgi.framework.namespace.HostNamespace;
import org.osgi.framework.namespace.IdentityNamespace;
import org.osgi.framework.namespace.PackageNamespace;
-import org.osgi.namespace.contract.ContractNamespace;
-import org.osgi.namespace.extender.ExtenderNamespace;
-import org.osgi.namespace.service.ServiceNamespace;
import org.osgi.resource.Capability;
import org.osgi.resource.Namespace;
import org.osgi.resource.Requirement;
import org.osgi.resource.Resource;
-import org.osgi.service.repository.ContentNamespace;
import aQute.bnd.header.Attrs;
import aQute.bnd.version.Version;
@@ -182,7 +178,7 @@ public class ResourceUtils {
public static List<ContentCapability> getContentCapabilities(Resource resource) {
List<ContentCapability> result = new ArrayList<>();
- for (Capability c : resource.getCapabilities(ContentNamespace.CONTENT_NAMESPACE)) {
+ for (Capability c : resource.getCapabilities("osgi.content")) {
result.add(as(c, ContentCapability.class));
}
return result;
@@ -244,7 +240,7 @@ public class ResourceUtils {
}
public static URI getURI(Capability contentCapability) {
- Object uriObj = contentCapability.getAttributes().get(ContentNamespace.CAPABILITY_URL_ATTRIBUTE);
+ Object uriObj = contentCapability.getAttributes().get("url");
if (uriObj == null)
return null;
@@ -288,14 +284,14 @@ public class ResourceUtils {
name = HostNamespace.CAPABILITY_BUNDLE_VERSION_ATTRIBUTE;
else if (PackageNamespace.PACKAGE_NAMESPACE.equals(ns))
name = PackageNamespace.CAPABILITY_VERSION_ATTRIBUTE;
- else if (ServiceNamespace.SERVICE_NAMESPACE.equals(ns))
+ else if ("osgi.service".equals(ns))
name = null;
else if (ExecutionEnvironmentNamespace.EXECUTION_ENVIRONMENT_NAMESPACE.equals(ns))
name = ExecutionEnvironmentNamespace.CAPABILITY_VERSION_ATTRIBUTE;
- else if (ExtenderNamespace.EXTENDER_NAMESPACE.equals(ns))
- name = ExtenderNamespace.CAPABILITY_VERSION_ATTRIBUTE;
- else if (ContractNamespace.CONTRACT_NAMESPACE.equals(ns))
- name = ContractNamespace.CAPABILITY_VERSION_ATTRIBUTE;
+ else if ("osgi.extender".equals(ns))
+ name = "version";
+ else if ("osgi.contract".equals(ns))
+ name = "version";
else
name = null;
--
2.7.4

View File

@ -1,218 +0,0 @@
From 05d71f56ce6194bc32cf65f6589e7e035af02454 Mon Sep 17 00:00:00 2001
From: Michael Simacek <msimacek@redhat.com>
Date: Mon, 26 Sep 2016 10:08:36 +0200
Subject: [PATCH 3/3] Use felix annotations
---
.../src/aQute/bnd/component/AnnotationReader.java | 27 +++++++++++-----------
.../src/aQute/bnd/component/ComponentDef.java | 3 +--
.../src/aQute/bnd/component/DSAnnotations.java | 9 ++++----
.../src/aQute/bnd/component/HeaderReader.java | 17 +++++++-------
.../src/aQute/bnd/component/ReferenceDef.java | 7 +++---
5 files changed, 30 insertions(+), 33 deletions(-)
diff --git a/biz.aQute.bndlib/src/aQute/bnd/component/AnnotationReader.java b/biz.aQute.bndlib/src/aQute/bnd/component/AnnotationReader.java
index 2a890fc..c1d6a3f 100644
--- a/biz.aQute.bndlib/src/aQute/bnd/component/AnnotationReader.java
+++ b/biz.aQute.bndlib/src/aQute/bnd/component/AnnotationReader.java
@@ -12,14 +12,6 @@ import java.util.Map.Entry;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import org.osgi.service.component.annotations.Activate;
-import org.osgi.service.component.annotations.Component;
-import org.osgi.service.component.annotations.Deactivate;
-import org.osgi.service.component.annotations.Modified;
-import org.osgi.service.component.annotations.Reference;
-import org.osgi.service.component.annotations.ReferenceCardinality;
-import org.osgi.service.component.annotations.ReferencePolicy;
-
import aQute.bnd.annotation.xml.XMLAttribute;
import aQute.bnd.component.DSAnnotations.Options;
import aQute.bnd.component.error.DeclarativeServicesAnnotationError;
@@ -36,6 +28,13 @@ import aQute.bnd.osgi.Verifier;
import aQute.bnd.version.Version;
import aQute.bnd.xmlattribute.XMLAttributeFinder;
import aQute.lib.collections.MultiMap;
+import org.apache.felix.scr.annotations.Activate;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Deactivate;
+import org.apache.felix.scr.annotations.Modified;
+import org.apache.felix.scr.annotations.Reference;
+import org.apache.felix.scr.annotations.ReferenceCardinality;
+import org.apache.felix.scr.annotations.ReferencePolicy;
/**
* Processes spec DS annotations into xml.
@@ -621,11 +620,11 @@ public class AnnotationReader extends ClassDataCollector {
}
if (isCollection) {
if (def.cardinality == null)
- def.cardinality = ReferenceCardinality.MULTIPLE;
+ def.cardinality = ReferenceCardinality.OPTIONAL_MULTIPLE;
def.fieldCollectionType = fieldCollectionType;
}
- if (def.policy == ReferencePolicy.DYNAMIC && (def.cardinality == ReferenceCardinality.MULTIPLE
- || def.cardinality == ReferenceCardinality.AT_LEAST_ONE) && member.isFinal()) {
+ if (def.policy == ReferencePolicy.DYNAMIC && (def.cardinality == ReferenceCardinality.MANDATORY_MULTIPLE
+ || def.cardinality == ReferenceCardinality.MANDATORY_UNARY) && member.isFinal()) {
if (def.fieldOption == FieldOption.REPLACE)
analyzer.error(
"In component %s, collection type field: %s is final and dynamic but marked with 'replace' fieldOption. Changing this to 'update'.",
@@ -838,7 +837,7 @@ public class AnnotationReader extends ClassDataCollector {
component.implementation = clazz.getClassName();
component.name = comp.name();
component.factory = comp.factory();
- component.configurationPolicy = comp.configurationPolicy();
+ component.configurationPolicy = comp.policy();
if (annotation.get("enabled") != null)
component.enabled = comp.enabled();
if (annotation.get("factory") != null)
@@ -861,8 +860,9 @@ public class AnnotationReader extends ClassDataCollector {
} else {
component.updateVersion(V1_2);
}
- }
+ }
+ /*
if (annotation.get("xmlns") != null)
component.xmlns = comp.xmlns();
@@ -882,6 +882,7 @@ public class AnnotationReader extends ClassDataCollector {
}
doProperty(comp.property());
+ */
Object[] x = annotation.get("service");
if (x == null) {
diff --git a/biz.aQute.bndlib/src/aQute/bnd/component/ComponentDef.java b/biz.aQute.bndlib/src/aQute/bnd/component/ComponentDef.java
index ba53142..2cdc58d 100644
--- a/biz.aQute.bndlib/src/aQute/bnd/component/ComponentDef.java
+++ b/biz.aQute.bndlib/src/aQute/bnd/component/ComponentDef.java
@@ -8,8 +8,6 @@ import java.util.List;
import java.util.Map;
import java.util.TreeMap;
-import org.osgi.service.component.annotations.ConfigurationPolicy;
-
import aQute.bnd.osgi.Analyzer;
import aQute.bnd.osgi.Descriptors.TypeRef;
import aQute.bnd.version.Version;
@@ -18,6 +16,7 @@ import aQute.bnd.xmlattribute.Namespaces;
import aQute.bnd.xmlattribute.XMLAttributeFinder;
import aQute.lib.collections.MultiMap;
import aQute.lib.tag.Tag;
+import org.apache.felix.scr.annotations.ConfigurationPolicy;
/**
* This class just holds the information for the component, implementation, and
diff --git a/biz.aQute.bndlib/src/aQute/bnd/component/DSAnnotations.java b/biz.aQute.bndlib/src/aQute/bnd/component/DSAnnotations.java
index b48f5b9..74e3426 100644
--- a/biz.aQute.bndlib/src/aQute/bnd/component/DSAnnotations.java
+++ b/biz.aQute.bndlib/src/aQute/bnd/component/DSAnnotations.java
@@ -9,8 +9,6 @@ import java.util.Map;
import java.util.Set;
import java.util.TreeSet;
-import org.osgi.service.component.annotations.ReferenceCardinality;
-
import aQute.bnd.header.Attrs;
import aQute.bnd.header.OSGiHeader;
import aQute.bnd.header.Parameters;
@@ -25,6 +23,7 @@ import aQute.bnd.service.AnalyzerPlugin;
import aQute.bnd.version.Version;
import aQute.bnd.xmlattribute.XMLAttributeFinder;
import aQute.lib.strings.Strings;
+import org.apache.felix.scr.annotations.ReferenceCardinality;
/**
* Analyze the class space for any classes that have an OSGi annotation for DS.
@@ -138,9 +137,9 @@ public class DSAnnotations implements AnalyzerPlugin {
private void addServiceRequirement(ReferenceDef ref, MergedRequirement requires) {
String objectClass = ref.service;
ReferenceCardinality cardinality = ref.cardinality;
- boolean optional = cardinality == ReferenceCardinality.OPTIONAL || cardinality == ReferenceCardinality.MULTIPLE;
- boolean multiple = cardinality == ReferenceCardinality.MULTIPLE
- || cardinality == ReferenceCardinality.AT_LEAST_ONE;
+ boolean optional = cardinality == ReferenceCardinality.OPTIONAL_MULTIPLE || cardinality == ReferenceCardinality.OPTIONAL_UNARY;
+ boolean multiple = cardinality == ReferenceCardinality.MANDATORY_MULTIPLE
+ || cardinality == ReferenceCardinality.OPTIONAL_MULTIPLE;
String filter = "(objectClass=" + objectClass + ")";
requires.put(filter, "active", optional, multiple);
diff --git a/biz.aQute.bndlib/src/aQute/bnd/component/HeaderReader.java b/biz.aQute.bndlib/src/aQute/bnd/component/HeaderReader.java
index b070fbd..e1079b8 100644
--- a/biz.aQute.bndlib/src/aQute/bnd/component/HeaderReader.java
+++ b/biz.aQute.bndlib/src/aQute/bnd/component/HeaderReader.java
@@ -12,11 +12,6 @@ import java.util.StringTokenizer;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import org.osgi.service.component.annotations.ConfigurationPolicy;
-import org.osgi.service.component.annotations.ReferenceCardinality;
-import org.osgi.service.component.annotations.ReferencePolicy;
-import org.osgi.service.component.annotations.ReferencePolicyOption;
-
import aQute.bnd.component.error.DeclarativeServicesAnnotationError;
import aQute.bnd.component.error.DeclarativeServicesAnnotationError.ErrorType;
import aQute.bnd.osgi.Analyzer;
@@ -29,6 +24,10 @@ import aQute.bnd.osgi.Processor;
import aQute.bnd.osgi.Verifier;
import aQute.bnd.version.Version;
import aQute.lib.tag.Tag;
+import org.apache.felix.scr.annotations.ConfigurationPolicy;
+import org.apache.felix.scr.annotations.ReferenceCardinality;
+import org.apache.felix.scr.annotations.ReferencePolicy;
+import org.apache.felix.scr.annotations.ReferencePolicyOption;
public class HeaderReader extends Processor {
final static Pattern PROPERTY_PATTERN = Pattern
@@ -475,15 +474,15 @@ public class HeaderReader extends Processor {
if (optional.contains(referenceName)) {
if (multiple.contains(referenceName)) {
- rd.cardinality = ReferenceCardinality.MULTIPLE;
+ rd.cardinality = ReferenceCardinality.OPTIONAL_MULTIPLE;
} else {
- rd.cardinality = ReferenceCardinality.OPTIONAL;
+ rd.cardinality = ReferenceCardinality.OPTIONAL_UNARY;
}
} else {
if (multiple.contains(referenceName)) {
- rd.cardinality = ReferenceCardinality.AT_LEAST_ONE;
+ rd.cardinality = ReferenceCardinality.MANDATORY_MULTIPLE;
} else {
- rd.cardinality = ReferenceCardinality.MANDATORY;
+ rd.cardinality = ReferenceCardinality.MANDATORY_UNARY;
}
}
if (bind != null) {
diff --git a/biz.aQute.bndlib/src/aQute/bnd/component/ReferenceDef.java b/biz.aQute.bndlib/src/aQute/bnd/component/ReferenceDef.java
index d21d63b..679ff45 100644
--- a/biz.aQute.bndlib/src/aQute/bnd/component/ReferenceDef.java
+++ b/biz.aQute.bndlib/src/aQute/bnd/component/ReferenceDef.java
@@ -1,9 +1,5 @@
package aQute.bnd.component;
-import org.osgi.service.component.annotations.ReferenceCardinality;
-import org.osgi.service.component.annotations.ReferencePolicy;
-import org.osgi.service.component.annotations.ReferencePolicyOption;
-
import aQute.bnd.osgi.Analyzer;
import aQute.bnd.osgi.Verifier;
import aQute.bnd.version.Version;
@@ -11,6 +7,9 @@ import aQute.bnd.xmlattribute.ExtensionDef;
import aQute.bnd.xmlattribute.Namespaces;
import aQute.bnd.xmlattribute.XMLAttributeFinder;
import aQute.lib.tag.Tag;
+import org.apache.felix.scr.annotations.ReferenceCardinality;
+import org.apache.felix.scr.annotations.ReferencePolicy;
+import org.apache.felix.scr.annotations.ReferencePolicyOption;
/**
* Holds the information in the reference element.
--
2.7.4

View File

@ -1,6 +1,6 @@
Name: aqute-bnd
Version: 3.2.0
Release: 5%{?dist}
Version: 3.3.0
Release: 1%{?dist}
Summary: BND Tool
License: ASL 2.0
URL: http://bnd.bndtools.org/
@ -19,26 +19,24 @@ Source5: https://repo1.maven.org/maven2/biz/aQute/bnd/biz.aQute.bndlib/%{
Source6: https://repo1.maven.org/maven2/biz/aQute/bnd/biz.aQute.bnd.annotation/%{version}/biz.aQute.bnd.annotation-%{version}.pom
Patch0: 0001-Port-to-Java-8.patch
Patch1: 0002-Remove-unavailable-parts.patch
Patch2: 0003-Use-felix-annotations.patch
Patch1: 0002-Disable-removed-commands.patch
BuildRequires: maven-local
BuildRequires: mvn(ant:ant)
BuildRequires: mvn(junit:junit)
BuildRequires: mvn(org.apache.felix:org.apache.felix.framework)
BuildRequires: mvn(org.apache.felix:org.apache.felix.scr.annotations)
BuildRequires: mvn(org.apache.felix:org.osgi.compendium)
BuildRequires: mvn(org.apache.maven:maven-artifact)
BuildRequires: mvn(org.apache.maven:maven-compat)
BuildRequires: mvn(org.apache.maven:maven-core)
BuildRequires: mvn(org.apache.maven:maven-plugin-api)
BuildRequires: mvn(org.apache.maven.plugins:maven-plugin-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-source-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-javadoc-plugin)
BuildRequires: mvn(org.apache.maven.plugin-tools:maven-plugin-annotations)
BuildRequires: mvn(org.eclipse.aether:aether-api)
BuildRequires: mvn(org.osgi:org.osgi.annotation)
BuildRequires: mvn(org.osgi:osgi.annotation)
BuildRequires: mvn(org.osgi:osgi.cmpn)
BuildRequires: mvn(org.osgi:osgi.core)
BuildRequires: mvn(org.slf4j:slf4j-api)
BuildRequires: mvn(org.slf4j:slf4j-simple)
BuildRequires: mvn(org.sonatype.plexus:plexus-build-api)
@ -80,16 +78,9 @@ rm gradlew*
%patch0 -p1
%patch1 -p1
%patch2 -p1
# unavailable dependencies
rm -r biz.aQute.bndlib/src/aQute/bnd/{metatype,service/message,osgi/repository}
rm biz.aQute.bnd/src/aQute/bnd/main/{RemoteCommand,ReporterLogger,ResolveCommand}.java
find -name package-info.java -delete
# reference to Base64 is ambiguous
#find -name '*.java' -not -name 'Base64.java' | xargs sed -i 's/\<Base64\>/aQute.lib.base64.Base64/g'
# the commands pull in more dependencies than we want (felix-resolver, jetty)
rm biz.aQute.bnd/src/aQute/bnd/main/{RemoteCommand,ResolveCommand}.java
sed 's/@VERSION@/%{version}/' %SOURCE2 > pom.xml
sed -i 's|${Bundle-Version}|%{version}|' biz.aQute.bndlib/src/aQute/bnd/osgi/bnd.info
@ -98,29 +89,8 @@ sed -i 's|${Bundle-Version}|%{version}|' biz.aQute.bndlib/src/aQute/bnd/osgi/bnd
pushd aQute.libg
cp -p %{SOURCE3} pom.xml
%pom_add_parent biz.aQute.bnd:parent:%{version}
popd
# bnd
pushd biz.aQute.bnd
cp -p %{SOURCE4} pom.xml
%pom_add_parent biz.aQute.bnd:parent:%{version}
%pom_add_dep ant:ant
%pom_add_dep biz.aQute.bnd:biz.aQute.bndlib:%{version}
popd
# bndlib
pushd biz.aQute.bndlib
cp -p %{SOURCE5} pom.xml
%pom_add_parent biz.aQute.bnd:parent:%{version}
%pom_add_dep org.apache.felix:org.apache.felix.scr.annotations
%pom_add_dep org.apache.felix:org.osgi.compendium
%pom_add_dep org.osgi:org.osgi.annotation
%pom_add_dep org.apache.felix:org.apache.felix.framework
%pom_add_dep org.osgi:osgi.cmpn
%pom_add_dep org.slf4j:slf4j-api
%pom_add_dep biz.aQute.bnd:aQute.libg:%{version}
%pom_add_dep biz.aQute.bnd:biz.aQute.bnd.annotation:%{version}
popd
# bndlib.annotations
@ -129,10 +99,42 @@ cp -p %{SOURCE6} pom.xml
%pom_add_parent biz.aQute.bnd:parent:%{version}
popd
# bndlib
pushd biz.aQute.bndlib
cp -p %{SOURCE5} pom.xml
%pom_add_parent biz.aQute.bnd:parent:%{version}
%pom_add_dep org.osgi:osgi.annotation
%pom_add_dep org.osgi:osgi.core
%pom_add_dep org.osgi:osgi.cmpn
%pom_add_dep org.slf4j:slf4j-api
%pom_add_dep biz.aQute.bnd:aQute.libg:%{version}
%pom_add_dep biz.aQute.bnd:biz.aQute.bnd.annotation:%{version}
popd
# bnd
pushd biz.aQute.bnd
cp -p %{SOURCE4} pom.xml
%pom_add_parent biz.aQute.bnd:parent:%{version}
%pom_add_dep biz.aQute.bnd:biz.aQute.bndlib:%{version}
%pom_add_dep biz.aQute.bnd:aQute.libg:%{version}
%pom_add_dep biz.aQute.bnd:biz.aQute.bnd.annotation:%{version}
%pom_add_dep ant:ant
%pom_add_dep org.osgi:osgi.annotation
%pom_add_dep org.osgi:osgi.core
%pom_add_dep org.osgi:osgi.cmpn
%pom_add_dep org.slf4j:slf4j-api
%pom_add_dep org.slf4j:slf4j-simple:runtime
popd
# maven-plugins
%pom_xpath_inject pom:modules "<module>maven</module>"
# Unavailable reactor dependency - org.osgi.impl.bundle.repoindex.cli
%pom_disable_module bnd-indexer-maven-plugin maven
# Requires unbuilt parts of bnd
%pom_disable_module bnd-export-maven-plugin maven
# Integration tests require Internet access
%pom_remove_plugin -r :maven-invoker-plugin maven
@ -157,7 +159,7 @@ popd
install -d -m 755 %{buildroot}%{_sysconfdir}/ant.d
echo "aqute-bnd slf4j/api slf4j/simple felix/org.apache.felix.scr.annotations" >%{buildroot}%{_sysconfdir}/ant.d/%{name}
%jpackage_script aQute.bnd.main.bnd "" "" aqute-bnd:slf4j/slf4j-api:slf4j/slf4j-simple:felix/org.apache.felix.scr.annotations bnd 1
%jpackage_script aQute.bnd.main.bnd "" "" aqute-bnd:slf4j/slf4j-api:slf4j/slf4j-simple:osgi-annotation:osgi-core:osgi-compendium bnd 1
%files -f .mfiles
%license LICENSE
@ -173,6 +175,10 @@ echo "aqute-bnd slf4j/api slf4j/simple felix/org.apache.felix.scr.annotations" >
%license LICENSE
%changelog
* Thu Sep 29 2016 Michael Simacek <msimacek@redhat.com> - 3.3.0-1
- Update to upstream version 3.3.0
- Build against osgi-{core,compendium}
* Tue Sep 27 2016 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.2.0-5
- Add felix-scr-annotations to classpath

View File

@ -168,6 +168,7 @@
<module>biz.aQute.bndlib</module>
<module>biz.aQute.bnd</module>
<module>biz.aQute.bnd.annotation</module>
<module>maven</module>
</modules>
<build>

View File

@ -2,5 +2,5 @@
VERSION=`sed -rn 's/^Version:\s*([0-9.]+)/\1/p' aqute-bnd.spec`
wget https://github.com/bndtools/bnd/archive/$VERSION.REL.tar.gz
gunzip $VERSION.REL.tar.gz
tar tf $VERSION.REL.tar | grep '\.jar$' | xargs tar --delete --file $VERSION.REL.tar
tar tf $VERSION.REL.tar | grep -E '\.(.ar|exe|tar\.(gz|bz2|xz)|zip)$' | xargs tar --delete --file $VERSION.REL.tar
gzip $VERSION.REL.tar

10
sources
View File

@ -1,5 +1,5 @@
05575f8ee8d552de3ceb6c1fdf25c259 3.2.0.REL.tar.gz
d7a99d51ee84c15667cacab537e172d2 aQute.libg-3.2.0.pom
6b637063f05a20fe09ba1b34692a5be1 biz.aQute.bnd-3.2.0.pom
8a024cb3ab129989f1237d315d107fd9 biz.aQute.bndlib-3.2.0.pom
951a06549291cf4e140e83032bc15dbd biz.aQute.bnd.annotation-3.2.0.pom
615acce07ad7ad2f21eeda6a0177fda8 3.3.0.REL.tar.gz
88cb0801e5da7e7c2ac35da7264ce76f aQute.libg-3.3.0.pom
5797cc73f65e9e2b1ca20bb4e6f83bc9 biz.aQute.bnd-3.3.0.pom
76a08f44888a07318d4433115bb6dda2 biz.aQute.bndlib-3.3.0.pom
acf2827baa8eb970f43777a80b2add4a biz.aQute.bnd.annotation-3.3.0.pom