incubator-connectors-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1151437 - in /incubator/lcf/trunk/tests/filesystem: ./ src/test/java/org/apache/manifoldcf/filesystem_tests/
Date Wed, 27 Jul 2011 12:06:13 GMT
Author: kwright
Date: Wed Jul 27 12:06:12 2011
New Revision: 1151437

URL: http://svn.apache.org/viewvc?rev=1151437&view=rev
Log:
Set test war paths optionally via -D switch, so maven can point them at the right places.
 Part of CONNECTORS-223.

Modified:
    incubator/lcf/trunk/tests/filesystem/pom.xml
    incubator/lcf/trunk/tests/filesystem/src/test/java/org/apache/manifoldcf/filesystem_tests/Base.java
    incubator/lcf/trunk/tests/filesystem/src/test/java/org/apache/manifoldcf/filesystem_tests/BaseHSQLDB.java
    incubator/lcf/trunk/tests/filesystem/src/test/java/org/apache/manifoldcf/filesystem_tests/BasePostgresql.java

Modified: incubator/lcf/trunk/tests/filesystem/pom.xml
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/tests/filesystem/pom.xml?rev=1151437&r1=1151436&r2=1151437&view=diff
==============================================================================
--- incubator/lcf/trunk/tests/filesystem/pom.xml (original)
+++ incubator/lcf/trunk/tests/filesystem/pom.xml Wed Jul 27 12:06:12 2011
@@ -31,6 +31,58 @@
 
   <build>
     <defaultGoal>test</defaultGoal>
+    <plugins>
+      <plugin>
+        <artifactId>maven-dependency-plugin</artifactId>
+        <executions>
+           <execution>
+            <id>copy-war</id>
+            <phase>generate-resources</phase>
+            <goals>
+              <goal>copy</goal>
+            </goals>
+            <configuration>
+              <outputDirectory>target/dependency</outputDirectory>
+              <artifactItems>
+                <artifactItem>
+                  <groupId>${project.groupId}</groupId>
+                  <artifactId>mcf-api-service</artifactId>
+                  <version>${project.version}</version>
+                  <type>war</type>
+                  <overWrite>false</overWrite>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>${project.groupId}</groupId>
+                  <artifactId>mcf-authority-service</artifactId>
+                  <version>${project.version}</version>
+                  <type>war</type>
+                  <overWrite>false</overWrite>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>${project.groupId}</groupId>
+                  <artifactId>mcf-crawler-ui</artifactId>
+                  <version>${project.version}</version>
+                  <type>war</type>
+                  <overWrite>false</overWrite>
+                </artifactItem>
+              </artifactItems>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <systemPropertyVariables>
+            <crawlerWarPath>target/dependency/mcf-crawler-ui-${project.version}.war</crawlerWarPath>
+            <authorityserviceWarPath>target/dependency/mcf-authority-service-${project.version}.war</authorityserviceWarPath>
+            <apiWarPath>target/dependency/mcf-api-service-${project.version}.war</apiWarPath>
+          </systemPropertyVariables>
+        </configuration>
+      </plugin>
+
+    </plugins>
   </build>
 
   <dependencies>

Modified: incubator/lcf/trunk/tests/filesystem/src/test/java/org/apache/manifoldcf/filesystem_tests/Base.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/tests/filesystem/src/test/java/org/apache/manifoldcf/filesystem_tests/Base.java?rev=1151437&r1=1151436&r2=1151437&view=diff
==============================================================================
--- incubator/lcf/trunk/tests/filesystem/src/test/java/org/apache/manifoldcf/filesystem_tests/Base.java
(original)
+++ incubator/lcf/trunk/tests/filesystem/src/test/java/org/apache/manifoldcf/filesystem_tests/Base.java
Wed Jul 27 12:06:12 2011
@@ -293,16 +293,28 @@ public class Base extends org.apache.man
     server = new Server( testPort );    
     server.setStopAtShutdown( true );
     
