You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by mi...@apache.org on 2015/08/05 15:33:17 UTC

olingo-odata4 git commit: [OLINGO-659] Add profiles for fit test granularity

Repository: olingo-odata4
Updated Branches:
  refs/heads/master 633578a18 -> 3f95e1942


[OLINGO-659] Add profiles for fit test granularity


Project: http://git-wip-us.apache.org/repos/asf/olingo-odata4/repo
Commit: http://git-wip-us.apache.org/repos/asf/olingo-odata4/commit/3f95e194
Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata4/tree/3f95e194
Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata4/diff/3f95e194

Branch: refs/heads/master
Commit: 3f95e194250b4b90596e688cb024dce30fbf4a4a
Parents: 633578a
Author: mibo <mi...@apache.org>
Authored: Wed Aug 5 14:25:15 2015 +0200
Committer: mibo <mi...@apache.org>
Committed: Wed Aug 5 15:32:47 2015 +0200

----------------------------------------------------------------------
 fit/pom.xml                                     | 40 ++++++++++++++++----
 .../olingo/fit/server/TomcatTestServer.java     |  1 +
 2 files changed, 34 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/3f95e194/fit/pom.xml
----------------------------------------------------------------------
diff --git a/fit/pom.xml b/fit/pom.xml
index 484ba0d..6d8a95b 100644
--- a/fit/pom.xml
+++ b/fit/pom.xml
@@ -34,6 +34,32 @@
     <relativePath>..</relativePath>
   </parent>
 
+  <properties>
+    <cobertura.skip>true</cobertura.skip>
+    <!-- exclude proxy tests by default -->
+    <exclude.regex>.*proxy.*</exclude.regex>
+  </properties>
+
+  <profiles>
+    <profile>
+      <id>build.fast</id>
+      <properties>
+        <pmd.skip>true</pmd.skip>
+        <rat.skip>true</rat.skip>
+        <checkstyle.skip>true</checkstyle.skip>
+        <exclude.regex>.*(proxy|client).*</exclude.regex>
+      </properties>
+    </profile>
+    <profile>
+      <id>build.quality</id>
+      <properties>
+        <cobertura.skip>false</cobertura.skip>
+        <!-- nothing excluded -->
+        <exclude.regex></exclude.regex>
+      </properties>
+    </profile>
+  </profiles>
+
   <dependencies>
     <dependency>
       <groupId>org.apache.olingo</groupId>
@@ -110,10 +136,6 @@
 
     <dependency>
       <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-log4j12</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.slf4j</groupId>
       <artifactId>slf4j-api</artifactId>
     </dependency>
 
@@ -154,6 +176,9 @@
             <include>**/*ITCase.java</include>
             <include>**/*Test.java</include>
           </includes>
+          <excludes>
+            <exclude>%regex[${exclude.regex}]</exclude>
+          </excludes>
         </configuration>
       </plugin>
       <plugin>
@@ -176,6 +201,7 @@
               <goal>unpack-dependencies</goal>
             </goals>
             <configuration>
+              <skip>${cobertura.skip}</skip>
               <includeGroupIds>${project.groupId}</includeGroupIds>
               <outputDirectory>${project.build.directory}/classes</outputDirectory>
               <overWriteReleases>true</overWriteReleases>
@@ -189,6 +215,7 @@
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>cobertura-maven-plugin</artifactId>
         <configuration>
+          <skip>${cobertura.skip}</skip>
           <instrumentation>
             <excludes>
               <exclude>org/apache/olingo/**/tecsvc/**/*.class</exclude>
@@ -207,6 +234,7 @@
         <artifactId>maven-failsafe-plugin</artifactId>
         <configuration>
           <excludes>
+            <skip>${cobertura.skip}</skip>
             <exclude>**/*ITCase.java</exclude>
           </excludes>
         </configuration>
@@ -225,6 +253,7 @@
           </execution>
         </executions>
         <configuration>
+          <skip>${cobertura.skip}</skip>
           <mainClass>org.apache.olingo.fit.server.TomcatTestServer</mainClass>
         </configuration>
       </plugin>
@@ -246,9 +275,6 @@
           <webResources>
             <resource>
               <directory>${project.build.outputDirectory}</directory>
-              <!--<includes>
-                <include>META-INF/DEPENDENCIES*</include>
-              </includes>-->
             </resource>
           </webResources>
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/3f95e194/fit/src/main/java/org/apache/olingo/fit/server/TomcatTestServer.java
----------------------------------------------------------------------
diff --git a/fit/src/main/java/org/apache/olingo/fit/server/TomcatTestServer.java b/fit/src/main/java/org/apache/olingo/fit/server/TomcatTestServer.java
index 9fb15f5..df7df8c 100644
--- a/fit/src/main/java/org/apache/olingo/fit/server/TomcatTestServer.java
+++ b/fit/src/main/java/org/apache/olingo/fit/server/TomcatTestServer.java
@@ -290,6 +290,7 @@ public class TomcatTestServer {
     private Context getContext() {
       if (baseContext == null) {
         baseContext = tomcat.addContext("/", baseDir.getAbsolutePath());
+        baseContext.setLoader(new WebappLoader(Thread.currentThread().getContextClassLoader()));
       }
       return baseContext;
     }