You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by gn...@apache.org on 2014/04/11 19:20:46 UTC
[24/33] Revert "[KARAF-2852] Merge features/core and features/command"
http://git-wip-us.apache.org/repos/asf/karaf/blob/0c8e8a81/features/core/src/test/java/org/apache/karaf/features/internal/service/BundleManagerTest.java
----------------------------------------------------------------------
diff --git a/features/core/src/test/java/org/apache/karaf/features/internal/service/BundleManagerTest.java b/features/core/src/test/java/org/apache/karaf/features/internal/service/BundleManagerTest.java
new file mode 100644
index 0000000..bed8104
--- /dev/null
+++ b/features/core/src/test/java/org/apache/karaf/features/internal/service/BundleManagerTest.java
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.karaf.features.internal.service;
+
+import org.apache.karaf.features.TestBase;
+
+public class BundleManagerTest extends TestBase {
+
+ /*
+ @Test
+ public void testfindBundlestoRefreshWithHostToRefresh() throws Exception {
+ Bundle hostBundle = createDummyBundle(12345l, "Host", headers());
+ Bundle fragmentBundle = createDummyBundle(54321l, "fragment", headers(Constants.FRAGMENT_HOST, "Host"));
+
+ BundleContext bundleContext = EasyMock.createMock(BundleContext.class);
+ BundleManager bundleManager = new BundleManager(bundleContext);
+
+ // Host was already installed, fragment is new
+ Set<Bundle> existing = new HashSet<Bundle>(Arrays.asList(hostBundle, fragmentBundle));
+ Set<Bundle> installed = new HashSet<Bundle>(Arrays.asList(fragmentBundle));
+
+ replay(bundleContext);
+ Set<Bundle> bundles = bundleManager.findBundlesWithFragmentsToRefresh(existing, installed);
+ EasyMock.verify(bundleContext);
+
+ Assert.assertEquals(1, bundles.size());
+ Assert.assertEquals(hostBundle, bundles.iterator().next());
+ }
+
+ @Test
+ public void testfindBundlestoRefreshWithOptionalPackages() throws Exception {
+ Bundle exporterBundle = createDummyBundle(12345l, "exporter", headers(Constants.EXPORT_PACKAGE, "org.my.package"));
+ Bundle importerBundle = createDummyBundle(54321l, "importer", headers(Constants.IMPORT_PACKAGE, "org.my.package;resolution:=optional"));
+
+ BundleContext bundleContext = EasyMock.createMock(BundleContext.class);
+ BundleManager bundleManager = new BundleManager(bundleContext);
+
+ // Importer was already installed, exporter is new
+ Set<Bundle> existing = new HashSet<Bundle>(Arrays.asList(importerBundle, exporterBundle));
+ Set<Bundle> installed = new HashSet<Bundle>(Arrays.asList(exporterBundle));
+
+ replay(bundleContext);
+ Set<Bundle> bundles = bundleManager.findBundlesWithOptionalPackagesToRefresh(existing, installed);
+ EasyMock.verify(bundleContext);
+
+ Assert.assertEquals(1, bundles.size());
+ Assert.assertEquals(importerBundle, bundles.iterator().next());
+ }
+ */
+}
http://git-wip-us.apache.org/repos/asf/karaf/blob/0c8e8a81/features/core/src/test/java/org/apache/karaf/features/internal/service/FeaturesServiceImplTest.java
----------------------------------------------------------------------
diff --git a/features/core/src/test/java/org/apache/karaf/features/internal/service/FeaturesServiceImplTest.java b/features/core/src/test/java/org/apache/karaf/features/internal/service/FeaturesServiceImplTest.java
new file mode 100644
index 0000000..b8b5fc0
--- /dev/null
+++ b/features/core/src/test/java/org/apache/karaf/features/internal/service/FeaturesServiceImplTest.java
@@ -0,0 +1,167 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.karaf.features.internal.service;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.fail;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.Map;
+
+import org.apache.karaf.features.Feature;
+import org.apache.karaf.features.TestBase;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Test cases for {@link org.apache.karaf.features.internal.service.FeaturesServiceImpl}
+ */
+public class FeaturesServiceImplTest extends TestBase {
+
+ File dataFile;
+
+ @Before
+ public void setUp() throws IOException {
+ dataFile = File.createTempFile("features", null, null);
+ }
+
+ @Test
+ public void testGetFeature() throws Exception {
+ Feature transactionFeature = feature("transaction", "1.0.0");
+ final Map<String, Map<String, Feature>> features = features(transactionFeature);
+ final FeaturesServiceImpl impl = new FeaturesServiceImpl(null, null, new Storage(), null, null, null, "", null, null, null) {
+ protected Map<String,Map<String,Feature>> getFeatures() throws Exception {
+ return features;
+ }
+ };
+ assertNotNull(impl.getFeature("transaction", org.apache.karaf.features.internal.model.Feature.DEFAULT_VERSION));
+ assertSame(transactionFeature, impl.getFeature("transaction", org.apache.karaf.features.internal.model.Feature.DEFAULT_VERSION));
+ }
+
+ @Test
+ public void testGetFeatureStripVersion() throws Exception {
+ final FeaturesServiceImpl impl = new FeaturesServiceImpl(null, null, new Storage(), null, null, null, "", null, null, null) {
+ protected Map<String,Map<String,Feature>> getFeatures() throws Exception {
+ return features(feature("transaction", "1.0.0"));
+ }
+ };
+ Feature feature = impl.getFeature("transaction", " 1.0.0 ");
+ assertNotNull(feature);
+ assertSame("transaction", feature.getName());
+ }
+
+ @Test
+ public void testGetFeatureNotAvailable() throws Exception {
+ final FeaturesServiceImpl impl = new FeaturesServiceImpl(null, null, new Storage(), null, null, null, "", null, null, null) {
+ protected Map<String,Map<String,Feature>> getFeatures() throws Exception {
+ return features(feature("transaction", "1.0.0"));
+ }
+ };
+ assertNull(impl.getFeature("activemq", org.apache.karaf.features.internal.model.Feature.DEFAULT_VERSION));
+ }
+
+ @Test
+ public void testGetFeatureHighestAvailable() throws Exception {
+ final Map<String, Map<String, Feature>> features = features(
+ feature("transaction", "1.0.0"),
+ feature("transaction", "2.0.0")
+ );
+ final FeaturesServiceImpl impl = new FeaturesServiceImpl(null, null, new Storage(), null, null, null, "", null, null, null) {
+ protected Map<String,Map<String,Feature>> getFeatures() throws Exception {
+ return features;
+ }
+ };
+ assertNotNull(impl.getFeature("transaction", org.apache.karaf.features.internal.model.Feature.DEFAULT_VERSION));
+ assertSame("2.0.0", impl.getFeature("transaction", org.apache.karaf.features.internal.model.Feature.DEFAULT_VERSION).getVersion());
+ }
+
+ /**
+ * This test ensures that every feature get installed only once, even if it appears multiple times in the list
+ * of transitive feature dependencies (KARAF-1600)
+ */
+ /*
+ @Test
+ @SuppressWarnings("unchecked")
+ public void testNoDuplicateFeaturesInstallation() throws Exception {
+ final List<Feature> installed = new LinkedList<Feature>();
+ BundleManager bundleManager = EasyMock.createMock(BundleManager.class);
+ expect(bundleManager.installBundleIfNeeded(EasyMock.anyObject(String.class), EasyMock.anyInt(), EasyMock.anyObject(String.class)))
+ .andReturn(new BundleInstallerResult(createDummyBundle(1l, "", headers()), true)).anyTimes();
+ bundleManager.refreshBundles(EasyMock.anyObject(Set.class), EasyMock.anyObject(Set.class), EasyMock.anyObject(EnumSet.class));
+ EasyMock.expectLastCall();
+ final FeaturesServiceImpl impl = new FeaturesServiceImpl(bundleManager, null) {
+ // override methods which refers to bundle context to avoid mocking everything
+ @Override
+ protected boolean loadState() {
+ return true;
+ }
+
+ @Override
+ protected void saveState() {
+
+ }
+
+ @Override
+ protected void doInstallFeature(InstallationState state, Feature feature, boolean verbose) throws Exception {
+ installed.add(feature);
+
+ super.doInstallFeature(state, feature, verbose);
+ }
+
+ };
+ replay(bundleManager);
+ impl.addRepository(getClass().getResource("repo2.xml").toURI());
+ impl.installFeature("all");
+
+ // copying the features to a set to filter out the duplicates
+ Set<Feature> noduplicates = new HashSet<Feature>();
+ noduplicates.addAll(installed);
+
+ assertEquals("Every feature should only have been installed once", installed.size(), noduplicates.size());
+ }
+
+ @Test
+ public void testGetOptionalImportsOnly() {
+ BundleManager bundleManager = new BundleManager(null, 0l);
+
+ List<Clause> result = bundleManager.getOptionalImports("org.apache.karaf,org.apache.karaf.optional;resolution:=optional");
+ assertEquals("One optional import expected", 1, result.size());
+ assertEquals("org.apache.karaf.optional", result.get(0).getName());
+
+ result = bundleManager.getOptionalImports(null);
+ assertNotNull(result);
+ assertEquals("No optional imports expected", 0, result.size());
+ }
+ */
+
+ static class Storage extends StateStorage {
+ @Override
+ protected InputStream getInputStream() throws IOException {
+ return null;
+ }
+ @Override
+ protected OutputStream getOutputStream() throws IOException {
+ return null;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/karaf/blob/0c8e8a81/features/core/src/test/java/org/apache/karaf/features/internal/service/FeaturesValidationTest.java
----------------------------------------------------------------------
diff --git a/features/core/src/test/java/org/apache/karaf/features/internal/service/FeaturesValidationTest.java b/features/core/src/test/java/org/apache/karaf/features/internal/service/FeaturesValidationTest.java
new file mode 100644
index 0000000..9e33ee3
--- /dev/null
+++ b/features/core/src/test/java/org/apache/karaf/features/internal/service/FeaturesValidationTest.java
@@ -0,0 +1,102 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.karaf.features.internal.service;
+
+import java.io.InputStream;
+import java.net.URL;
+
+import org.apache.karaf.features.Repository;
+import org.apache.karaf.features.internal.model.Features;
+import org.apache.karaf.features.internal.model.JaxbUtil;
+import org.junit.Test;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.fail;
+
+public class FeaturesValidationTest {
+
+ @Test
+ public void testNs10() throws Exception {
+ FeatureValidationUtil.validate(getClass().getResource("f02.xml").toURI());
+ }
+
+ @Test
+ public void testNs10Unmarshall() throws Exception {
+ URL url = getClass().getResource("f02.xml");
+ Features features = JaxbUtil.unmarshal(url.toExternalForm(), true);
+ assertNotNull(features);
+ }
+
+ @Test
+ public void testNs10NoName() throws Exception {
+ FeatureValidationUtil.validate(getClass().getResource("f03.xml").toURI());
+ }
+
+ @Test
+ public void testNs10NoNameUnmarshall() throws Exception {
+ URL url = getClass().getResource("f03.xml");
+ Features features = JaxbUtil.unmarshal(url.toExternalForm(), true);
+ assertNotNull(features);
+ }
+
+ @Test
+ public void testNs11() throws Exception {
+ FeatureValidationUtil.validate(getClass().getResource("f04.xml").toURI());
+ }
+
+ @Test
+ public void testNs11Unmarshall() throws Exception {
+ URL url = getClass().getResource("f04.xml");
+ Features features = JaxbUtil.unmarshal(url.toExternalForm(), true);
+ assertNotNull(features);
+ }
+
+ @Test
+ public void testNs11NoName() throws Exception {
+ try {
+ FeatureValidationUtil.validate(getClass().getResource("f05.xml").toURI());
+ fail("Validation should have failed");
+ } catch (Exception e) {
+ // ok
+ }
+ }
+
+ @Test
+ public void testNs12() throws Exception {
+ FeatureValidationUtil.validate(getClass().getResource("f06.xml").toURI());
+ }
+
+ @Test
+ public void testNs12Unmarshall() throws Exception {
+ URL url = getClass().getResource("f06.xml");
+ Features features = JaxbUtil.unmarshal(url.toExternalForm(), true);
+ assertNotNull(features);
+ }
+
+ @Test
+ public void testNs13() throws Exception {
+ FeatureValidationUtil.validate(getClass().getResource("f07.xml").toURI());
+ }
+
+ @Test
+ public void testNs13Unmarshall() throws Exception {
+ URL url = getClass().getResource("f07.xml");
+ Features features = JaxbUtil.unmarshal(url.toExternalForm(), true);
+ assertNotNull(features);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/karaf/blob/0c8e8a81/features/core/src/test/java/org/apache/karaf/features/internal/service/OverridesTest.java
----------------------------------------------------------------------
diff --git a/features/core/src/test/java/org/apache/karaf/features/internal/service/OverridesTest.java b/features/core/src/test/java/org/apache/karaf/features/internal/service/OverridesTest.java
new file mode 100644
index 0000000..c4976cf
--- /dev/null
+++ b/features/core/src/test/java/org/apache/karaf/features/internal/service/OverridesTest.java
@@ -0,0 +1,208 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.karaf.features.internal.service;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.Writer;
+import java.net.URI;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.felix.utils.manifest.Clause;
+import org.apache.felix.utils.manifest.Parser;
+import org.apache.karaf.features.BundleInfo;
+import org.apache.karaf.features.internal.model.Bundle;
+import org.apache.karaf.features.internal.resolver.ResourceBuilder;
+import org.apache.karaf.features.internal.resolver.UriNamespace;
+import org.junit.Before;
+import org.junit.Test;
+import org.ops4j.pax.tinybundles.core.TinyBundles;
+import org.osgi.framework.BundleException;
+import org.osgi.resource.Resource;
+
+import static org.apache.karaf.features.internal.resolver.UriNamespace.getUri;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+public class OverridesTest {
+
+ private String bsn = "bsn";
+ private Resource b100;
+ private Resource b101;
+ private Resource b102;
+ private Resource b110;
+ private Resource c100;
+ private Resource c101;
+ private Resource c110;
+
+ @Before
+ public void setUp() throws BundleException {
+ b100 = resource("karaf-100.jar")
+ .set("Bundle-SymbolicName", bsn)
+ .set("Bundle-Version", "1.0.0")
+ .build();
+
+ b101 = resource("karaf-101.jar")
+ .set("Bundle-SymbolicName", bsn)
+ .set("Bundle-Version", "1.0.1")
+ .build();
+
+ b102 = resource("karaf-102.jar")
+ .set("Bundle-SymbolicName", bsn)
+ .set("Bundle-Version", "1.0.2")
+ .build();
+
+ b110 = resource("karaf-110.jar")
+ .set("Bundle-SymbolicName", bsn)
+ .set("Bundle-Version", "1.1.0")
+ .build();
+
+ c100 = resource("karafc-100.jar")
+ .set("Bundle-SymbolicName", bsn)
+ .set("Bundle-Version", "1.0.0")
+ .set("Bundle-Vendor", "Apache")
+ .build();
+
+ c101 = resource("karafc-101.jar")
+ .set("Bundle-SymbolicName", bsn)
+ .set("Bundle-Version", "1.0.1")
+ .set("Bundle-Vendor", "NotApache")
+ .build();
+
+ c110 = resource("karafc-110.jar")
+ .set("Bundle-SymbolicName", bsn)
+ .set("Bundle-Version", "1.1.0")
+ .set("Bundle-Vendor", "NotApache")
+ .build();
+ }
+
+ @Test
+ public void testDifferentVendors() throws IOException {
+ Map<String, Resource> map = asResourceMap(c100, c101, c110);
+ assertEquals(c100, map.get(getUri(c100)));
+ Overrides.override(map, Arrays.asList(getUri(c101), getUri(c110)));
+ assertEquals(c101, map.get(getUri(c100)));
+ }
+
+ @Test
+ public void testMatching101() throws IOException {
+ Map<String, Resource> map = asResourceMap(b100, b101, b110);
+ assertEquals(b100, map.get(getUri(b100)));
+ Overrides.override(map, Arrays.asList(getUri(b101), getUri(b110)));
+ assertEquals(b101, map.get(getUri(b100)));
+ }
+
+ @Test
+ public void testMatching102() throws IOException {
+ Map<String, Resource> map = asResourceMap(b100, b101, b102, b110);
+ assertEquals(b100, map.get(getUri(b100)));
+ Overrides.override(map, Arrays.asList(getUri(b101), getUri(b102), getUri(b110)));
+ assertEquals(b102, map.get(getUri(b100)));
+ }
+
+ @Test
+ public void testMatchingRange() throws IOException {
+ Map<String, Resource> map = asResourceMap(b100, b101, b110);
+ assertEquals(b100, map.get(getUri(b100)));
+ Overrides.override(map, Arrays.asList(getUri(b101), getUri(b110) + ";range=\"[1.0, 2.0)\""));
+ assertEquals(b110, map.get(getUri(b100)));
+ }
+
+ @Test
+ public void testNotMatching() throws IOException {
+ Map<String, Resource> map = asResourceMap(b100, b110);
+ assertEquals(b100, map.get(getUri(b100)));
+ Overrides.override(map, Arrays.asList(getUri(b110)));
+ assertEquals(b100, map.get(getUri(b100)));
+ }
+
+ @Test
+ public void testLoadOverrides() {
+ Set<String> overrides = Overrides.loadOverrides(getClass().getResource("overrides.properties").toExternalForm());
+ assertEquals(2, overrides.size());
+
+ Clause karafAdminCommand = null;
+ Clause karafAdminCore = null;
+ for (Clause clause : Parser.parseClauses(overrides.toArray(new String[overrides.size()]))) {
+ if (clause.getName().equals("mvn:org.apache.karaf.admin/org.apache.karaf.admin.command/2.3.0.redhat-61033X")) {
+ karafAdminCommand = clause;
+ }
+ if (clause.getName().equals("mvn:org.apache.karaf.admin/org.apache.karaf.admin.core/2.3.0.redhat-61033X")) {
+ karafAdminCore = clause;
+ }
+ }
+ assertNotNull("Missing admin.command bundle override", karafAdminCommand);
+ assertNotNull("Missing admin.core bundle override", karafAdminCore);
+ assertNotNull("Missing range on admin.core override", karafAdminCore.getAttribute(Overrides.OVERRIDE_RANGE));
+ }
+
+ /**
+ * Copies the content of {@link java.io.InputStream} to {@link java.io.OutputStream}.
+ *
+ * @param input
+ * @param output
+ * @throws java.io.IOException
+ */
+ private void copy(final InputStream input, final OutputStream output) throws IOException {
+ byte[] buffer = new byte[1024 * 16];
+ int n;
+ while (-1 != (n = input.read(buffer))) {
+ output.write(buffer, 0, n);
+ output.flush();
+ }
+ input.close();
+ output.close();
+ }
+
+ static Builder resource(String uri) {
+ return new Builder(uri);
+ }
+
+ static Map<String, Resource> asResourceMap(Resource... resources) {
+ Map<String, Resource> map = new HashMap<String, Resource>();
+ for (Resource resource : resources) {
+ map.put(getUri(resource), resource);
+ }
+ return map;
+ }
+
+ static class Builder {
+ String uri;
+ Map<String,String> headers = new HashMap<String,String>();
+ Builder(String uri) {
+ this.uri = uri;
+ this.headers.put("Bundle-ManifestVersion", "2");
+ }
+ Builder set(String key, String value) {
+ this.headers.put(key, value);
+ return this;
+ }
+ Resource build() throws BundleException {
+ return ResourceBuilder.build(uri, headers);
+ }
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/karaf/blob/0c8e8a81/features/core/src/test/resources/org/apache/karaf/features/internal/service/f01.xml
----------------------------------------------------------------------
diff --git a/features/core/src/test/resources/org/apache/karaf/features/internal/service/f01.xml b/features/core/src/test/resources/org/apache/karaf/features/internal/service/f01.xml
new file mode 100644
index 0000000..814c722
--- /dev/null
+++ b/features/core/src/test/resources/org/apache/karaf/features/internal/service/f01.xml
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<features name="karaf-2.0.0">
+ <feature name="spring" version="3.0.3.RELEASE">
+ <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aopalliance/1.0_6</bundle>
+ <bundle>mvn:org.springframework/spring-core/3.0.3.RELEASE</bundle>
+ <bundle>mvn:org.springframework/spring-asm/3.0.3.RELEASE</bundle>
+ <bundle>mvn:org.springframework/spring-expression/3.0.3.RELEASE</bundle>
+ <bundle>mvn:org.springframework/spring-beans/3.0.3.RELEASE</bundle>
+ <bundle>mvn:org.springframework/spring-aop/3.0.3.RELEASE</bundle>
+ <bundle>mvn:org.springframework/spring-context/3.0.3.RELEASE</bundle>
+ <bundle>mvn:org.springframework/spring-context-support/3.0.3.RELEASE</bundle>
+ </feature>
+ <feature name="spring-dm" version="1.2.0">
+ <feature version="3.0.3.RELEASE">spring</feature>
+ <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.cglib/2.2.2_1</bundle>
+ <bundle>mvn:org.springframework.osgi/spring-osgi-io/1.2.0</bundle>
+ <bundle>mvn:org.springframework.osgi/spring-osgi-core/1.2.0</bundle>
+ <bundle>mvn:org.springframework.osgi/spring-osgi-extender/1.2.0</bundle>
+ <bundle>mvn:org.springframework.osgi/spring-osgi-annotation/1.2.0</bundle>
+ <bundle>mvn:org.apache.karaf.deployer/org.apache.karaf.deployer.spring/2.0.0</bundle>
+ </feature>
+ <feature name="wrapper" version="2.0.0">
+ <bundle>mvn:org.apache.karaf.shell/org.apache.karaf.shell.wrapper/2.0.0</bundle>
+ </feature>
+ <feature name="obr" version="2.0.0">
+ <bundle>mvn:org.apache.felix/org.apache.felix.bundlerepository/1.6.4</bundle>
+ <bundle>mvn:org.apache.karaf.shell/org.apache.karaf.shell.obr/2.0.0</bundle>
+ <bundle>mvn:org.apache.karaf.features/org.apache.karaf.features.obr/2.0.0</bundle>
+ </feature>
+ <feature name="http" version="2.0.0">
+ <config name="org.ops4j.pax.web">
+ org.osgi.service.http.port=8181
+ </config>
+ <bundle>mvn:org.apache.geronimo.specs/geronimo-servlet_2.5_spec/1.1.2</bundle>
+ <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jetty-bundle/6.1.22_1</bundle>
+ <bundle>mvn:org.ops4j.pax.web/pax-web-api/0.7.2</bundle>
+ <bundle>mvn:org.ops4j.pax.web/pax-web-spi/0.7.2</bundle>
+ <bundle>mvn:org.ops4j.pax.web/pax-web-runtime/0.7.2</bundle>
+ <bundle>mvn:org.ops4j.pax.web/pax-web-jetty/0.7.2</bundle>
+ </feature>
+ <feature name="war" version="2.0.0">
+ <feature version="2.0.0">http</feature>
+ <bundle>mvn:org.ops4j.pax.web/pax-web-jsp/0.7.2</bundle>
+ <bundle>mvn:org.ops4j.pax.web/pax-web-extender-war/0.7.2</bundle>
+ <bundle>mvn:org.ops4j.pax.web/pax-web-extender-whiteboard/0.7.2</bundle>
+ <bundle>mvn:org.ops4j.pax.url/pax-url-war/1.1.3</bundle>
+ <bundle>mvn:org.apache.karaf.deployer/org.apache.karaf.deployer.war/2.0.0</bundle>
+ </feature>
+ <feature name="webconsole" version="2.0.0">
+ <feature version="2.0.0">http</feature>
+ <config name="org.apache.karaf.webconsole">
+ realm=karaf
+ </config>
+ <bundle>mvn:org.apache.felix/org.apache.felix.metatype/1.0.2</bundle>
+ <bundle>mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.branding/2.0.0</bundle>
+ <bundle>mvn:org.apache.felix/org.apache.felix.webconsole/3.1.0</bundle>
+ <bundle>mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.admin/2.0.0</bundle>
+ <bundle>mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.features/2.0.0</bundle>
+ <bundle>mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.gogo/2.0.0</bundle>
+ </feature>
+ <feature name="ssh" version="2.0.0">
+ <config name="org.apache.karaf.shell.ssh">
+ sshPort=8101
+ sshHost=0.0.0.0
+ sshRealm=karaf
+ </config>
+ <bundle>mvn:org.apache.mina/mina-core/2.0.0-RC1</bundle>
+ <bundle>mvn:org.apache.sshd/sshd-core/0.4.0</bundle>
+ <bundle>mvn:org.apache.karaf.shell/org.apache.karaf.shell.ssh/2.0.0</bundle>
+ </feature>
+ <feature name="management" version="2.0.0">
+ <bundle>mvn:org.apache.karaf/org.apache.karaf.management/2.0.0</bundle>
+ <bundle>mvn:org.apache.aries.jmx/org.apache.aries.jmx/0.1-r964701</bundle>
+ <bundle>mvn:org.apache.aries.jmx/org.apache.aries.jmx.blueprint/0.1-r964701</bundle>
+ </feature>
+</features>
http://git-wip-us.apache.org/repos/asf/karaf/blob/0c8e8a81/features/core/src/test/resources/org/apache/karaf/features/internal/service/f02.xml
----------------------------------------------------------------------
diff --git a/features/core/src/test/resources/org/apache/karaf/features/internal/service/f02.xml b/features/core/src/test/resources/org/apache/karaf/features/internal/service/f02.xml
new file mode 100644
index 0000000..1578faa
--- /dev/null
+++ b/features/core/src/test/resources/org/apache/karaf/features/internal/service/f02.xml
@@ -0,0 +1,164 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<features name="karaf-2.2.0" xmlns="http://karaf.apache.org/xmlns/features/v1.0.0">
+ <feature name="spring" version="2.5.6.SEC02" resolver="(obr)">
+ <bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aopalliance/1.0_6</bundle>
+ <bundle>mvn:org.springframework/spring-core/2.5.6.SEC02</bundle>
+ <bundle>mvn:org.springframework/spring-beans/2.5.6.SEC02</bundle>
+ <bundle>mvn:org.springframework/spring-aop/2.5.6.SEC02</bundle>
+ <bundle>mvn:org.springframework/spring-context/2.5.6.SEC02</bundle>
+ <bundle>mvn:org.springframework/spring-context-support/2.5.6.SEC02</bundle>
+ </feature>
+ <feature name="spring-web" version="2.5.6.SEC02" resolver="(obr)">
+ <feature version="2.5.6.SEC02">spring</feature>
+ <feature version="2.2.0">http</feature>
+ <bundle>mvn:org.springframework/spring-web/2.5.6.SEC02</bundle>
+ <bundle>mvn:org.springframework/spring-webmvc/2.5.6.SEC02</bundle>
+ </feature>
+ <feature name="spring" version="3.0.5.RELEASE" resolver="(obr)">
+ <bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aopalliance/1.0_6</bundle>
+ <bundle>mvn:org.springframework/spring-core/3.0.5.RELEASE</bundle>
+ <bundle>mvn:org.springframework/spring-asm/3.0.5.RELEASE</bundle>
+ <bundle>mvn:org.springframework/spring-expression/3.0.5.RELEASE</bundle>
+ <bundle>mvn:org.springframework/spring-beans/3.0.5.RELEASE</bundle>
+ <bundle>mvn:org.springframework/spring-aop/3.0.5.RELEASE</bundle>
+ <bundle>mvn:org.springframework/spring-context/3.0.5.RELEASE</bundle>
+ <bundle>mvn:org.springframework/spring-context-support/3.0.5.RELEASE</bundle>
+ </feature>
+ <feature name="spring-web" version="3.0.5.RELEASE" resolver="(obr)">
+ <feature version="3.0.5.RELEASE">spring</feature>
+ <feature version="2.2.0">http</feature>
+ <bundle>mvn:org.springframework/spring-web/3.0.5.RELEASE</bundle>
+ <bundle>mvn:org.springframework/spring-webmvc/3.0.5.RELEASE</bundle>
+ </feature>
+ <feature name="spring-dm" version="1.2.1" resolver="(obr)">
+ <feature version="[2.5.6,4)">spring</feature>
+ <bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.cglib/2.2.2_1</bundle>
+ <bundle>mvn:org.springframework.osgi/spring-osgi-io/1.2.1</bundle>
+ <bundle>mvn:org.springframework.osgi/spring-osgi-core/1.2.1</bundle>
+ <bundle>mvn:org.springframework.osgi/spring-osgi-extender/1.2.1</bundle>
+ <bundle>mvn:org.springframework.osgi/spring-osgi-annotation/1.2.1</bundle>
+ <bundle>mvn:org.apache.karaf.deployer/org.apache.karaf.deployer.spring/2.2.0</bundle>
+ </feature>
+ <feature name="spring-dm-web" version="1.2.1" resolver="(obr)">
+ <feature version="1.2.1">spring-dm</feature>
+ <feature version="[2.5.6,4)">spring-web</feature>
+ <feature version="2.2.0">http</feature>
+ <bundle>mvn:org.springframework.osgi/spring-osgi-web/1.2.1</bundle>
+ </feature>
+ <feature name="wrapper" version="2.2.0">
+ <bundle>mvn:org.apache.karaf.shell/org.apache.karaf.shell.wrapper/2.2.0</bundle>
+ </feature>
+ <feature name="obr" version="2.2.0">
+ <bundle>mvn:org.apache.felix/org.apache.felix.bundlerepository/1.6.4</bundle>
+ <bundle>mvn:org.apache.karaf.shell/org.apache.karaf.shell.obr/2.2.0</bundle>
+ <bundle>mvn:org.apache.karaf.features/org.apache.karaf.features.obr/2.2.0</bundle>
+ </feature>
+ <feature name="config" version="2.2.0">
+ <bundle start-level='30'>mvn:org.apache.karaf.shell/org.apache.karaf.shell.config/2.2.0</bundle>
+ </feature>
+ <feature name="jetty" version="7.2.2.v20101205" resolver="(obr)">
+ <bundle dependency='true'>mvn:org.apache.geronimo.specs/geronimo-servlet_2.5_spec/1.1.2</bundle>
+ <bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.asm/3.3_1</bundle>
+ <bundle>mvn:org.eclipse.jetty/jetty-util/7.2.2.v20101205</bundle>
+ <bundle>mvn:org.eclipse.jetty/jetty-io/7.2.2.v20101205</bundle>
+ <bundle>mvn:org.eclipse.jetty/jetty-http/7.2.2.v20101205</bundle>
+ <bundle>mvn:org.eclipse.jetty/jetty-continuation/7.2.2.v20101205</bundle>
+ <bundle>mvn:org.eclipse.jetty/jetty-server/7.2.2.v20101205</bundle>
+ <bundle>mvn:org.eclipse.jetty/jetty-security/7.2.2.v20101205</bundle>
+ <bundle>mvn:org.eclipse.jetty/jetty-servlet/7.2.2.v20101205</bundle>
+ <bundle>mvn:org.eclipse.jetty/jetty-xml/7.2.2.v20101205</bundle>
+ </feature>
+ <feature name="jetty-jaas" version="7.2.2.v20101205" resolver="(obr)">
+ <feature version="[7.0,8.0)">jetty</feature>
+ <bundle dependency='true'>mvn:javax.mail/mail/1.4.3</bundle>
+ <bundle dependency='true'>mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1</bundle>
+ <bundle>mvn:org.eclipse.jetty/jetty-webapp/7.2.2.v20101205</bundle>
+ <bundle>mvn:org.eclipse.jetty/jetty-jndi/7.2.2.v20101205</bundle>
+ <bundle>mvn:org.eclipse.jetty/jetty-plus/7.2.2.v20101205</bundle>
+ </feature>
+ <feature name="http" version="2.2.0" resolver="(obr)">
+ <configfile finalname="/etc/jetty.xml">mvn:org.apache.karaf/apache-karaf/2.2.0/xml/jettyconfig</configfile>
+ <config name="org.ops4j.pax.web">
+ org.osgi.service.http.port=8181
+ javax.servlet.context.tempdir=${karaf.data}/pax-web-jsp
+ org.ops4j.pax.web.config.file=${karaf.etc}/jetty.xml
+ </config>
+ <feature version="[7.0,8.0)">jetty</feature>
+ <bundle>mvn:org.ops4j.pax.web/pax-web-api/1.0.1</bundle>
+ <bundle>mvn:org.ops4j.pax.web/pax-web-spi/1.0.1</bundle>
+ <bundle>mvn:org.ops4j.pax.web/pax-web-runtime/1.0.1</bundle>
+ <bundle>mvn:org.ops4j.pax.web/pax-web-jetty/1.0.1</bundle>
+ </feature>
+ <feature name="war" version="2.2.0" resolver="(obr)">
+ <config name="org.ops4j.pax.url.war">
+ org.ops4j.pax.url.war.importPaxLoggingPackages=true
+ </config>
+ <feature>http</feature>
+ <bundle start-level='30'>mvn:org.apache.karaf.shell/org.apache.karaf.shell.web/2.2.0</bundle>
+ <bundle>mvn:org.ops4j.pax.web/pax-web-jsp/1.0.1</bundle>
+ <bundle>mvn:org.ops4j.pax.web/pax-web-extender-war/1.0.1</bundle>
+ <bundle>mvn:org.ops4j.pax.web/pax-web-extender-whiteboard/1.0.1</bundle>
+ <bundle>mvn:org.ops4j.pax.web/pax-web-deployer/1.0.1</bundle>
+ <bundle>mvn:org.ops4j.pax.url/pax-url-war/1.2.5</bundle>
+ </feature>
+ <feature name="kar" version="2.2.0">
+ <bundle>mvn:org.apache.karaf.deployer/org.apache.karaf.deployer.kar/2.2.0</bundle>
+ </feature>
+ <feature name="webconsole-base" version="2.2.0">
+ <config name="org.apache.karaf.webconsole">
+ realm=karaf
+ </config>
+ <feature>http</feature>
+ <bundle>mvn:org.apache.felix/org.apache.felix.metatype/1.0.4</bundle>
+ <bundle>mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.branding/2.2.0</bundle>
+ <bundle>mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.console/2.2.0</bundle>
+ </feature>
+ <feature name="webconsole" version="2.2.0">
+ <feature version="2.2.0">webconsole-base</feature>
+ <bundle>mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.admin/2.2.0</bundle>
+ <bundle>mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.features/2.2.0</bundle>
+ <bundle>mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.gogo/2.2.0</bundle>
+ <bundle>mvn:org.apache.felix/org.apache.felix.webconsole.plugins.event/1.0.2</bundle>
+ </feature>
+ <feature name="ssh" version="2.2.0">
+ <config name="org.apache.karaf.shell">
+ sshPort=8101
+ sshHost=0.0.0.0
+ sshRealm=karaf
+ hostKey=${karaf.etc}/host.key
+ </config>
+ <bundle dependency='true'>mvn:org.apache.mina/mina-core/2.0.1</bundle>
+ <bundle dependency='true'>mvn:org.apache.sshd/sshd-core/0.5.0</bundle>
+ <bundle>mvn:org.apache.karaf.shell/org.apache.karaf.shell.ssh/2.2.0</bundle>
+ </feature>
+ <feature name="management" version="2.2.0">
+ <bundle>mvn:org.apache.karaf/org.apache.karaf.management/2.2.0</bundle>
+ <bundle>mvn:org.apache.aries.jmx/org.apache.aries.jmx/0.3</bundle>
+ <bundle>mvn:org.apache.aries.jmx/org.apache.aries.jmx.blueprint/0.3</bundle>
+ </feature>
+ <feature name="eventadmin" version="2.2.0">
+ <bundle start-level='30'>mvn:org.apache.felix/org.apache.felix.eventadmin/1.2.8</bundle>
+ </feature>
+ <feature name="jasypt-encryption" version="2.2.0" resolver="(obr)">
+ <bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-codec/1.3_3</bundle>
+ <bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-lang/2.4_4</bundle>
+ <bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jasypt/1.7_1</bundle>
+ <bundle>mvn:org.apache.karaf.jaas/org.apache.karaf.jaas.jasypt/2.2.0</bundle>
+ </feature>
+</features>
http://git-wip-us.apache.org/repos/asf/karaf/blob/0c8e8a81/features/core/src/test/resources/org/apache/karaf/features/internal/service/f03.xml
----------------------------------------------------------------------
diff --git a/features/core/src/test/resources/org/apache/karaf/features/internal/service/f03.xml b/features/core/src/test/resources/org/apache/karaf/features/internal/service/f03.xml
new file mode 100644
index 0000000..c058095
--- /dev/null
+++ b/features/core/src/test/resources/org/apache/karaf/features/internal/service/f03.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<features xmlns="http://karaf.apache.org/xmlns/features/v1.0.0">
+ <feature name="spring" version="2.5.6.SEC02" resolver="(obr)">
+ <bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aopalliance/1.0_6</bundle>
+ <bundle>mvn:org.springframework/spring-core/2.5.6.SEC02</bundle>
+ <bundle>mvn:org.springframework/spring-beans/2.5.6.SEC02</bundle>
+ <bundle>mvn:org.springframework/spring-aop/2.5.6.SEC02</bundle>
+ <bundle>mvn:org.springframework/spring-context/2.5.6.SEC02</bundle>
+ <bundle>mvn:org.springframework/spring-context-support/2.5.6.SEC02</bundle>
+ </feature>
+</features>
http://git-wip-us.apache.org/repos/asf/karaf/blob/0c8e8a81/features/core/src/test/resources/org/apache/karaf/features/internal/service/f04.xml
----------------------------------------------------------------------
diff --git a/features/core/src/test/resources/org/apache/karaf/features/internal/service/f04.xml b/features/core/src/test/resources/org/apache/karaf/features/internal/service/f04.xml
new file mode 100644
index 0000000..85f28ad
--- /dev/null
+++ b/features/core/src/test/resources/org/apache/karaf/features/internal/service/f04.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<features name="karaf" xmlns="http://karaf.apache.org/xmlns/features/v1.1.0">
+ <feature name="spring" version="2.5.6.SEC02" resolver="(obr)">
+ <bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aopalliance/1.0_6</bundle>
+ <bundle>mvn:org.springframework/spring-core/2.5.6.SEC02</bundle>
+ <bundle>mvn:org.springframework/spring-beans/2.5.6.SEC02</bundle>
+ <bundle>mvn:org.springframework/spring-aop/2.5.6.SEC02</bundle>
+ <bundle>mvn:org.springframework/spring-context/2.5.6.SEC02</bundle>
+ <bundle>mvn:org.springframework/spring-context-support/2.5.6.SEC02</bundle>
+ </feature>
+</features>
+
http://git-wip-us.apache.org/repos/asf/karaf/blob/0c8e8a81/features/core/src/test/resources/org/apache/karaf/features/internal/service/f05.xml
----------------------------------------------------------------------
diff --git a/features/core/src/test/resources/org/apache/karaf/features/internal/service/f05.xml b/features/core/src/test/resources/org/apache/karaf/features/internal/service/f05.xml
new file mode 100644
index 0000000..15d84e2
--- /dev/null
+++ b/features/core/src/test/resources/org/apache/karaf/features/internal/service/f05.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<features xmlns="http://karaf.apache.org/xmlns/features/v1.1.0">
+ <feature name="spring" version="2.5.6.SEC02" resolver="(obr)">
+ <bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aopalliance/1.0_6</bundle>
+ <bundle>mvn:org.springframework/spring-core/2.5.6.SEC02</bundle>
+ <bundle>mvn:org.springframework/spring-beans/2.5.6.SEC02</bundle>
+ <bundle>mvn:org.springframework/spring-aop/2.5.6.SEC02</bundle>
+ <bundle>mvn:org.springframework/spring-context/2.5.6.SEC02</bundle>
+ <bundle>mvn:org.springframework/spring-context-support/2.5.6.SEC02</bundle>
+ </feature>
+</features>
+
http://git-wip-us.apache.org/repos/asf/karaf/blob/0c8e8a81/features/core/src/test/resources/org/apache/karaf/features/internal/service/f06.xml
----------------------------------------------------------------------
diff --git a/features/core/src/test/resources/org/apache/karaf/features/internal/service/f06.xml b/features/core/src/test/resources/org/apache/karaf/features/internal/service/f06.xml
new file mode 100644
index 0000000..51e78f1
--- /dev/null
+++ b/features/core/src/test/resources/org/apache/karaf/features/internal/service/f06.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<features name="karaf" xmlns="http://karaf.apache.org/xmlns/features/v1.2.0">
+ <feature name="spring" version="2.5.6.SEC02" resolver="(obr)">
+ <bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aopalliance/1.0_4</bundle>
+ <bundle>mvn:org.springframework/spring-core/2.5.6.SEC02</bundle>
+ <bundle>mvn:org.springframework/spring-beans/2.5.6.SEC02</bundle>
+ <bundle>mvn:org.springframework/spring-aop/2.5.6.SEC02</bundle>
+ <bundle>mvn:org.springframework/spring-context/2.5.6.SEC02</bundle>
+ <bundle>mvn:org.springframework/spring-context-support/2.5.6.SEC02</bundle>
+ <conditional>
+ <condition>http</condition>
+ <bundle>mvn:org.springframework/spring-web/2.5.6.SEC02</bundle>
+ </conditional>
+ <conditional>
+ <condition>req:osgi.ee;filter:="(&(osgi.ee=JavaSE)(!(version>=1.7)))"</condition>
+ <bundle start="true" start-level="30">mvn:org.apache.mina/mina-core/${mina.version}</bundle>
+ </conditional>
+ </feature>
+</features>
+
http://git-wip-us.apache.org/repos/asf/karaf/blob/0c8e8a81/features/core/src/test/resources/org/apache/karaf/features/internal/service/f07.xml
----------------------------------------------------------------------
diff --git a/features/core/src/test/resources/org/apache/karaf/features/internal/service/f07.xml b/features/core/src/test/resources/org/apache/karaf/features/internal/service/f07.xml
new file mode 100644
index 0000000..5b7dd90
--- /dev/null
+++ b/features/core/src/test/resources/org/apache/karaf/features/internal/service/f07.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<features name="karaf" xmlns="http://karaf.apache.org/xmlns/features/v1.3.0">
+ <feature name="spring" version="2.5.6.SEC02" resolver="(obr)">
+ <bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aopalliance/1.0_4</bundle>
+ <bundle>mvn:org.springframework/spring-core/2.5.6.SEC02</bundle>
+ <bundle>mvn:org.springframework/spring-beans/2.5.6.SEC02</bundle>
+ <bundle>mvn:org.springframework/spring-aop/2.5.6.SEC02</bundle>
+ <bundle>mvn:org.springframework/spring-context/2.5.6.SEC02</bundle>
+ <bundle>mvn:org.springframework/spring-context-support/2.5.6.SEC02</bundle>
+ <conditional>
+ <condition>http</condition>
+ <bundle>mvn:org.springframework/spring-web/2.5.6.SEC02</bundle>
+ </conditional>
+ <capability>
+ service-reference;effective:=active;objectClass=org.apache.aries.proxy.ProxyManager
+ </capability>
+ </feature>
+</features>
+
http://git-wip-us.apache.org/repos/asf/karaf/blob/0c8e8a81/features/core/src/test/resources/org/apache/karaf/features/internal/service/overrides.properties
----------------------------------------------------------------------
diff --git a/features/core/src/test/resources/org/apache/karaf/features/internal/service/overrides.properties b/features/core/src/test/resources/org/apache/karaf/features/internal/service/overrides.properties
new file mode 100644
index 0000000..d34fa7e
--- /dev/null
+++ b/features/core/src/test/resources/org/apache/karaf/features/internal/service/overrides.properties
@@ -0,0 +1,23 @@
+
+################################################################################
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+################################################################################
+
+# Sample etc/overrides.properties file for testing purposes
+mvn:org.apache.karaf.admin/org.apache.karaf.admin.command/2.3.0.redhat-61033X
+mvn:org.apache.karaf.admin/org.apache.karaf.admin.core/2.3.0.redhat-61033X;range=[2.3.0,2.5)
http://git-wip-us.apache.org/repos/asf/karaf/blob/0c8e8a81/features/core/src/test/resources/org/apache/karaf/features/internal/service/repo2.xml
----------------------------------------------------------------------
diff --git a/features/core/src/test/resources/org/apache/karaf/features/internal/service/repo2.xml b/features/core/src/test/resources/org/apache/karaf/features/internal/service/repo2.xml
new file mode 100644
index 0000000..5fd51d0
--- /dev/null
+++ b/features/core/src/test/resources/org/apache/karaf/features/internal/service/repo2.xml
@@ -0,0 +1,41 @@
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<features name="repo2">
+ <feature name="common">
+ <bundle>b1</bundle>
+ </feature>
+ <feature name="f1">
+ <feature>common</feature>
+ <bundle>b2</bundle>
+ </feature>
+ <feature name="f2">
+ <feature>common</feature>
+ <feature>f1</feature>
+ <bundle>b3</bundle>
+ </feature>
+ <feature name="f3">
+ <feature>f1</feature>
+ <feature>f2</feature>
+ <bundle>b4</bundle>
+ </feature>
+ <feature name="all">
+ <feature>f1</feature>
+ <feature>f2</feature>
+ <feature>f3</feature>
+ </feature>
+</features>
http://git-wip-us.apache.org/repos/asf/karaf/blob/0c8e8a81/features/core/src/test/resources/org/apache/karaf/features/repo1.xml
----------------------------------------------------------------------
diff --git a/features/core/src/test/resources/org/apache/karaf/features/repo1.xml b/features/core/src/test/resources/org/apache/karaf/features/repo1.xml
new file mode 100644
index 0000000..641ef12
--- /dev/null
+++ b/features/core/src/test/resources/org/apache/karaf/features/repo1.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<features name="test" xmlns="http://karaf.apache.org/xmlns/features/v1.1.0">
+ <repository>urn:r1</repository>
+ <feature name="f1" region="foo">
+ <config name="c1">
+ k=v
+ </config>
+ <bundle>b1</bundle>
+ <bundle>b2</bundle>
+ </feature>
+ <feature name="f2">
+ <feature>f1</feature>
+ <bundle>b3</bundle>
+ </feature>
+ <feature name="f3">
+ <configfile finalname="cf1" override="true">cfloc</configfile>
+ <bundle>b4</bundle>
+ </feature>
+</features>
http://git-wip-us.apache.org/repos/asf/karaf/blob/0c8e8a81/features/core/src/test/resources/org/apache/karaf/features/repo2.xml
----------------------------------------------------------------------
diff --git a/features/core/src/test/resources/org/apache/karaf/features/repo2.xml b/features/core/src/test/resources/org/apache/karaf/features/repo2.xml
new file mode 100644
index 0000000..f5e96ae
--- /dev/null
+++ b/features/core/src/test/resources/org/apache/karaf/features/repo2.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<features name="test" xmlns="http://karaf.apache.org/xmlns/features/v1.0.0">
+ <repository>
+ urn:r1
+ </repository>
+ <feature name="f1" region="foo">
+ <config name="c1">
+ k=v
+ </config>
+ <bundle>b1</bundle>
+ <bundle>b2</bundle>
+ </feature>
+ <feature name="f2">
+ <feature>f1</feature>
+ <bundle>b3</bundle>
+ </feature>
+ <feature name="f3">
+ <configfile finalname="cf1" override="true">cfloc</configfile>
+ <bundle>b4</bundle>
+ </feature>
+</features>
http://git-wip-us.apache.org/repos/asf/karaf/blob/0c8e8a81/features/core/src/test/resources/org/apache/karaf/features/repo3.xml
----------------------------------------------------------------------
diff --git a/features/core/src/test/resources/org/apache/karaf/features/repo3.xml b/features/core/src/test/resources/org/apache/karaf/features/repo3.xml
new file mode 100644
index 0000000..ffe08ed
--- /dev/null
+++ b/features/core/src/test/resources/org/apache/karaf/features/repo3.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<features name="test" xmlns="http://karaf.apache.org/xmlns/features/v1.3.0">
+ <feature name="f1">
+ <capability>
+ cap
+ </capability>
+ <requirement>
+ req
+ </requirement>
+ </feature>
+</features>
http://git-wip-us.apache.org/repos/asf/karaf/blob/0c8e8a81/features/pom.xml
----------------------------------------------------------------------
diff --git a/features/pom.xml b/features/pom.xml
index d722ada..8cfede1 100644
--- a/features/pom.xml
+++ b/features/pom.xml
@@ -29,124 +29,13 @@
</parent>
<groupId>org.apache.karaf.features</groupId>
- <artifactId>org.apache.karaf.features.core</artifactId>
- <packaging>bundle</packaging>
- <name>Apache Karaf :: Features :: Core</name>
- <description>This bundle is the core implementation of the Karaf features support.</description>
-
- <properties>
- <appendedResourcesDirectory>${basedir}/../../etc/appended-resources</appendedResourcesDirectory>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
- <scope>provided</scope>
- <optional>true</optional>
- </dependency>
-
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.utils</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.karaf</groupId>
- <artifactId>org.apache.karaf.util</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.resolver</artifactId>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.karaf.shell</groupId>
- <artifactId>org.apache.karaf.shell.core</artifactId>
- <optional>true</optional>
- </dependency>
-
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-jdk14</artifactId>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.ops4j.pax.tinybundles</groupId>
- <artifactId>tinybundles</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
- <resources>
- <resource>
- <directory>${project.basedir}/src/main/resources</directory>
- <includes>
- <include>**/*</include>
- </includes>
- </resource>
- <resource>
- <directory>${project.basedir}/src/main/resources</directory>
- <filtering>true</filtering>
- <includes>
- <include>**/*.info</include>
- </includes>
- </resource>
- </resources>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <configuration>
- <instructions>
- <Export-Package>
- org.apache.karaf.features;
- org.apache.karaf.features.command;
- org.apache.karaf.features.command.completers;
- org.apache.karaf.features.management;
- org.apache.karaf.features.management.codec;
- -noimport:=true
- </Export-Package>
- <Provide-Capability>
- service-reference;effective:=active;objectClass=org.apache.karaf.features.FeaturesService
- </Provide-Capability>
- <Private-Package>
- org.apache.karaf.features.internal.*,
- org.apache.felix.resolver,
- org.apache.felix.utils.version,
- org.apache.felix.utils.manifest,
- org.apache.karaf.util,
- org.apache.karaf.util.collections,
- org.apache.karaf.util.json,
- org.apache.karaf.util.tracker,
- org.osgi.service.resolver,
- org.osgi.service.repository
- </Private-Package>
- <Embed-Dependency>
- org.apache.karaf.util;inline="org/apache/karaf/util/XmlUtils*.class"
- </Embed-Dependency>
- <Bundle-Activator>
- org.apache.karaf.features.internal.osgi.Activator
- </Bundle-Activator>
- <Karaf-Commands>org.apache.karaf.features.command.*</Karaf-Commands>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
+ <artifactId>features</artifactId>
+ <packaging>pom</packaging>
+ <name>Apache Karaf :: Features</name>
+
+ <modules>
+ <module>core</module>
+ <module>command</module>
+ </modules>
</project>
http://git-wip-us.apache.org/repos/asf/karaf/blob/0c8e8a81/features/src/main/java/org/apache/karaf/features/BootFinished.java
----------------------------------------------------------------------
diff --git a/features/src/main/java/org/apache/karaf/features/BootFinished.java b/features/src/main/java/org/apache/karaf/features/BootFinished.java
deleted file mode 100644
index aa72248..0000000
--- a/features/src/main/java/org/apache/karaf/features/BootFinished.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.karaf.features;
-
-/**
- * Marker interface for a service that announces when the karaf boot is finished
- */
-public interface BootFinished {
-
-}
http://git-wip-us.apache.org/repos/asf/karaf/blob/0c8e8a81/features/src/main/java/org/apache/karaf/features/BundleInfo.java
----------------------------------------------------------------------
diff --git a/features/src/main/java/org/apache/karaf/features/BundleInfo.java b/features/src/main/java/org/apache/karaf/features/BundleInfo.java
deleted file mode 100644
index 97a541f..0000000
--- a/features/src/main/java/org/apache/karaf/features/BundleInfo.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.karaf.features;
-
-/**
- * A bundle info holds info about a Bundle.
- */
-public interface BundleInfo {
-
- String getLocation();
-
- int getStartLevel();
-
- boolean isStart();
-
- boolean isDependency();
-
-}
http://git-wip-us.apache.org/repos/asf/karaf/blob/0c8e8a81/features/src/main/java/org/apache/karaf/features/Capability.java
----------------------------------------------------------------------
diff --git a/features/src/main/java/org/apache/karaf/features/Capability.java b/features/src/main/java/org/apache/karaf/features/Capability.java
deleted file mode 100644
index d329708..0000000
--- a/features/src/main/java/org/apache/karaf/features/Capability.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.karaf.features;
-
-public interface Capability {
-
- String getValue();
-
-}
http://git-wip-us.apache.org/repos/asf/karaf/blob/0c8e8a81/features/src/main/java/org/apache/karaf/features/Conditional.java
----------------------------------------------------------------------
diff --git a/features/src/main/java/org/apache/karaf/features/Conditional.java b/features/src/main/java/org/apache/karaf/features/Conditional.java
deleted file mode 100644
index fdc9261..0000000
--- a/features/src/main/java/org/apache/karaf/features/Conditional.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.karaf.features;
-
-import java.util.List;
-import java.util.Map;
-
-public interface Conditional {
-
- List<String> getCondition();
-
- List<Dependency> getDependencies();
-
- List<BundleInfo> getBundles();
-
- Map<String, Map<String, String>> getConfigurations();
-
- List<ConfigFileInfo> getConfigurationFiles();
-
- Feature asFeature(String name, String version);
-}
http://git-wip-us.apache.org/repos/asf/karaf/blob/0c8e8a81/features/src/main/java/org/apache/karaf/features/ConfigFileInfo.java
----------------------------------------------------------------------
diff --git a/features/src/main/java/org/apache/karaf/features/ConfigFileInfo.java b/features/src/main/java/org/apache/karaf/features/ConfigFileInfo.java
deleted file mode 100644
index 960fb31..0000000
--- a/features/src/main/java/org/apache/karaf/features/ConfigFileInfo.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.karaf.features;
-
-public interface ConfigFileInfo {
-
- String getLocation();
-
- String getFinalname();
-
- boolean isOverride();
-
-}
http://git-wip-us.apache.org/repos/asf/karaf/blob/0c8e8a81/features/src/main/java/org/apache/karaf/features/Dependency.java
----------------------------------------------------------------------
diff --git a/features/src/main/java/org/apache/karaf/features/Dependency.java b/features/src/main/java/org/apache/karaf/features/Dependency.java
deleted file mode 100644
index cafdd92..0000000
--- a/features/src/main/java/org/apache/karaf/features/Dependency.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-
-package org.apache.karaf.features;
-
-public interface Dependency {
-
- String getName();
-
- String getVersion();
-
-}
http://git-wip-us.apache.org/repos/asf/karaf/blob/0c8e8a81/features/src/main/java/org/apache/karaf/features/EventConstants.java
----------------------------------------------------------------------
diff --git a/features/src/main/java/org/apache/karaf/features/EventConstants.java b/features/src/main/java/org/apache/karaf/features/EventConstants.java
deleted file mode 100644
index f83f185..0000000
--- a/features/src/main/java/org/apache/karaf/features/EventConstants.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.karaf.features;
-
-/**
- * Constants for EventAdmin events
- */
-public final class EventConstants {
-
- public static final String TYPE = "type";
- public static final String EVENT = "event";
- public static final String TIMESTAMP = "timestamp";
-
- public static final String FEATURE_NAME = "name";
- public static final String FEATURE_VERSION = "version";
-
- public static final String REPOSITORY_NAME = "name";
- public static final String REPOSITORY_URI = "uri";
-
- public static final String TOPIC_EVENTS = "org/apache/karaf/features";
- public static final String TOPIC_FEATURES_INSTALLED = TOPIC_EVENTS + "/features/INSTALLED";
- public static final String TOPIC_FEATURES_UNINSTALLED = TOPIC_EVENTS + "/features/UNINSTALLED";
- public static final String TOPIC_REPOSITORY_ADDED = TOPIC_EVENTS + "/repositories/ADDED";
- public static final String TOPIC_REPOSITORY_REMOVED = TOPIC_EVENTS + "/repositories/REMOVED";
-
- private EventConstants() {
- // non-instantiable class
- }
-
-
-
-}
http://git-wip-us.apache.org/repos/asf/karaf/blob/0c8e8a81/features/src/main/java/org/apache/karaf/features/Feature.java
----------------------------------------------------------------------
diff --git a/features/src/main/java/org/apache/karaf/features/Feature.java b/features/src/main/java/org/apache/karaf/features/Feature.java
deleted file mode 100644
index 2f9f001..0000000
--- a/features/src/main/java/org/apache/karaf/features/Feature.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.karaf.features;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * A feature is a list of bundles associated identified by its name.
- */
-public interface Feature {
-
- public static String DEFAULT_INSTALL_MODE = "auto";
-
- String getId();
-
- String getName();
-
- String getDescription();
-
- String getDetails();
-
- String getVersion();
-
- boolean hasVersion();
-
- String getResolver();
-
- String getInstall();
-
- List<Dependency> getDependencies();
-
- List<BundleInfo> getBundles();
-
- Map<String, Map<String, String>> getConfigurations();
-
- List<ConfigFileInfo> getConfigurationFiles();
-
- List<? extends Conditional> getConditional();
-
- int getStartLevel();
-
- String getRegion();
-
- List<? extends Capability> getCapabilities();
-
- List<? extends Requirement> getRequirements();
-
-}
http://git-wip-us.apache.org/repos/asf/karaf/blob/0c8e8a81/features/src/main/java/org/apache/karaf/features/FeatureEvent.java
----------------------------------------------------------------------
diff --git a/features/src/main/java/org/apache/karaf/features/FeatureEvent.java b/features/src/main/java/org/apache/karaf/features/FeatureEvent.java
deleted file mode 100644
index 516c988..0000000
--- a/features/src/main/java/org/apache/karaf/features/FeatureEvent.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.karaf.features;
-
-import java.util.EventObject;
-
-public class FeatureEvent extends EventObject {
-
- public static enum EventType {
- FeatureInstalled,
- FeatureUninstalled
- }
-
- private final EventType type;
- private final Feature feature;
- private final boolean replay;
-
- public FeatureEvent(Feature feature, EventType type, boolean replay) {
- super(feature);
- this.type = type;
- this.feature = feature;
- this.replay = replay;
- }
-
- public EventType getType() {
- return type;
- }
-
- public Feature getFeature() {
- return feature;
- }
-
- public boolean isReplay() {
- return replay;
- }
-}
http://git-wip-us.apache.org/repos/asf/karaf/blob/0c8e8a81/features/src/main/java/org/apache/karaf/features/FeaturesListener.java
----------------------------------------------------------------------
diff --git a/features/src/main/java/org/apache/karaf/features/FeaturesListener.java b/features/src/main/java/org/apache/karaf/features/FeaturesListener.java
deleted file mode 100644
index 69f68c6..0000000
--- a/features/src/main/java/org/apache/karaf/features/FeaturesListener.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.karaf.features;
-
-public interface FeaturesListener {
-
- void featureEvent(FeatureEvent event);
-
- void repositoryEvent(RepositoryEvent event);
-
-}
http://git-wip-us.apache.org/repos/asf/karaf/blob/0c8e8a81/features/src/main/java/org/apache/karaf/features/FeaturesNamespaces.java
----------------------------------------------------------------------
diff --git a/features/src/main/java/org/apache/karaf/features/FeaturesNamespaces.java b/features/src/main/java/org/apache/karaf/features/FeaturesNamespaces.java
deleted file mode 100644
index 282ff71..0000000
--- a/features/src/main/java/org/apache/karaf/features/FeaturesNamespaces.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.karaf.features;
-
-import javax.xml.namespace.QName;
-
-/**
- * Provides features XML/XSD constants.
- */
-public interface FeaturesNamespaces {
-
- String URI_0_0_0 = "";
- String URI_1_0_0 = "http://karaf.apache.org/xmlns/features/v1.0.0";
- String URI_1_1_0 = "http://karaf.apache.org/xmlns/features/v1.1.0";
- String URI_1_2_0 = "http://karaf.apache.org/xmlns/features/v1.2.0";
- String URI_1_3_0 = "http://karaf.apache.org/xmlns/features/v1.3.0";
-
- String URI_CURRENT = URI_1_3_0;
-
- QName FEATURES_0_0_0 = new QName("features");
- QName FEATURES_1_0_0 = new QName(URI_1_0_0, "features");
- QName FEATURES_1_1_0 = new QName(URI_1_1_0, "features");
- QName FEATURES_1_2_0 = new QName(URI_1_2_0, "features");
- QName FEATURES_1_3_0 = new QName(URI_1_3_0, "features");
-
- QName FEATURES_CURRENT = FEATURES_1_3_0;
-
-}