+    String crawlerWarPath = "../../framework/dist/web/war/mcf-crawler-ui.war";
+    String authorityserviceWarPath = "../../framework/dist/web/war/mcf-authority-service.war";
+    String apiWarPath = "../../framework/dist/web/war/mcf-api-service.war";
+
+    if (System.getProperty("crawlerWarPath") != null)
+    	crawlerWarPath = System.getProperty("crawlerWarPath");
+    if (System.getProperty("authorityserviceWarPath") != null)
+    	authorityserviceWarPath = System.getProperty("authorityserviceWarPath");
+    if (System.getProperty("apiWarPath") != null)
+    	apiWarPath = System.getProperty("apiWarPath");
+
+    
     // Initialize the servlets
-    WebAppContext lcfCrawlerUI = new WebAppContext("../../framework/dist/web/war/mcf-crawler-ui.war","/mcf-crawler-ui");
+    WebAppContext lcfCrawlerUI = new WebAppContext(crawlerWarPath,"/mcf-crawler-ui");
     // This will cause jetty to ignore all of the framework and jdbc jars in the war, which
is what we want.
     lcfCrawlerUI.setParentLoaderPriority(true);
     server.addHandler(lcfCrawlerUI);
-    WebAppContext lcfAuthorityService = new WebAppContext("../../framework/dist/web/war/mcf-authority-service.war","/mcf-authority-service");
+    WebAppContext lcfAuthorityService = new WebAppContext(authorityserviceWarPath,"/mcf-authority-service");
     // This will cause jetty to ignore all of the framework and jdbc jars in the war, which
is what we want.
     lcfAuthorityService.setParentLoaderPriority(true);
     server.addHandler(lcfAuthorityService);
-    WebAppContext lcfApi = new WebAppContext("../../framework/dist/web/war/mcf-api-service.war","/mcf-api-service");
+    WebAppContext lcfApi = new WebAppContext(apiWarPath,"/mcf-api-service");
     lcfApi.setParentLoaderPriority(true);
     server.addHandler(lcfApi);
     server.start();

Modified: incubator/lcf/trunk/tests/filesystem/src/test/java/org/apache/manifoldcf/filesystem_tests/BaseHSQLDB.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/tests/filesystem/src/test/java/org/apache/manifoldcf/filesystem_tests/BaseHSQLDB.java?rev=1151437&r1=1151436&r2=1151437&view=diff
==============================================================================
--- incubator/lcf/trunk/tests/filesystem/src/test/java/org/apache/manifoldcf/filesystem_tests/BaseHSQLDB.java
(original)
+++ incubator/lcf/trunk/tests/filesystem/src/test/java/org/apache/manifoldcf/filesystem_tests/BaseHSQLDB.java
Wed Jul 27 12:06:12 2011
@@ -292,17 +292,29 @@ public class BaseHSQLDB extends org.apac
     // Start jetty
     server = new Server( testPort );    
     server.setStopAtShutdown( true );
+
+    String crawlerWarPath = "../../framework/dist/web/war/mcf-crawler-ui.war";
+    String authorityserviceWarPath = "../../framework/dist/web/war/mcf-authority-service.war";
+    String apiWarPath = "../../framework/dist/web/war/mcf-api-service.war";
+
+    if (System.getProperty("crawlerWarPath") != null)
+    	crawlerWarPath = System.getProperty("crawlerWarPath");
+    if (System.getProperty("authorityserviceWarPath") != null)
+    	authorityserviceWarPath = System.getProperty("authorityserviceWarPath");
+    if (System.getProperty("apiWarPath") != null)
+    	apiWarPath = System.getProperty("apiWarPath");
+
     
     // Initialize the servlets
-    WebAppContext lcfCrawlerUI = new WebAppContext("../../framework/dist/web/war/mcf-crawler-ui.war","/mcf-crawler-ui");
+    WebAppContext lcfCrawlerUI = new WebAppContext(crawlerWarPath,"/mcf-crawler-ui");
     // This will cause jetty to ignore all of the framework and jdbc jars in the war, which
