You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by li...@apache.org on 2018/08/01 10:10:17 UTC

[incubator-servicecomb-java-chassis] 03/06: [SCB-790] make integration test project pom simpler

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

liubao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-java-chassis.git

commit a83eb09f18085d42cead1c8a89ea085b2ba0280d
Author: wujimin <wu...@huawei.com>
AuthorDate: Tue Jul 31 11:23:42 2018 +0800

    [SCB-790] make integration test project pom simpler
---
 integration-tests/jaxrs-tests/pom.xml        | 10 ----
 integration-tests/pojo-test/pom.xml          | 10 ----
 integration-tests/pom.xml                    | 86 +++++++++++++++++++++-------
 integration-tests/spring-jaxrs-tests/pom.xml | 10 ----
 integration-tests/springmvc-tests/pom.xml    | 22 -------
 integration-tests/test-common/pom.xml        | 12 ----
 pom.xml                                      |  2 +-
 7 files changed, 65 insertions(+), 87 deletions(-)

diff --git a/integration-tests/jaxrs-tests/pom.xml b/integration-tests/jaxrs-tests/pom.xml
index ac22e34..f060c55 100644
--- a/integration-tests/jaxrs-tests/pom.xml
+++ b/integration-tests/jaxrs-tests/pom.xml
@@ -33,16 +33,6 @@
     <dependency>
       <groupId>org.apache.servicecomb.demo</groupId>
       <artifactId>demo-schema</artifactId>
-      <exclusions>
-        <exclusion>
-          <groupId>org.apache.servicecomb.demo</groupId>
-          <artifactId>demo-signature</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.servicecomb</groupId>
-      <artifactId>provider-jaxrs</artifactId>
     </dependency>
   </dependencies>
 
diff --git a/integration-tests/pojo-test/pom.xml b/integration-tests/pojo-test/pom.xml
index db11c16..aa1607d 100644
--- a/integration-tests/pojo-test/pom.xml
+++ b/integration-tests/pojo-test/pom.xml
@@ -33,16 +33,6 @@
     <dependency>
       <groupId>org.apache.servicecomb.demo</groupId>
       <artifactId>demo-schema</artifactId>
-      <exclusions>
-        <exclusion>
-          <groupId>org.apache.servicecomb.demo</groupId>
-          <artifactId>demo-signature</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.servicecomb</groupId>
-      <artifactId>provider-pojo</artifactId>
     </dependency>
   </dependencies>
 
diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml
index d7ceba4..078405a 100644
--- a/integration-tests/pom.xml
+++ b/integration-tests/pom.xml
@@ -50,6 +50,12 @@
         <groupId>org.apache.servicecomb.demo</groupId>
         <artifactId>demo-schema</artifactId>
         <version>1.1.0-SNAPSHOT</version>
+        <exclusions>
+          <exclusion>
+            <groupId>org.apache.servicecomb.demo</groupId>
+            <artifactId>demo-signature</artifactId>
+          </exclusion>
+        </exclusions>
       </dependency>
       <dependency>
         <groupId>org.apache.servicecomb.tests</groupId>
@@ -79,6 +85,22 @@
   <dependencies>
     <dependency>
       <groupId>org.apache.servicecomb</groupId>
+      <artifactId>transport-rest-vertx</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>provider-springmvc</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>provider-pojo</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>provider-jaxrs</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
       <artifactId>handler-bizkeeper</artifactId>
     </dependency>
     <dependency>
@@ -99,28 +121,48 @@
     </dependency>
     <dependency>
       <groupId>org.apache.servicecomb</groupId>
-      <artifactId>swagger-generator-springmvc</artifactId>
+      <artifactId>metrics-core</artifactId>
     </dependency>
   </dependencies>
