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..b937c31
--- /dev/null
+++ b/tooling/karaf-maven-plugin/src/it/test-aggregate-features/aggregate-recursive-module-c/pom.xml
@@ -0,0 +1,64 @@
+
+
+
+
+ 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-a
+ 1.0-SNAPSHOT
+
+
+ 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..630440f
--- /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,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-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..61aec54
--- /dev/null
+++ b/tooling/karaf-maven-plugin/src/it/test-aggregate-features/aggregate-recursive-module-d/pom.xml
@@ -0,0 +1,59 @@
+
+
+
+
+ 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-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..370fad8
--- /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,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-aggregate-features/control.xml b/tooling/karaf-maven-plugin/src/it/test-aggregate-features/control.xml
new file mode 100644
index 0000000..5ade4fa
--- /dev/null
+++ b/tooling/karaf-maven-plugin/src/it/test-aggregate-features/control.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+ Test Description
+ mvn:test/aggregate-recursive-module-a/1.0-SNAPSHOT
+ mvn:test/aggregate-recursive-module-b/1.0-SNAPSHOT
+
+
+ Test Description
+ mvn:test/aggregate-recursive-module-c/1.0-SNAPSHOT
+ mvn:test/aggregate-recursive-module-a/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..f54b7d4
--- /dev/null
+++ b/tooling/karaf-maven-plugin/src/it/test-aggregate-features/pom.xml
@@ -0,0 +1,68 @@
+
+
+
+
+
+ 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-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..9b10af3
--- /dev/null
+++ b/tooling/karaf-maven-plugin/src/it/test-input-file/pom.xml
@@ -0,0 +1,64 @@
+
+
+
+
+ 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-recursive/pom.xml b/tooling/karaf-maven-plugin/src/it/test-recursive/pom.xml
index e3bcef7..1a85567 100644
--- a/tooling/karaf-maven-plugin/src/it/test-recursive/pom.xml
+++ b/tooling/karaf-maven-plugin/src/it/test-recursive/pom.xml
@@ -55,7 +55,6 @@
features-generate-descriptor
- false