Fix test phase execution on Jenkins
diff --git a/Jenkinsfile b/Jenkinsfile
index fc012b0..ef7eee1 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -41,7 +41,7 @@
 
     options {
         // Configure an overall timeout for the build of one hour.
-        timeout(time: 1, unit: 'HOURS')
+        timeout(time: 3, unit: 'HOURS')
         // When we have test-fails e.g. we don't need to run the remaining steps
         skipStagesAfterUnstable()
         buildDiscarder(logRotator(numToKeepStr: '5', artifactNumToKeepStr: '5'))
@@ -50,8 +50,8 @@
     stages {
         stage('Initialization') {
             steps {
-                echo 'Building Branch: ' + env.BRANCH_NAME
-                echo 'Using PATH = ' + env.PATH
+                echo 'Building branch ' + env.BRANCH_NAME
+                echo 'Using PATH ' + env.PATH
             }
         }
 
@@ -72,14 +72,14 @@
         stage('Build') {
             steps {
                 echo 'Building'
-                sh 'mvn -U -B -e clean install -DskipTests -Prat'
+                sh 'mvn -U -B -e clean install -DskipTests -Dinvoker.skip=true -Prat'
             }
         }
 
         stage('Tests') {
             steps {
                 echo 'Running tests'
-                sh 'mvn test'
+                sh 'mvn -B -e test -Ptest'
             }
             post {
                 always {
@@ -97,7 +97,7 @@
             }
             steps {
                 echo 'Deploying'
-                sh 'mvn deploy -Pdeploy'
+                sh 'mvn -B -e deploy -Pdeploy'
             }
         }
     }
diff --git a/assemblies/apache-karaf-minimal/pom.xml b/assemblies/apache-karaf-minimal/pom.xml
index de94723..b3cbcce 100644
--- a/assemblies/apache-karaf-minimal/pom.xml
+++ b/assemblies/apache-karaf-minimal/pom.xml
@@ -157,4 +157,28 @@
         </plugins>
     </build>
 
+    <profiles>
+        <profile>
+            <id>test</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.karaf.tooling</groupId>
+                        <artifactId>karaf-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>process-resources</id>
+                                <phase>none</phase>
+                            </execution>
+                            <execution>
+                                <id>package</id>
+                                <phase>none</phase>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
 </project>
diff --git a/assemblies/apache-karaf/pom.xml b/assemblies/apache-karaf/pom.xml
index 1ed49d0..3ab951a 100644
--- a/assemblies/apache-karaf/pom.xml
+++ b/assemblies/apache-karaf/pom.xml
@@ -249,6 +249,27 @@
                 </plugins>
             </build>
         </profile>
+        <profile>
+            <id>test</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.karaf.tooling</groupId>
+                        <artifactId>karaf-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>install-kar</id>
+                                <phase>none</phase>
+                            </execution>
+                            <execution>
+                                <id>package</id>
+                                <phase>none</phase>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
     </profiles>
 
 </project>
diff --git a/assemblies/features/enterprise/pom.xml b/assemblies/features/enterprise/pom.xml
index 2832896..1b017ba 100644
--- a/assemblies/features/enterprise/pom.xml
+++ b/assemblies/features/enterprise/pom.xml
@@ -261,4 +261,24 @@
         </plugins>
     </build>
 
+    <profiles>
+        <profile>
+            <id>test</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.karaf.tooling</groupId>
+                        <artifactId>karaf-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>verify</id>
+                                <phase>none</phase>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
 </project>
diff --git a/assemblies/features/spring-legacy/pom.xml b/assemblies/features/spring-legacy/pom.xml
index 16c50a7..b6b75dd 100644
--- a/assemblies/features/spring-legacy/pom.xml
+++ b/assemblies/features/spring-legacy/pom.xml
@@ -179,4 +179,24 @@
         </plugins>
     </build>
 
+    <profiles>
+        <profile>
+            <id>test</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.karaf.tooling</groupId>
+                        <artifactId>karaf-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>verify</id>
+                                <phase>none</phase>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
 </project>
diff --git a/assemblies/features/spring/pom.xml b/assemblies/features/spring/pom.xml
index 11d7db2..236706b 100644
--- a/assemblies/features/spring/pom.xml
+++ b/assemblies/features/spring/pom.xml
@@ -179,4 +179,24 @@
         </plugins>
     </build>
 
+    <profiles>
+        <profile>
+            <id>test</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.karaf.tooling</groupId>
+                        <artifactId>karaf-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>verify</id>
+                                <phase>none</phase>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
 </project>
diff --git a/assemblies/features/standard/pom.xml b/assemblies/features/standard/pom.xml
index a9dc5a1..7d42441 100644
--- a/assemblies/features/standard/pom.xml
+++ b/assemblies/features/standard/pom.xml
@@ -476,4 +476,24 @@
         </plugins>
     </build>
 
+    <profiles>
+        <profile>
+            <id>test</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.karaf.tooling</groupId>
+                        <artifactId>karaf-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>verify</id>
+                                <phase>none</phase>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
 </project>
diff --git a/assemblies/features/static/pom.xml b/assemblies/features/static/pom.xml
index adefef5..45979a2 100644
--- a/assemblies/features/static/pom.xml
+++ b/assemblies/features/static/pom.xml
@@ -186,4 +186,38 @@
         </plugins>
     </build>
 
+    <profiles>
+        <profile>
+            <id>test</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.karaf.tooling</groupId>
+                        <artifactId>karaf-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>package</id>
+                                <phase>none</phase>
+                            </execution>
+                        </executions>
+                    </plugin>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-dependency-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>unpack</id>
+                                <phase>none</phase>
+                            </execution>
+                            <execution>
+                                <id>copy</id>
+                                <phase>none</phase>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
 </project>
diff --git a/examples/karaf-docker-example/karaf-docker-example-dynamic-dist/pom.xml b/examples/karaf-docker-example/karaf-docker-example-dynamic-dist/pom.xml
index aed7aad..20c1c44 100644
--- a/examples/karaf-docker-example/karaf-docker-example-dynamic-dist/pom.xml
+++ b/examples/karaf-docker-example/karaf-docker-example-dynamic-dist/pom.xml
@@ -155,6 +155,31 @@
                 </plugins>
             </build>
         </profile>
+        <profile>
+            <id>test</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.karaf.tooling</groupId>
+                        <artifactId>karaf-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>process-resources</id>
+                                <phase>none</phase>
+                            </execution>
+                            <execution>
+                                <id>package</id>
+                                <phase>none</phase>
+                            </execution>
+                            <execution>
+                                <id>dockerfile</id>
+                                <phase>none</phase>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
     </profiles>
 
 </project>
\ No newline at end of file
diff --git a/examples/karaf-docker-example/karaf-docker-example-static-dist/pom.xml b/examples/karaf-docker-example/karaf-docker-example-static-dist/pom.xml
index e43420f..f7d839b 100644
--- a/examples/karaf-docker-example/karaf-docker-example-static-dist/pom.xml
+++ b/examples/karaf-docker-example/karaf-docker-example-static-dist/pom.xml
@@ -124,6 +124,31 @@
                 </plugins>
             </build>
         </profile>
+        <profile>
+            <id>test</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.karaf.tooling</groupId>
+                        <artifactId>karaf-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>process-resources</id>
+                                <phase>none</phase>
+                            </execution>
+                            <execution>
+                                <id>package</id>
+                                <phase>none</phase>
+                            </execution>
+                            <execution>
+                                <id>dockerfile</id>
+                                <phase>none</phase>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
     </profiles>
 
 </project>
diff --git a/examples/karaf-profile-example/karaf-profile-example-dynamic/pom.xml b/examples/karaf-profile-example/karaf-profile-example-dynamic/pom.xml
index 7079527..6f2bc71 100644
--- a/examples/karaf-profile-example/karaf-profile-example-dynamic/pom.xml
+++ b/examples/karaf-profile-example/karaf-profile-example-dynamic/pom.xml
@@ -122,8 +122,31 @@
                     </bootProfiles>
                 </configuration>
             </plugin>
-
         </plugins>
     </build>
 
+    <profiles>
+        <profile>
+            <id>test</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.karaf.tooling</groupId>
+                        <artifactId>karaf-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>process-resources</id>
+                                <phase>none</phase>
+                            </execution>
+                            <execution>
+                                <id>package</id>
+                                <phase>none</phase>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
 </project>
diff --git a/examples/karaf-profile-example/karaf-profile-example-static/pom.xml b/examples/karaf-profile-example/karaf-profile-example-static/pom.xml
index f87ced1..4437006 100644
--- a/examples/karaf-profile-example/karaf-profile-example-static/pom.xml
+++ b/examples/karaf-profile-example/karaf-profile-example-static/pom.xml
@@ -137,8 +137,31 @@
                     </blacklistedFeatures>
                 </configuration>
             </plugin>
-
         </plugins>
     </build>
 
+    <profiles>
+        <profile>
+            <id>test</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.karaf.tooling</groupId>
+                        <artifactId>karaf-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>process-resources</id>
+                                <phase>none</phase>
+                            </execution>
+                            <execution>
+                                <id>package</id>
+                                <phase>none</phase>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
 </project>