-  <build>
-    <pluginManagement>
-      <plugins>
-        <plugin>
-          <groupId>org.apache.maven.plugins</groupId>
-          <artifactId>maven-jar-plugin</artifactId>
-          <version>3.0.2</version>
-        </plugin>
-      </plugins>
-    </pluginManagement>
-    <plugins>
-      <plugin>
-        <groupId>org.sonatype.plugins</groupId>
-        <artifactId>nexus-staging-maven-plugin</artifactId>
-        <extensions>true</extensions>
-        <configuration>
-          <skipStaging>true</skipStaging>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
+
+  <profiles>
+    <profile>
+      <id>it-jar</id>
+      <activation>
+        <file>
+          <exists>enable-it-jar</exists>
+        </file>
+      </activation>
+
+      <!--must manage by profile, otherwise when "mvn install" will cause classpath problem-->
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-jar-plugin</artifactId>
+            <version>3.1.0</version>
+            <executions>
+              <execution>
+                <id>default-jar</id>
+                <phase>package</phase>
+              </execution>
+            </executions>
+            <configuration>
+              <archive>
+                <manifest>
+                  <classpathLayoutType>repository</classpathLayoutType>
+                  <addClasspath>true</addClasspath>
+                  <classpathPrefix>/${settings.localRepository}/</classpathPrefix>
+                  <mainClass>${it.main}</mainClass>
+                </manifest>
+                <manifestEntries>
+                  <Class-Path>. ..</Class-Path>
+                </manifestEntries>
+              </archive>
+            </configuration>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+  </profiles>
 </project>
diff --git a/integration-tests/spring-jaxrs-tests/pom.xml b/integration-tests/spring-jaxrs-tests/pom.xml
index 74da55a..4e3f9b7 100644
--- a/integration-tests/spring-jaxrs-tests/pom.xml
+++ b/integration-tests/spring-jaxrs-tests/pom.xml
@@ -35,16 +35,6 @@
       <artifactId>jaxrs-tests</artifactId>
       <version>1.1.0-SNAPSHOT</version>
       <type>test-jar</type>
-      <exclusions>
-        <exclusion>
-          <groupId>org.apache.servicecomb.demo</groupId>
-          <artifactId>demo-signature</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.servicecomb</groupId>
-      <artifactId>provider-jaxrs</artifactId>
     </dependency>
     <dependency>
       <groupId>org.apache.servicecomb</groupId>
diff --git a/integration-tests/springmvc-tests/pom.xml b/integration-tests/springmvc-tests/pom.xml
index 20fd223..732f77a 100644
--- a/integration-tests/springmvc-tests/pom.xml
+++ b/integration-tests/springmvc-tests/pom.xml
@@ -42,28 +42,6 @@
     <dependency>
       <groupId>org.apache.servicecomb.demo</groupId>
       <artifactId>demo-schema</artifactId>
-      <exclusions>
-        <exclusion>
-          <groupId>org.apache.servicecomb.demo</groupId>
-          <artifactId>demo-signature</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.servicecomb</groupId>
-      <artifactId>provider-springmvc</artifactId>
     </dependency>
   </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <configuration>
-          <forkCount>1</forkCount>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
 </project>
diff --git a/integration-tests/test-common/pom.xml b/integration-tests/test-common/pom.xml
index 3063169..e8d5e47 100644
--- a/integration-tests/test-common/pom.xml
+++ b/integration-tests/test-common/pom.xml
@@ -31,18 +31,6 @@
 
   <dependencies>
     <dependency>
-      <groupId>org.apache.servicecomb</groupId>
-      <artifactId>provider-rest-common</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.servicecomb</groupId>
-      <artifactId>provider-springmvc</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.servicecomb</groupId>
-      <artifactId>provider-jaxrs</artifactId>
-    </dependency>
-    <dependency>
       <groupId>com.github.tomakehurst</groupId>
       <artifactId>wiremock-standalone</artifactId>
       <scope>test</scope>
diff --git a/pom.xml b/pom.xml
index d840d84..74f7da8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -184,7 +184,7 @@
           <excludes>
             <exclude>${excludesFile}</exclude>
           </excludes>
-          <forkCount>2</forkCount>
+          <forkCount>1</forkCount>
           <reuseForks>true</reuseForks>
         </configuration>
       </plugin>