This is an automated email from the ASF dual-hosted git repository.
cziegeler pushed a commit to branch master
in repository
https://gitbox.apache.org/repos/asf/sling-slingfeature-maven-plugin.git
The following commit(s) were added to refs/heads/master by this push:
new 023d163 SLING-9323 : api jar should not be resolvable
023d163 is described below
commit 023d163217d725a1dea2b205610f555678955f50
Author: Carsten Ziegeler <[email protected]>
AuthorDate: Thu Apr 2 16:00:48 2020 +0200
SLING-9323 : api jar should not be resolvable
---
src/main/java/org/apache/sling/feature/maven/mojos/ApisJarMojo.java | 4 ++++
1 file changed, 4 insertions(+)
diff --git
a/src/main/java/org/apache/sling/feature/maven/mojos/ApisJarMojo.java
b/src/main/java/org/apache/sling/feature/maven/mojos/ApisJarMojo.java
index c5823f6..b4778a5 100644
--- a/src/main/java/org/apache/sling/feature/maven/mojos/ApisJarMojo.java
+++ b/src/main/java/org/apache/sling/feature/maven/mojos/ApisJarMojo.java
@@ -1257,6 +1257,10 @@ public class ApisJarMojo extends
AbstractIncludingFeatureMojo {
if (project.getOrganization() != null) {
archiveConfiguration.addManifestEntry("Bundle-Vendor",
project.getOrganization().getName());
}
+
+ // add provide / require capability to make the jar unresolvable
+ archiveConfiguration.addManifestEntry("Provide-Capability",
"osgi.unresolvable");
+ archiveConfiguration.addManifestEntry("Require-Capability",
"osgi.unresolvable;filter:=\"(&(must.not.resolve=*)(!(must.not.resolve=*)))\",osgi.ee;filter:=\"(&(osgi.ee=JavaSE/compact2)(version=1.8))\"");
}
archiveConfiguration.addManifestEntry("Specification-Version",
ctx.getFeatureId().getVersion());
archiveConfiguration.addManifestEntry("Implementation-Title",
artifactName);