You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by zr...@apache.org on 2019/12/05 13:45:32 UTC

[camel] 01/01: Move camel-core-osgi-activator tests to Karaf i...

This is an automated email from the ASF dual-hosted git repository.

zregvart pushed a commit to branch pr/move-activator-tests-to-itests
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 7dbc8b1a38ed9880725ece5a09f4457fcb6e6ae7
Author: Zoran Regvart <zr...@apache.org>
AuthorDate: Thu Dec 5 14:44:39 2019 +0100

    Move camel-core-osgi-activator tests to Karaf i...
    
    ...tests
    
    Since OSGI activator depends on Karaf features it can only be built
    after it, and since Karaf features include OSGI activator it fails as
    the activator is not present in the Maven reactor at that point -- it
    will be built right after it. This moves the tests, the only part that
    depends on the Karaf features to the Karaf integration tests to prevent
    this situation.
---
 core/camel-core-osgi-activator/pom.xml             | 105 ---------------------
 tests/camel-itest-karaf/pom.xml                    |  94 ++++++++++++++++++
 .../apache/camel/itest/karaf/main}/BundleIT.java   |   2 +-
 .../camel/itest/karaf/main}/PaxExamOptions.java    |   2 +-
 4 files changed, 96 insertions(+), 107 deletions(-)

diff --git a/core/camel-core-osgi-activator/pom.xml b/core/camel-core-osgi-activator/pom.xml
index 166905a..4b12500 100644
--- a/core/camel-core-osgi-activator/pom.xml
+++ b/core/camel-core-osgi-activator/pom.xml
@@ -57,73 +57,6 @@
       <artifactId>camel-core-osgi</artifactId>
       <scope>provided</scope>
     </dependency>
-    <!-- test -->
-
-    <!-- PAX Exam -->
-    <dependency>
-      <groupId>org.ops4j.pax.exam</groupId>
-      <artifactId>pax-exam</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.ops4j.pax.exam</groupId>
-      <artifactId>pax-exam-spi</artifactId>
-      <version>${pax-exam-version}</version>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.ops4j.pax.exam</groupId>
-      <artifactId>pax-exam-junit4</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.ops4j.pax.exam</groupId>
-      <artifactId>pax-exam-container-karaf</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.ops4j.pax.url</groupId>
-      <artifactId>pax-url-aether</artifactId>
-      <version>2.4.5</version>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.ops4j.pax.tinybundles</groupId>
-      <artifactId>tinybundles</artifactId>
-      <version>2.1.1</version>
-      <scope>test</scope>
-    </dependency>
-
-    <!-- Karaf & Command Shell -->
-    <dependency>
-      <groupId>org.apache.karaf</groupId>
-      <artifactId>apache-karaf</artifactId>
-      <version>${karaf4-version}</version>
-      <type>zip</type>
-      <scope>test</scope>
-      <exclusions>
-        <exclusion>
-          <groupId>org.apache.karaf.features</groupId>
-          <artifactId>framework</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-
-    <!-- Karaf Features -->
-    <dependency>
-      <groupId>org.apache.camel.karaf</groupId>
-      <artifactId>apache-camel</artifactId>
-      <version>${project.version}</version>
-      <classifier>features</classifier>
-      <type>xml</type>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>javax.inject</groupId>
-      <artifactId>javax.inject</artifactId>
-      <version>1</version>
-      <scope>test</scope>
-    </dependency>
   </dependencies>
   <build>
     <plugins>
@@ -139,44 +72,6 @@
           </execution>
         </executions>
       </plugin>
