You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by da...@apache.org on 2018/04/27 09:58:51 UTC
[sling-org-apache-sling-feature-karaf] 10/11: [Feature Model]
Remove SlingConstants
This is an automated email from the ASF dual-hosted git repository.
davidb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-feature-karaf.git
commit fa822cf72d7414e1762531111c95d143eca0c557
Author: David Bosschaert <da...@gmail.com>
AuthorDate: Thu Apr 26 09:54:15 2018 +0100
[Feature Model] Remove SlingConstants
The 2 constants left in SlingConstants were only used once. Moved them
to the place they were used. With this the
org.apache.sling.feature.support package is now empty. I removed the
pacakge-info.java as well.
---
.../java/org/apache/sling/feature/karaf/KarafFeatureWriter.java | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/main/java/org/apache/sling/feature/karaf/KarafFeatureWriter.java b/src/main/java/org/apache/sling/feature/karaf/KarafFeatureWriter.java
index dc00bc1..6bea0f7 100644
--- a/src/main/java/org/apache/sling/feature/karaf/KarafFeatureWriter.java
+++ b/src/main/java/org/apache/sling/feature/karaf/KarafFeatureWriter.java
@@ -25,7 +25,6 @@ import org.apache.sling.feature.Feature;
import org.apache.sling.feature.FeatureConstants;
import org.apache.sling.feature.io.ArtifactHandler;
import org.apache.sling.feature.io.ArtifactManager;
-import org.apache.sling.feature.support.SlingConstants;
import java.io.File;
import java.io.FileInputStream;
@@ -48,6 +47,9 @@ import java.util.zip.ZipOutputStream;
*
*/
public class KarafFeatureWriter {
+ private static final String REQUIRE_REPOINIT_CAPABILITY =
+ "osgi.implementation;filter:=\"(&(osgi.implementation=org.apache.sling.jcr.repoinit)(version>=1.0)(!(version>=2.0)))\"";
+
public static void writeKAR(final OutputStream os,
final Feature feature,
@@ -74,8 +76,7 @@ public class KarafFeatureWriter {
if ( repoinitExt == null ) {
map = null;
} else {
- map = Collections.singletonMap("Require-Capability",
- SlingConstants.REQUIRE_REPOINIT_CAPABILITY);
+ map = Collections.singletonMap("Require-Capability", REQUIRE_REPOINIT_CAPABILITY);
}
ConfigurationUtil.createConfiguratorBundle(os,
configs,
--
To stop receiving notification emails like this one, please contact
davidb@apache.org.