is what we want.
     lcfCrawlerUI.setParentLoaderPriority(true);
     server.addHandler(lcfCrawlerUI);
-    WebAppContext lcfAuthorityService = new WebAppContext("../../framework/dist/web/war/mcf-authority-service.war","/mcf-authority-service");
+    WebAppContext lcfAuthorityService = new WebAppContext(authorityserviceWarPath,"/mcf-authority-service");
     // This will cause jetty to ignore all of the framework and jdbc jars in the war, which
is what we want.
     lcfAuthorityService.setParentLoaderPriority(true);
     server.addHandler(lcfAuthorityService);
-    WebAppContext lcfApi = new WebAppContext("../../framework/dist/web/war/mcf-api-service.war","/mcf-api-service");
+    WebAppContext lcfApi = new WebAppContext(apiWarPath,"/mcf-api-service");
     lcfApi.setParentLoaderPriority(true);
     server.addHandler(lcfApi);
     server.start();

Modified: incubator/lcf/trunk/tests/filesystem/src/test/java/org/apache/manifoldcf/filesystem_tests/BasePostgresql.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/tests/filesystem/src/test/java/org/apache/manifoldcf/filesystem_tests/BasePostgresql.java?rev=1151437&r1=1151436&r2=1151437&view=diff
==============================================================================
--- incubator/lcf/trunk/tests/filesystem/src/test/java/org/apache/manifoldcf/filesystem_tests/BasePostgresql.java
(original)
+++ incubator/lcf/trunk/tests/filesystem/src/test/java/org/apache/manifoldcf/filesystem_tests/BasePostgresql.java
Wed Jul 27 12:06:12 2011
@@ -292,17 +292,29 @@ public class BasePostgresql extends org.
     // Start jetty
     server = new Server( testPort );    
     server.setStopAtShutdown( true );
+
+    
+    String crawlerWarPath = "../../framework/dist/web/war/mcf-crawler-ui.war";
+    String authorityserviceWarPath = "../../framework/dist/web/war/mcf-authority-service.war";
+    String apiWarPath = "../../framework/dist/web/war/mcf-api-service.war";
+
+    if (System.getProperty("crawlerWarPath") != null)
+    	crawlerWarPath = System.getProperty("crawlerWarPath");
+    if (System.getProperty("authorityserviceWarPath") != null)
+    	authorityserviceWarPath = System.getProperty("authorityserviceWarPath");
+    if (System.getProperty("apiWarPath") != null)
+    	apiWarPath = System.getProperty("apiWarPath");
     
     // Initialize the servlets
-    WebAppContext lcfCrawlerUI = new WebAppContext("../../framework/dist/web/war/mcf-crawler-ui.war","/mcf-crawler-ui");
+    WebAppContext lcfCrawlerUI = new WebAppContext(crawlerWarPath,"/mcf-crawler-ui");
     // This will cause jetty to ignore all of the framework and jdbc jars in the war, which
is what we want.
     lcfCrawlerUI.setParentLoaderPriority(true);
     server.addHandler(lcfCrawlerUI);
-    WebAppContext lcfAuthorityService = new WebAppContext("../../framework/dist/web/war/mcf-authority-service.war","/mcf-authority-service");
+    WebAppContext lcfAuthorityService = new WebAppContext(authorityserviceWarPath,"/mcf-authority-service");
     // This will cause jetty to ignore all of the framework and jdbc jars in the war, which
is what we want.
     lcfAuthorityService.setParentLoaderPriority(true);
     server.addHandler(lcfAuthorityService);
-    WebAppContext lcfApi = new WebAppContext("../../framework/dist/web/war/mcf-api-service.war","/mcf-api-service");
+    WebAppContext lcfApi = new WebAppContext(apiWarPath,"/mcf-api-service");
     lcfApi.setParentLoaderPriority(true);
     server.addHandler(lcfApi);
     server.start();



Mime
View raw message