-      <plugin>
-        <artifactId>maven-assembly-plugin</artifactId>
-        <executions>
-          <execution>
-            <phase>pre-integration-test</phase>
-            <goals>
-              <goal>single</goal>
-            </goals>
-            <configuration>
-                <descriptors>
-                    <descriptor>src/assembly/test-bundles.xml</descriptor>
-                </descriptors>
-              <finalName>test</finalName>
-              <attach>false</attach>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-      <!-- Execute in the integration-test phase so that the packaged JAR 
-        can be used -->
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <executions>
-          <execution>
-            <phase>integration-test</phase>
-            <goals>
-              <goal>test</goal>
-            </goals>
-            <configuration>
-              <includes>
-                <include>**/*IT.java</include>
-              </includes>
-              <forkedProcessTimeoutInSeconds>300</forkedProcessTimeoutInSeconds>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
     </plugins>
   </build>
 </project>
diff --git a/tests/camel-itest-karaf/pom.xml b/tests/camel-itest-karaf/pom.xml
index 883a552..a3b67ba 100644
--- a/tests/camel-itest-karaf/pom.xml
+++ b/tests/camel-itest-karaf/pom.xml
@@ -84,6 +84,19 @@
             </exclusions>
         </dependency>
         <dependency>
+            <groupId>org.apache.karaf</groupId>
+            <artifactId>apache-karaf</artifactId>
+            <version>${karaf4-version}</version>
+            <type>zip</type>
+            <scope>test</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.apache.karaf.features</groupId>
+                    <artifactId>framework</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
             <groupId>org.apache.felix</groupId>
             <artifactId>org.apache.felix.configadmin</artifactId>
             <scope>test</scope>
@@ -125,6 +138,12 @@
             <type>pom</type>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>javax.inject</groupId>
+            <artifactId>javax.inject</artifactId>
+            <version>1</version>
+            <scope>test</scope>
+        </dependency>
 
         <!-- test and logging -->
         <dependency>
@@ -133,6 +152,41 @@
             <scope>test</scope>
         </dependency>
 
+        <!-- PAX Exam -->
+        <dependency>
+            <groupId>org.ops4j.pax.exam</groupId>
+            <artifactId>pax-exam</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.exam</groupId>
+            <artifactId>pax-exam-spi</artifactId>
+            <version>${pax-exam-version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.exam</groupId>
+            <artifactId>pax-exam-junit4</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.exam</groupId>
+            <artifactId>pax-exam-container-karaf</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.url</groupId>
+            <artifactId>pax-url-aether</artifactId>
+            <version>2.4.5</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.tinybundles</groupId>
+            <artifactId>tinybundles</artifactId>
+            <version>2.1.1</version>
+            <scope>test</scope>
+        </dependency>
+
         <!-- logging -->
         <dependency>
             <groupId>log4j</groupId>
@@ -197,6 +251,46 @@
                 </configuration>
             </plugin>
 
+            <plugin>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>pre-integration-test</phase>
+                        <goals>
+                            <goal>single</goal>
+                        </goals>
+                        <configuration>
+                            <descriptors>
+                                <descriptor>src/assembly/test-bundles.xml</descriptor>
+                            </descriptors>
+                            <finalName>test</finalName>
+                            <attach>false</attach>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <!-- Execute in the integration-test phase so that the packaged JAR 
+            can be used -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>integration-test</phase>
+                        <goals>
+                            <goal>test</goal>
+                        </goals>
+                        <configuration>
+                            <includes>
+                                <include>**/*IT.java</include>
+                            </includes>
+                            <forkedProcessTimeoutInSeconds>300</forkedProcessTimeoutInSeconds>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
         </plugins>
     </build>
 
diff --git a/core/camel-core-osgi-activator/src/test/java/org/apache/camel/core/osgi/main/it/BundleIT.java b/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/main/BundleIT.java
similarity index 99%
rename from core/camel-core-osgi-activator/src/test/java/org/apache/camel/core/osgi/main/it/BundleIT.java
rename to tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/main/BundleIT.java
index 2cbd6bb..429df96 100644
--- a/core/camel-core-osgi-activator/src/test/java/org/apache/camel/core/osgi/main/it/BundleIT.java
+++ b/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/main/BundleIT.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.core.osgi.main.it;
+package org.apache.camel.itest.karaf.main;
 
 import java.io.IOException;
 import java.net.URISyntaxException;
diff --git a/core/camel-core-osgi-activator/src/test/java/org/apache/camel/core/osgi/main/it/PaxExamOptions.java b/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/main/PaxExamOptions.java
similarity index 98%
rename from core/camel-core-osgi-activator/src/test/java/org/apache/camel/core/osgi/main/it/PaxExamOptions.java
rename to tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/main/PaxExamOptions.java
index 15284c4..07b43f4 100644
--- a/core/camel-core-osgi-activator/src/test/java/org/apache/camel/core/osgi/main/it/PaxExamOptions.java
+++ b/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/main/PaxExamOptions.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.core.osgi.main.it;
+package org.apache.camel.itest.karaf.main;
 
 import java.io.File;