diff --git a/pom.xml b/pom.xml
index d75a846..bf7c257 100644
--- a/pom.xml
+++ b/pom.xml
@@ -69,7 +69,6 @@
itests
archetypes
manual
- obr
diff --git a/tooling/karaf-maven-plugin/src/it/test-aggregate-features/aggregate-features/pom.xml b/tooling/karaf-maven-plugin/src/it/test-aggregate-features/aggregate-features/pom.xml
new file mode 100644
index 0000000..e46bb4f
--- /dev/null
+++ b/tooling/karaf-maven-plugin/src/it/test-aggregate-features/aggregate-features/pom.xml
@@ -0,0 +1,94 @@
+
+
+
+
+ 4.0.0
+
+ test
+ test-aggregate-features
+ 1.0-SNAPSHOT
+ ../pom.xml
+
+
+ test
+ aggregate-features
+ 1.0-SNAPSHOT
+
+ feature
+
+
+ UTF-8
+
+
+
+
+ test
+ aggregate-recursive-module-a
+ 1.0-SNAPSHOT
+ xml
+ features
+
+
+ test
+ aggregate-recursive-module-b
+ 1.0-SNAPSHOT
+ xml
+ features
+
+
+ test
+ aggregate-recursive-module-c
+ 1.0-SNAPSHOT
+ xml
+ features
+
+
+ test
+ aggregate-recursive-module-d
+ 1.0-SNAPSHOT
+ xml
+ features
+
+
+
+
+
+
+ org.apache.karaf.tooling
+ karaf-maven-plugin
+ @pom.version@
+ true
+
+
+ generate-features-file
+ package
+
+ features-generate-descriptor
+
+
+ true
+
+
+
+
+
+
+
diff --git a/tooling/karaf-maven-plugin/src/it/test-aggregate-features/aggregate-recursive-module-a/pom.xml b/tooling/karaf-maven-plugin/src/it/test-aggregate-features/aggregate-recursive-module-a/pom.xml
new file mode 100644
index 0000000..7be5890
--- /dev/null
+++ b/tooling/karaf-maven-plugin/src/it/test-aggregate-features/aggregate-recursive-module-a/pom.xml
@@ -0,0 +1,54 @@
+
+
+
+
+ 4.0.0
+
+ test
+ test-aggregate-features
+ 1.0-SNAPSHOT
+ ../pom.xml
+
+
+ test
+ aggregate-recursive-module-a
+ 1.0-SNAPSHOT
+
+ bundle
+
+
+ UTF-8
+
+
+
+
+
+
+
+
+ org.apache.felix
+ maven-bundle-plugin
+ 2.3.7
+ true
+
+
+
+
diff --git a/tooling/karaf-maven-plugin/src/it/test-aggregate-features/aggregate-recursive-module-a/src/main/java/test/A.java b/tooling/karaf-maven-plugin/src/it/test-aggregate-features/aggregate-recursive-module-a/src/main/java/test/A.java
new file mode 100644
index 0000000..9aa5496
--- /dev/null
+++ b/tooling/karaf-maven-plugin/src/it/test-aggregate-features/aggregate-recursive-module-a/src/main/java/test/A.java
@@ -0,0 +1,25 @@
+/*
+ * 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 test.a;
+
+public class A
+{
+ public static String ASTRING = "A-string";
+}
diff --git a/tooling/karaf-maven-plugin/src/it/test-aggregate-features/aggregate-recursive-module-b/pom.xml b/tooling/karaf-maven-plugin/src/it/test-aggregate-features/aggregate-recursive-module-b/pom.xml
new file mode 100644
index 0000000..4f8ae96
--- /dev/null
+++ b/tooling/karaf-maven-plugin/src/it/test-aggregate-features/aggregate-recursive-module-b/pom.xml
@@ -0,0 +1,54 @@
+
+
+
+
+ 4.0.0
+
+ test
+ test-aggregate-features
+ 1.0-SNAPSHOT
+ ../pom.xml
+
+
+ test
+ aggregate-recursive-module-b
+ 1.0-SNAPSHOT
+
+ bundle
+
+
+ UTF-8
+
+
+
+
+
+
+
+
+ org.apache.felix
+ maven-bundle-plugin
+ 2.3.7
+ true
+
+
+
+
diff --git a/tooling/karaf-maven-plugin/src/it/test-aggregate-features/aggregate-recursive-module-b/src/main/java/test/B.java b/tooling/karaf-maven-plugin/src/it/test-aggregate-features/aggregate-recursive-module-b/src/main/java/test/B.java
new file mode 100644
index 0000000..b66ddea
--- /dev/null
+++ b/tooling/karaf-maven-plugin/src/it/test-aggregate-features/aggregate-recursive-module-b/src/main/java/test/B.java
@@ -0,0 +1,25 @@
+/*
+ * 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 test.b;
+
+public class B
+{
+ public static String BSTRING = "B-string";
+}
diff --git a/tooling/karaf-maven-plugin/src/it/test-aggregate-features/aggregate-recursive-module-c/pom.xml b/tooling/karaf-maven-plugin/src/it/test-aggregate-features/aggregate-recursive-module-c/pom.xml
new file mode 100644
index 0000000..3e4f8de
--- /dev/null
+++ b/tooling/karaf-maven-plugin/src/it/test-aggregate-features/aggregate-recursive-module-c/pom.xml
@@ -0,0 +1,59 @@
+
+
+
+
+ 4.0.0
+
+ test
+ test-aggregate-features
+ 1.0-SNAPSHOT
+ ../pom.xml
+
+
+ test
+ aggregate-recursive-module-c
+ 1.0-SNAPSHOT
+
+ bundle
+
+
+ UTF-8
+
+
+
+
+ test
+ aggregate-recursive-module-b
+ 1.0-SNAPSHOT
+
+
+
+
+
+
+ org.apache.felix
+ maven-bundle-plugin
+ 2.3.7
+ true
+
+
+
+
diff --git a/tooling/karaf-maven-plugin/src/it/test-aggregate-features/aggregate-recursive-module-c/src/main/java/test/C.java b/tooling/karaf-maven-plugin/src/it/test-aggregate-features/aggregate-recursive-module-c/src/main/java/test/C.java
new file mode 100644
index 0000000..423006c
--- /dev/null
+++ b/tooling/karaf-maven-plugin/src/it/test-aggregate-features/aggregate-recursive-module-c/src/main/java/test/C.java
@@ -0,0 +1,29 @@
+/*
+ * 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 test.c;
+
+import test.b.*;
+
+public class C
+{
+ public static String createStringWithDependencies() {
+ return B.BSTRING + " " + "C-string";
+ }
+}
diff --git a/tooling/karaf-maven-plugin/src/it/test-aggregate-features/aggregate-recursive-module-d/pom.xml b/tooling/karaf-maven-plugin/src/it/test-aggregate-features/aggregate-recursive-module-d/pom.xml
new file mode 100644
index 0000000..09ac051
--- /dev/null
+++ b/tooling/karaf-maven-plugin/src/it/test-aggregate-features/aggregate-recursive-module-d/pom.xml
@@ -0,0 +1,65 @@
+
+
+
+
+ 4.0.0
+
+ test
+ test-aggregate-features
+ 1.0-SNAPSHOT
+ ../pom.xml
+
+
+ test
+ aggregate-recursive-module-d
+ 1.0-SNAPSHOT
+
+ bundle
+
+
+ UTF-8
+
+
+
+
+ test
+ aggregate-recursive-module-a
+ 1.0-SNAPSHOT
+ provided
+
+
+ test
+ aggregate-recursive-module-c
+ 1.0-SNAPSHOT
+
+
+
+
+
+
+ org.apache.felix
+ maven-bundle-plugin
+ 2.3.7
+ true
+
+
+
+
diff --git a/tooling/karaf-maven-plugin/src/it/test-aggregate-features/aggregate-recursive-module-d/src/main/java/test/D.java b/tooling/karaf-maven-plugin/src/it/test-aggregate-features/aggregate-recursive-module-d/src/main/java/test/D.java
new file mode 100644
index 0000000..6d87232
--- /dev/null
+++ b/tooling/karaf-maven-plugin/src/it/test-aggregate-features/aggregate-recursive-module-d/src/main/java/test/D.java
@@ -0,0 +1,30 @@
+/*
+ * 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 test.d;
+
+import test.a.*;
+import test.c.*;
+
+public class D
+{
+ public String createStringWithDependencies() {
+ return A.ASTRING + " " + C.createStringWithDependencies() + " " + "D-string";
+ }
+}
diff --git a/tooling/karaf-maven-plugin/src/it/test-aggregate-features/control.xml b/tooling/karaf-maven-plugin/src/it/test-aggregate-features/control.xml
new file mode 100644
index 0000000..7ab347e
--- /dev/null
+++ b/tooling/karaf-maven-plugin/src/it/test-aggregate-features/control.xml
@@ -0,0 +1,32 @@
+
+
+
+
+
+ Test Description
+ mvn:test/aggregate-recursive-module-b/1.0-SNAPSHOT
+
+
+ Test Description
+ mvn:test/aggregate-recursive-module-a/1.0-SNAPSHOT
+ mvn:test/aggregate-recursive-module-c/1.0-SNAPSHOT
+ mvn:test/aggregate-recursive-module-b/1.0-SNAPSHOT
+
+
diff --git a/tooling/karaf-maven-plugin/src/it/test-aggregate-features/pom.xml b/tooling/karaf-maven-plugin/src/it/test-aggregate-features/pom.xml
new file mode 100644
index 0000000..1570117
--- /dev/null
+++ b/tooling/karaf-maven-plugin/src/it/test-aggregate-features/pom.xml
@@ -0,0 +1,69 @@
+
+
+
+
+
+
+ 4.0.0
+
+ test
+ test-aggregate-features
+ 1.0-SNAPSHOT
+
+ pom
+
+ Test Description
+
+
+ UTF-8
+
+
+
+ aggregate-recursive-module-a
+ aggregate-recursive-module-b
+ aggregate-recursive-module-c
+ aggregate-recursive-module-d
+ aggregate-features
+
+
+
+
+
+ org.apache.felix
+ maven-bundle-plugin
+ true
+
+
+ org.apache.karaf.tooling
+ karaf-maven-plugin
+ @pom.version@
+
+
+ generate-features-file
+ package
+
+ features-generate-descriptor
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tooling/karaf-maven-plugin/src/it/test-aggregate-features/verify.bsh b/tooling/karaf-maven-plugin/src/it/test-aggregate-features/verify.bsh
new file mode 100644
index 0000000..a1cfda9
--- /dev/null
+++ b/tooling/karaf-maven-plugin/src/it/test-aggregate-features/verify.bsh
@@ -0,0 +1,34 @@
+/*
+ * 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.
+ */
+
+import org.custommonkey.xmlunit.*;
+import java.io.*;
+import java.lang.*;
+
+Reader r = new FileReader(new File(basedir, "control.xml"));
+
+// load the features file pushed to the repository
+File generated = new File( localRepositoryPath, "test/aggregate-features/1.0-SNAPSHOT/aggregate-features-1.0-SNAPSHOT-features.xml" );
+if (generated.exists()) {
+ try {
+ XMLAssert.assertXMLEqual(r, new FileReader(generated));
+ return true;
+ } catch (Throwable ignored) { }
+}
+return false;
diff --git a/tooling/karaf-maven-plugin/src/it/test-basic-generation/control.xml b/tooling/karaf-maven-plugin/src/it/test-basic-generation/control.xml
new file mode 100644
index 0000000..5af1a9a
--- /dev/null
+++ b/tooling/karaf-maven-plugin/src/it/test-basic-generation/control.xml
@@ -0,0 +1,21 @@
+
+
+
+
\ No newline at end of file
diff --git a/tooling/karaf-maven-plugin/src/it/test-basic-generation/pom.xml b/tooling/karaf-maven-plugin/src/it/test-basic-generation/pom.xml
index 684788d..0590a3f 100644
--- a/tooling/karaf-maven-plugin/src/it/test-basic-generation/pom.xml
+++ b/tooling/karaf-maven-plugin/src/it/test-basic-generation/pom.xml
@@ -23,16 +23,13 @@
test
test-basic-generation
- @pom.version@
+ 1.0-SNAPSHOT
bundle
UTF-8
-
-
-
@@ -53,7 +50,6 @@
features-generate-descriptor
- false
diff --git a/tooling/karaf-maven-plugin/src/it/test-basic-generation/verify.bsh b/tooling/karaf-maven-plugin/src/it/test-basic-generation/verify.bsh
index e813719..d75044b 100644
--- a/tooling/karaf-maven-plugin/src/it/test-basic-generation/verify.bsh
+++ b/tooling/karaf-maven-plugin/src/it/test-basic-generation/verify.bsh
@@ -21,14 +21,15 @@ import org.custommonkey.xmlunit.*;
import java.io.*;
import java.lang.*;
-String control = "";
+Reader r = new FileReader(new File(basedir, "control.xml"));
-File generated = new File( basedir, "target/feature/feature.xml" );
-StringReader sr = new StringReader(control);
-try {
- XMLAssert.assertXMLEqual(sr, new FileReader(generated));
-} catch (AssertionError ignored) {
- return false;
+// load the features file pushed to the repository
+File generated = new File( localRepositoryPath, "test/test-basic-generation/1.0-SNAPSHOT/test-basic-generation-1.0-SNAPSHOT-features.xml" );
+if (generated.exists()) {
+ try {
+ XMLAssert.assertXMLEqual(r, new FileReader(generated));
+ return true;
+ } catch (Throwable ignored) { }
}
-return true;
+return false;
diff --git a/tooling/karaf-maven-plugin/src/it/test-check-dependencies-failure/control.xml b/tooling/karaf-maven-plugin/src/it/test-check-dependencies-failure/control.xml
new file mode 100644
index 0000000..6aa8518
--- /dev/null
+++ b/tooling/karaf-maven-plugin/src/it/test-check-dependencies-failure/control.xml
@@ -0,0 +1,31 @@
+
+
+
+
+
+ mvn:test/dependency-module-a/1.0-SNAPSHOT
+ mvn:test/dependency-module-b/1.0-SNAPSHOT
+
+
+ mvn:test/dependency-module-c/1.0-SNAPSHOT
+ mvn:test/dependency-module-a/1.0-SNAPSHOT
+ mvn:test/dependency-module-b/1.0-SNAPSHOT
+
+
diff --git a/tooling/karaf-maven-plugin/src/it/test-check-dependencies-failure/dependencies-features/invoker.properties b/tooling/karaf-maven-plugin/src/it/test-check-dependencies-failure/dependencies-features/invoker.properties
new file mode 100644
index 0000000..e2abb3d
--- /dev/null
+++ b/tooling/karaf-maven-plugin/src/it/test-check-dependencies-failure/dependencies-features/invoker.properties
@@ -0,0 +1,20 @@
+#
+# 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.
+#
+
+invoker.buildResult = failure
diff --git a/tooling/karaf-maven-plugin/src/it/test-check-dependencies-failure/dependencies-features/pom.xml b/tooling/karaf-maven-plugin/src/it/test-check-dependencies-failure/dependencies-features/pom.xml
new file mode 100644
index 0000000..2885677
--- /dev/null
+++ b/tooling/karaf-maven-plugin/src/it/test-check-dependencies-failure/dependencies-features/pom.xml
@@ -0,0 +1,95 @@
+
+
+
+
+ 4.0.0
+
+ test
+ test-check-dependencies-failure
+ 1.0-SNAPSHOT
+ ../pom.xml
+
+
+ test
+ check-dependencies-features
+ 1.0-SNAPSHOT
+
+ feature
+
+
+ UTF-8
+
+
+
+
+ test
+ dependency-module-a
+ 1.0-SNAPSHOT
+ xml
+ features
+
+
+ test
+ dependency-module-b
+ 1.0-SNAPSHOT
+ xml
+ features
+
+
+ test
+ dependency-module-c
+ 1.0-SNAPSHOT
+ xml
+ features
+
+
+ test
+ dependency-module-d
+ 1.0-SNAPSHOT
+ xml
+ features
+
+
+
+
+
+
+ org.apache.karaf.tooling
+ karaf-maven-plugin
+ @pom.version@
+ true
+
+
+ generate-features-file
+ package
+
+ features-generate-descriptor
+
+
+ true
+ true
+
+
+
+
+
+
+
diff --git a/tooling/karaf-maven-plugin/src/it/test-check-dependencies-failure/dependencies-features/src/main/history/dependencies.xml b/tooling/karaf-maven-plugin/src/it/test-check-dependencies-failure/dependencies-features/src/main/history/dependencies.xml
new file mode 100644
index 0000000..e033398
--- /dev/null
+++ b/tooling/karaf-maven-plugin/src/it/test-check-dependencies-failure/dependencies-features/src/main/history/dependencies.xml
@@ -0,0 +1,31 @@
+
+
+
+
+
+ mvn:test/dependency-module-a/1.0-SNAPSHOT
+ mvn:test/dependency-module-b/1.0-SNAPSHOT
+
+
+
+
+
+
+
diff --git a/tooling/karaf-maven-plugin/src/it/test-check-dependencies-failure/dependency-module-a/pom.xml b/tooling/karaf-maven-plugin/src/it/test-check-dependencies-failure/dependency-module-a/pom.xml
new file mode 100644
index 0000000..d2350dc
--- /dev/null
+++ b/tooling/karaf-maven-plugin/src/it/test-check-dependencies-failure/dependency-module-a/pom.xml
@@ -0,0 +1,53 @@
+
+
+
+
+ 4.0.0
+
+ test
+ test-check-dependencies-failure
+ 1.0-SNAPSHOT
+ ../pom.xml
+
+
+ test
+ dependency-module-a
+ 1.0-SNAPSHOT
+ bundle
+
+
+ UTF-8
+
+
+
+
+
+
+
+
+ org.apache.felix
+ maven-bundle-plugin
+ 2.3.7
+ true
+
+
+
+
diff --git a/tooling/karaf-maven-plugin/src/it/test-check-dependencies-failure/dependency-module-a/src/main/java/test/A.java b/tooling/karaf-maven-plugin/src/it/test-check-dependencies-failure/dependency-module-a/src/main/java/test/A.java
new file mode 100644
index 0000000..9aa5496
--- /dev/null
+++ b/tooling/karaf-maven-plugin/src/it/test-check-dependencies-failure/dependency-module-a/src/main/java/test/A.java
@@ -0,0 +1,25 @@
+/*
+ * 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 test.a;
+
+public class A
+{
+ public static String ASTRING = "A-string";
+}
diff --git a/tooling/karaf-maven-plugin/src/it/test-check-dependencies-failure/dependency-module-b/pom.xml b/tooling/karaf-maven-plugin/src/it/test-check-dependencies-failure/dependency-module-b/pom.xml
new file mode 100644
index 0000000..8aa7bd5
--- /dev/null
+++ b/tooling/karaf-maven-plugin/src/it/test-check-dependencies-failure/dependency-module-b/pom.xml
@@ -0,0 +1,54 @@
+
+
+
+
+ 4.0.0
+
+ test
+ test-check-dependencies-failure
+ 1.0-SNAPSHOT
+ ../pom.xml
+
+
+ test
+ dependency-module-b
+ 1.0-SNAPSHOT
+
+ bundle
+
+
+ UTF-8
+
+
+
+
+
+
+
+
+ org.apache.felix
+ maven-bundle-plugin
+ 2.3.7
+ true
+
+
+
+
diff --git a/tooling/karaf-maven-plugin/src/it/test-check-dependencies-failure/dependency-module-b/src/main/java/test/B.java b/tooling/karaf-maven-plugin/src/it/test-check-dependencies-failure/dependency-module-b/src/main/java/test/B.java
new file mode 100644
index 0000000..b66ddea
--- /dev/null
+++ b/tooling/karaf-maven-plugin/src/it/test-check-dependencies-failure/dependency-module-b/src/main/java/test/B.java
@@ -0,0 +1,25 @@
+/*
+ * 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 test.b;
+
+public class B
+{
+ public static String BSTRING = "B-string";
+}
diff --git a/tooling/karaf-maven-plugin/src/it/test-check-dependencies-failure/dependency-module-c/pom.xml b/tooling/karaf-maven-plugin/src/it/test-check-dependencies-failure/dependency-module-c/pom.xml
new file mode 100644
index 0000000..c393257
--- /dev/null
+++ b/tooling/karaf-maven-plugin/src/it/test-check-dependencies-failure/dependency-module-c/pom.xml
@@ -0,0 +1,64 @@
+
+
+
+
+ 4.0.0
+
+ test
+ test-check-dependencies-failure
+ 1.0-SNAPSHOT
+ ../pom.xml
+
+
+ test
+ dependency-module-c
+ 1.0-SNAPSHOT
+
+ bundle
+
+
+ UTF-8
+
+
+
+
+ test
+ dependency-module-a
+ 1.0-SNAPSHOT
+
+
+ test
+ dependency-module-b
+ 1.0-SNAPSHOT
+
+
+
+
+
+
+ org.apache.felix
+ maven-bundle-plugin
+ 2.3.7
+ true
+
+
+
+
diff --git a/tooling/karaf-maven-plugin/src/it/test-check-dependencies-failure/dependency-module-c/src/main/java/test/C.java b/tooling/karaf-maven-plugin/src/it/test-check-dependencies-failure/dependency-module-c/src/main/java/test/C.java
new file mode 100644
index 0000000..630440f
--- /dev/null
+++ b/tooling/karaf-maven-plugin/src/it/test-check-dependencies-failure/dependency-module-c/src/main/java/test/C.java
@@ -0,0 +1,30 @@
+/*
+ * 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 test.c;
+
+import test.a.*;
+import test.b.*;
+
+public class C
+{
+ public static String createStringWithDependencies() {
+ return A.ASTRING + " " + B.BSTRING + " " + "C-string";
+ }
+}
diff --git a/tooling/karaf-maven-plugin/src/it/test-check-dependencies-failure/dependency-module-d/pom.xml b/tooling/karaf-maven-plugin/src/it/test-check-dependencies-failure/dependency-module-d/pom.xml
new file mode 100644
index 0000000..b7285d9
--- /dev/null
+++ b/tooling/karaf-maven-plugin/src/it/test-check-dependencies-failure/dependency-module-d/pom.xml
@@ -0,0 +1,59 @@
+
+
+
+
+ 4.0.0
+
+ test
+ test-check-dependencies-failure
+ 1.0-SNAPSHOT
+ ../pom.xml
+
+
+ test
+ dependency-module-d
+ 1.0-SNAPSHOT
+
+ bundle
+
+
+ UTF-8
+
+
+
+
+ test
+ dependency-module-c
+ 1.0-SNAPSHOT
+
+
+
+
+
+
+ org.apache.felix
+ maven-bundle-plugin
+ 2.3.7
+ true
+
+
+
+
diff --git a/tooling/karaf-maven-plugin/src/it/test-check-dependencies-failure/dependency-module-d/src/main/java/test/D.java b/tooling/karaf-maven-plugin/src/it/test-check-dependencies-failure/dependency-module-d/src/main/java/test/D.java
new file mode 100644
index 0000000..370fad8
--- /dev/null
+++ b/tooling/karaf-maven-plugin/src/it/test-check-dependencies-failure/dependency-module-d/src/main/java/test/D.java
@@ -0,0 +1,29 @@
+/*
+ * 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 test.d;
+
+import test.c.*;
+
+public class D
+{
+ public String createStringWithDependencies() {
+ return C.createStringWithDependencies() + " " + "D-string";
+ }
+}
diff --git a/tooling/karaf-maven-plugin/src/it/test-check-dependencies-failure/invoker.properties b/tooling/karaf-maven-plugin/src/it/test-check-dependencies-failure/invoker.properties
new file mode 100644
index 0000000..e2abb3d
--- /dev/null
+++ b/tooling/karaf-maven-plugin/src/it/test-check-dependencies-failure/invoker.properties
@@ -0,0 +1,20 @@
+#
+# 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.
+#
+
+invoker.buildResult = failure
diff --git a/tooling/karaf-maven-plugin/src/it/test-check-dependencies-failure/pom.xml b/tooling/karaf-maven-plugin/src/it/test-check-dependencies-failure/pom.xml
new file mode 100644
index 0000000..0899498
--- /dev/null
+++ b/tooling/karaf-maven-plugin/src/it/test-check-dependencies-failure/pom.xml
@@ -0,0 +1,67 @@
+
+
+
+
+
+
+ 4.0.0
+ test
+ test-check-dependencies-failure
+ 1.0-SNAPSHOT
+ pom
+
+
+ UTF-8
+
+
+
+ dependency-module-a
+ dependency-module-b
+ dependency-module-c
+ dependency-module-d
+ dependencies-features
+
+
+
+
+
+ org.apache.felix
+ maven-bundle-plugin
+ true
+
+
+ org.apache.karaf.tooling
+ karaf-maven-plugin
+ @pom.version@
+
+
+ generate-features-file
+ package
+
+ features-generate-descriptor
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tooling/karaf-maven-plugin/src/it/test-check-dependencies-failure/verify.bsh b/tooling/karaf-maven-plugin/src/it/test-check-dependencies-failure/verify.bsh
new file mode 100644
index 0000000..147538c
--- /dev/null
+++ b/tooling/karaf-maven-plugin/src/it/test-check-dependencies-failure/verify.bsh
@@ -0,0 +1,35 @@
+/*
+ * 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.
+ */
+
+import org.custommonkey.xmlunit.*;
+import java.io.*;
+import java.lang.*;
+
+Reader r = new FileReader(new File(basedir, "control.xml"));
+
+// load the features file pushed to the repository
+File generated = new File( localRepositoryPath, "test/check-dependencies-features/1.0-SNAPSHOT/check-dependencies-features-1.0-SNAPSHOT-features.xml" );
+if (generated.exists()) {
+ try {
+ XMLAssert.assertXMLEqual(r, new FileReader(generated));
+ return true;
+ } catch (Throwable ignored) { }
+}
+
+return false;
diff --git a/tooling/karaf-maven-plugin/src/it/test-check-dependencies/control.xml b/tooling/karaf-maven-plugin/src/it/test-check-dependencies/control.xml
new file mode 100644
index 0000000..6aa8518
--- /dev/null
+++ b/tooling/karaf-maven-plugin/src/it/test-check-dependencies/control.xml
@@ -0,0 +1,31 @@
+
+
+
+
+
+ mvn:test/dependency-module-a/1.0-SNAPSHOT
+ mvn:test/dependency-module-b/1.0-SNAPSHOT
+
+
+ mvn:test/dependency-module-c/1.0-SNAPSHOT
+ mvn:test/dependency-module-a/1.0-SNAPSHOT
+ mvn:test/dependency-module-b/1.0-SNAPSHOT
+
+
diff --git a/tooling/karaf-maven-plugin/src/it/test-check-dependencies/dependencies-features/pom.xml b/tooling/karaf-maven-plugin/src/it/test-check-dependencies/dependencies-features/pom.xml
new file mode 100644
index 0000000..d6f8506
--- /dev/null
+++ b/tooling/karaf-maven-plugin/src/it/test-check-dependencies/dependencies-features/pom.xml
@@ -0,0 +1,95 @@
+
+
+
+
+ 4.0.0
+
+ test
+ test-check-dependencies
+ 1.0-SNAPSHOT
+ ../pom.xml
+
+
+ test
+ check-dependencies-features
+ 1.0-SNAPSHOT
+
+ feature
+
+
+ UTF-8
+
+
+
+
+ test
+ dependency-module-a
+ 1.0-SNAPSHOT
+ xml
+ features
+
+
+ test
+ dependency-module-b
+ 1.0-SNAPSHOT
+ xml
+ features
+
+
+ test
+ dependency-module-c
+ 1.0-SNAPSHOT
+ xml
+ features
+
+
+ test
+ dependency-module-d
+ 1.0-SNAPSHOT
+ xml
+ features
+
+
+
+
+
+
+ org.apache.karaf.tooling
+ karaf-maven-plugin
+ @pom.version@
+ true
+
+
+ generate-features-file
+ package
+
+ features-generate-descriptor
+
+
+ true
+ true
+
+
+
+
+
+
+
diff --git a/tooling/karaf-maven-plugin/src/it/test-check-dependencies/dependency-module-a/pom.xml b/tooling/karaf-maven-plugin/src/it/test-check-dependencies/dependency-module-a/pom.xml
new file mode 100644
index 0000000..19aa707
--- /dev/null
+++ b/tooling/karaf-maven-plugin/src/it/test-check-dependencies/dependency-module-a/pom.xml
@@ -0,0 +1,53 @@
+
+
+
+
+ 4.0.0
+
+ test
+ test-check-dependencies
+ 1.0-SNAPSHOT
+ ../pom.xml
+
+
+ test
+ dependency-module-a
+ 1.0-SNAPSHOT
+ bundle
+
+
+ UTF-8
+
+
+
+
+
+
+
+
+ org.apache.felix
+ maven-bundle-plugin
+ 2.3.7
+ true
+
+
+
+
diff --git a/tooling/karaf-maven-plugin/src/it/test-check-dependencies/dependency-module-a/src/main/java/test/A.java b/tooling/karaf-maven-plugin/src/it/test-check-dependencies/dependency-module-a/src/main/java/test/A.java
new file mode 100644
index 0000000..9aa5496
--- /dev/null
+++ b/tooling/karaf-maven-plugin/src/it/test-check-dependencies/dependency-module-a/src/main/java/test/A.java
@@ -0,0 +1,25 @@
+/*
+ * 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 test.a;
+
+public class A
+{
+ public static String ASTRING = "A-string";
+}
diff --git a/tooling/karaf-maven-plugin/src/it/test-check-dependencies/dependency-module-b/pom.xml b/tooling/karaf-maven-plugin/src/it/test-check-dependencies/dependency-module-b/pom.xml
new file mode 100644
index 0000000..65018c7
--- /dev/null
+++ b/tooling/karaf-maven-plugin/src/it/test-check-dependencies/dependency-module-b/pom.xml
@@ -0,0 +1,54 @@
+
+
+
+
+ 4.0.0
+
+ test
+ test-check-dependencies
+ 1.0-SNAPSHOT
+ ../pom.xml
+
+
+ test
+ dependency-module-b
+ 1.0-SNAPSHOT
+
+ bundle
+
+
+ UTF-8
+
+
+
+
+
+
+
+
+ org.apache.felix
+ maven-bundle-plugin
+ 2.3.7
+ true
+
+
+
+
diff --git a/tooling/karaf-maven-plugin/src/it/test-check-dependencies/dependency-module-b/src/main/java/test/B.java b/tooling/karaf-maven-plugin/src/it/test-check-dependencies/dependency-module-b/src/main/java/test/B.java
new file mode 100644
index 0000000..b66ddea
--- /dev/null
+++ b/tooling/karaf-maven-plugin/src/it/test-check-dependencies/dependency-module-b/src/main/java/test/B.java
@@ -0,0 +1,25 @@
+/*
+ * 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 test.b;
+
+public class B
+{
+ public static String BSTRING = "B-string";
+}
diff --git a/tooling/karaf-maven-plugin/src/it/test-check-dependencies/dependency-module-c/pom.xml b/tooling/karaf-maven-plugin/src/it/test-check-dependencies/dependency-module-c/pom.xml
new file mode 100644
index 0000000..8bf290d
--- /dev/null
+++ b/tooling/karaf-maven-plugin/src/it/test-check-dependencies/dependency-module-c/pom.xml
@@ -0,0 +1,64 @@
+
+
+
+
+ 4.0.0
+
+ test
+ test-check-dependencies
+ 1.0-SNAPSHOT
+ ../pom.xml
+
+
+ test
+ dependency-module-c
+ 1.0-SNAPSHOT
+
+ bundle
+
+
+ UTF-8
+
+
+
+
+ test
+ dependency-module-a
+ 1.0-SNAPSHOT
+
+
+ test
+ dependency-module-b
+ 1.0-SNAPSHOT
+
+
+
+
+
+
+ org.apache.felix
+ maven-bundle-plugin
+ 2.3.7
+ true
+
+
+
+
diff --git a/tooling/karaf-maven-plugin/src/it/test-check-dependencies/dependency-module-c/src/main/java/test/C.java b/tooling/karaf-maven-plugin/src/it/test-check-dependencies/dependency-module-c/src/main/java/test/C.java
new file mode 100644
index 0000000..630440f
--- /dev/null
+++ b/tooling/karaf-maven-plugin/src/it/test-check-dependencies/dependency-module-c/src/main/java/test/C.java
@@ -0,0 +1,30 @@
+/*
+ * 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 test.c;
+
+import test.a.*;
+import test.b.*;
+
+public class C
+{
+ public static String createStringWithDependencies() {
+ return A.ASTRING + " " + B.BSTRING + " " + "C-string";
+ }
+}
diff --git a/tooling/karaf-maven-plugin/src/it/test-check-dependencies/dependency-module-d/pom.xml b/tooling/karaf-maven-plugin/src/it/test-check-dependencies/dependency-module-d/pom.xml
new file mode 100644
index 0000000..1b3d303
--- /dev/null
+++ b/tooling/karaf-maven-plugin/src/it/test-check-dependencies/dependency-module-d/pom.xml
@@ -0,0 +1,59 @@
+
+
+
+
+ 4.0.0
+
+ test
+ test-check-dependencies
+ 1.0-SNAPSHOT
+ ../pom.xml
+
+
+ test
+ dependency-module-d
+ 1.0-SNAPSHOT
+
+ bundle
+
+
+ UTF-8
+
+
+
+
+ test
+ dependency-module-c
+ 1.0-SNAPSHOT
+
+
+
+
+
+
+ org.apache.felix
+ maven-bundle-plugin
+ 2.3.7
+ true
+
+
+
+
diff --git a/tooling/karaf-maven-plugin/src/it/test-check-dependencies/dependency-module-d/src/main/java/test/D.java b/tooling/karaf-maven-plugin/src/it/test-check-dependencies/dependency-module-d/src/main/java/test/D.java
new file mode 100644
index 0000000..370fad8
--- /dev/null
+++ b/tooling/karaf-maven-plugin/src/it/test-check-dependencies/dependency-module-d/src/main/java/test/D.java
@@ -0,0 +1,29 @@
+/*
+ * 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 test.d;
+
+import test.c.*;
+
+public class D
+{
+ public String createStringWithDependencies() {
+ return C.createStringWithDependencies() + " " + "D-string";
+ }
+}
diff --git a/tooling/karaf-maven-plugin/src/it/test-check-dependencies/pom.xml b/tooling/karaf-maven-plugin/src/it/test-check-dependencies/pom.xml
new file mode 100644
index 0000000..0d61936
--- /dev/null
+++ b/tooling/karaf-maven-plugin/src/it/test-check-dependencies/pom.xml
@@ -0,0 +1,66 @@
+
+
+
+
+
+ 4.0.0
+ test
+ test-check-dependencies
+ 1.0-SNAPSHOT
+ pom
+
+
+ UTF-8
+
+
+
+ dependency-module-a
+ dependency-module-b
+ dependency-module-c
+ dependency-module-d
+ dependencies-features
+
+
+
+
+
+ org.apache.felix
+ maven-bundle-plugin
+ true
+
+
+ org.apache.karaf.tooling
+ karaf-maven-plugin
+ @pom.version@
+
+
+ generate-features-file
+ package
+
+ features-generate-descriptor
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tooling/karaf-maven-plugin/src/it/test-check-dependencies/verify.bsh b/tooling/karaf-maven-plugin/src/it/test-check-dependencies/verify.bsh
new file mode 100644
index 0000000..147538c
--- /dev/null
+++ b/tooling/karaf-maven-plugin/src/it/test-check-dependencies/verify.bsh
@@ -0,0 +1,35 @@
+/*
+ * 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.
+ */
+
+import org.custommonkey.xmlunit.*;
+import java.io.*;
+import java.lang.*;
+
+Reader r = new FileReader(new File(basedir, "control.xml"));
+
+// load the features file pushed to the repository
+File generated = new File( localRepositoryPath, "test/check-dependencies-features/1.0-SNAPSHOT/check-dependencies-features-1.0-SNAPSHOT-features.xml" );
+if (generated.exists()) {
+ try {
+ XMLAssert.assertXMLEqual(r, new FileReader(generated));
+ return true;
+ } catch (Throwable ignored) { }
+}
+
+return false;
diff --git a/tooling/karaf-maven-plugin/src/it/test-input-file/control.xml b/tooling/karaf-maven-plugin/src/it/test-input-file/control.xml
new file mode 100644
index 0000000..6ce54fa
--- /dev/null
+++ b/tooling/karaf-maven-plugin/src/it/test-input-file/control.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
+ Test Description
+ mvn:test/test-input-file/1.0-SNAPSHOT
+
+
diff --git a/tooling/karaf-maven-plugin/src/it/test-input-file/pom.xml b/tooling/karaf-maven-plugin/src/it/test-input-file/pom.xml
new file mode 100644
index 0000000..f8af64a
--- /dev/null
+++ b/tooling/karaf-maven-plugin/src/it/test-input-file/pom.xml
@@ -0,0 +1,65 @@
+
+
+
+
+
+ 4.0.0
+
+ test
+ test-input-file
+ 1.0-SNAPSHOT
+ bundle
+ Test Description
+
+
+ UTF-8
+
+
+
+
+
+
+
+
+ org.apache.felix
+ maven-bundle-plugin
+ 2.3.7
+ true
+
+
+ org.apache.karaf.tooling
+ karaf-maven-plugin
+ @pom.version@
+
+
+ generate-features-file
+ package
+
+ features-generate-descriptor
+
+
+
+
+
+
+
+
+
diff --git a/tooling/karaf-maven-plugin/src/it/test-input-file/src/main/feature/feature.xml b/tooling/karaf-maven-plugin/src/it/test-input-file/src/main/feature/feature.xml
new file mode 100644
index 0000000..b51748d
--- /dev/null
+++ b/tooling/karaf-maven-plugin/src/it/test-input-file/src/main/feature/feature.xml
@@ -0,0 +1,24 @@
+
+
+
+
+ mvn:${project.groupId}/${project.artifactId}/${project.version}
+
+
diff --git a/tooling/karaf-maven-plugin/src/it/test-input-file/src/main/java/test/App.java b/tooling/karaf-maven-plugin/src/it/test-input-file/src/main/java/test/App.java
new file mode 100644
index 0000000..fedb5da
--- /dev/null
+++ b/tooling/karaf-maven-plugin/src/it/test-input-file/src/main/java/test/App.java
@@ -0,0 +1,32 @@
+/*
+ * 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 test;
+
+/**
+ * Hello world!
+ *
+ */
+public class App
+{
+ public static void main( String[] args )
+ {
+ System.out.println( "Hello World!" );
+ }
+}
diff --git a/tooling/karaf-maven-plugin/src/it/test-input-file/verify.bsh b/tooling/karaf-maven-plugin/src/it/test-input-file/verify.bsh
new file mode 100644
index 0000000..99dc9a0
--- /dev/null
+++ b/tooling/karaf-maven-plugin/src/it/test-input-file/verify.bsh
@@ -0,0 +1,35 @@
+/*
+ * 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.
+ */
+
+import org.custommonkey.xmlunit.*;
+import java.io.*;
+import java.lang.*;
+
+Reader r = new FileReader(new File(basedir, "control.xml"));
+
+// load the features file pushed to the repository
+File generated = new File( localRepositoryPath, "test/test-input-file/1.0-SNAPSHOT/test-input-file-1.0-SNAPSHOT-features.xml" );
+if (generated.exists()) {
+ try {
+ XMLAssert.assertXMLEqual(r, new FileReader(generated));
+ return true;
+ } catch (Throwable ignored) { }
+}
+
+return false;
diff --git a/tooling/karaf-maven-plugin/src/it/test-type-classifier/control.xml b/tooling/karaf-maven-plugin/src/it/test-type-classifier/control.xml
new file mode 100644
index 0000000..9d52096
--- /dev/null
+++ b/tooling/karaf-maven-plugin/src/it/test-type-classifier/control.xml
@@ -0,0 +1,21 @@
+
+
+
+
\ No newline at end of file
diff --git a/tooling/karaf-maven-plugin/src/it/test-type-classifier/pom.xml b/tooling/karaf-maven-plugin/src/it/test-type-classifier/pom.xml
new file mode 100644
index 0000000..eeb048a
--- /dev/null
+++ b/tooling/karaf-maven-plugin/src/it/test-type-classifier/pom.xml
@@ -0,0 +1,62 @@
+
+
+
+
+ 4.0.0
+
+ test
+ test-type-classifier
+ 1.0-SNAPSHOT
+ bundle
+
+
+ UTF-8
+
+
+
+
+
+ org.apache.felix
+ maven-bundle-plugin
+ 2.3.7
+ true
+
+
+ org.apache.karaf.tooling
+ karaf-maven-plugin
+ @pom.version@
+
+
+ generate-features-file
+ package
+
+ features-generate-descriptor
+
+
+ zazzle
+ fershizzle
+
+
+
+
+
+
+
diff --git a/tooling/karaf-maven-plugin/src/it/test-type-classifier/src/main/java/test/App.java b/tooling/karaf-maven-plugin/src/it/test-type-classifier/src/main/java/test/App.java
new file mode 100644
index 0000000..fedb5da
--- /dev/null
+++ b/tooling/karaf-maven-plugin/src/it/test-type-classifier/src/main/java/test/App.java
@@ -0,0 +1,32 @@
+/*
+ * 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 test;
+
+/**
+ * Hello world!
+ *
+ */
+public class App
+{
+ public static void main( String[] args )
+ {
+ System.out.println( "Hello World!" );
+ }
+}
diff --git a/tooling/karaf-maven-plugin/src/it/test-type-classifier/verify.bsh b/tooling/karaf-maven-plugin/src/it/test-type-classifier/verify.bsh
new file mode 100644
index 0000000..54258c2
--- /dev/null
+++ b/tooling/karaf-maven-plugin/src/it/test-type-classifier/verify.bsh
@@ -0,0 +1,35 @@
+/*
+ * 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.
+ */
+
+import org.custommonkey.xmlunit.*;
+import java.io.*;
+import java.lang.*;
+
+Reader r = new FileReader(new File(basedir, "control.xml"));
+
+// load the features file pushed to the repository
+File generated = new File( localRepositoryPath, "test/test-type-classifier/1.0-SNAPSHOT/test-type-classifier-1.0-SNAPSHOT-fershizzle.zazzle" );
+if (generated.exists()) {
+ try {
+ XMLAssert.assertXMLEqual(r, new FileReader(generated));
+ return true;
+ } catch (Throwable ignored) { }
+}
+
+return false;
diff --git a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/features/GenerateDescriptorMojo.java b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/features/GenerateDescriptorMojo.java
index 1dcc137..a1fbb62 100644
--- a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/features/GenerateDescriptorMojo.java
+++ b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/features/GenerateDescriptorMojo.java
@@ -568,10 +568,18 @@ public class GenerateDescriptorMojo extends AbstractLogEnabled implements Mojo {
filter(dependencyCache, filteredDependencyCache);
//read dependency types, convert to dependencies, compare.
Features oldfeatures = readFeaturesFile(filteredDependencyCache);
- Feature oldFeature = oldfeatures.getFeature().get(0);
List addedBundles = new ArrayList(feature.getBundle());
List removedBundles = new ArrayList();
+
+ // if there are no features yet, start one
+ if (oldfeatures.getFeature().size() == 0) {
+ Feature f = new Feature();
+ f.setName(oldfeatures.getName());
+ oldfeatures.getFeature().add(f);
+ }
+
+ Feature oldFeature = oldfeatures.getFeature().get(0);
for (Bundle test : oldFeature.getBundle()) {
boolean t1 = addedBundles.contains(test);
int s1 = addedBundles.size();