tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lrese...@apache.org
Subject svn commit: r618747 - /incubator/tuscany/java/sca/itest/pom.xml
Date Tue, 05 Feb 2008 19:02:22 GMT
Author: lresende
Date: Tue Feb  5 11:02:17 2008
New Revision: 618747

URL: http://svn.apache.org/viewvc?rev=618747&view=rev
Log:
Configuring profiles for web-containter testing of child modules

Modified:
    incubator/tuscany/java/sca/itest/pom.xml

Modified: incubator/tuscany/java/sca/itest/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/pom.xml?rev=618747&r1=618746&r2=618747&view=diff
==============================================================================
--- incubator/tuscany/java/sca/itest/pom.xml (original)
+++ incubator/tuscany/java/sca/itest/pom.xml Tue Feb  5 11:02:17 2008
@@ -28,6 +28,22 @@
     <artifactId>tuscany-itest</artifactId>
     <packaging>pom</packaging>
     <name>Apache Tuscany SCA Integration Tests</name>
+    
+    <dependencies>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.2</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.easymock</groupId>
+            <artifactId>easymock</artifactId>
+            <version>2.2</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
 
     <profiles>
         <profile>
@@ -90,23 +106,275 @@
                 <module>bpel</module>
             </modules>
         </profile>
+        
+        <!--
+        Multiple configuration properties based on OS
+        -->
+        <profile>
+            <id>win32</id>
+            <activation>
+                <os>
+                    <family>windows</family>
+                </os>
+            </activation>
+           <properties>
+               <webserver.url>http://localhost:8080</webserver.url>
+               <cargo.servlet.port>8080</cargo.servlet.port>
+               <geronimo.home>C:\Apache\geronimo-tomcat6-jee5-2.0.2</geronimo.home>
+           </properties>
+        </profile>
 
-    </profiles>
+        <profile>
+            <id>unix</id>
+            <activation>
+                <os>
+                    <family>unix</family>
+                </os>
+            </activation>
+           <properties>
+               <webserver.url>http://localhost.localdomain:8080</webserver.url>
+               <cargo.servlet.port>8080</cargo.servlet.port>
+               <geronimo.home>/opt/geronimo-jetty6-jee5-2.0.2</geronimo.home>
+           </properties>
+        </profile>
 
-    <dependencies>
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <version>4.2</version>
-            <scope>compile</scope>
-        </dependency>
+        <!-- 
+        This profile handles generation of jar/war artifacts to be used in executing tests
in a web-container
+        -->
+        <profile>
+            <id>webapp</id>
+            <activation>
+                <activeByDefault>false</activeByDefault>
+                <file>
+                    <exists>src</exists>
+                </file>
+            </activation>
+            <dependencies>
+                <dependency>
+	    	    <groupId>org.apache.tuscany.sca</groupId>
+	    	    <artifactId>tuscany-host-webapp</artifactId>
+	    	    <version>1.2-incubating-SNAPSHOT</version>
+	    	</dependency>
+                <!-- marking dependency as provided to exclude from war file -->
+                <dependency>
+                    <groupId>javax.servlet</groupId>
+                    <artifactId>servlet-api</artifactId>
+                    <version>2.3</version>
+                    <scope>provided</scope>
+                </dependency>
+                <dependency>
+                    <groupId>junit</groupId>
+                    <artifactId>junit</artifactId>
+                    <version>4.2</version>
+                    <scope>compile</scope>
+                </dependency>	    	    
+	    </dependencies>    
 
-        <dependency>
-            <groupId>org.easymock</groupId>
-            <artifactId>easymock</artifactId>
-            <version>2.2</version>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
+            <modules>
+                <module>component-type</module>
+                <module>services</module>
+            </modules>
+
+            <build>
+                <plugins>
+                    <!-- Create jar containing the jUnit tests -->
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-jar-plugin</artifactId>
+                        <version>2.2</version>
+                        <executions>
+                            <execution>
+                                <configuration>
+                                    <finalName>junit</finalName>
+                                </configuration>
+                                <phase>test</phase>
+                                <goals>
+                                    <goal>test-jar</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+
+                    <!-- Create war and include jUnit test jar -->
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-war-plugin</artifactId>
+                        <version>2.0.2</version>
+                        <configuration>
+                            <webResources>
+                                <resource>
+                                    <!-- this is relative to the pom.xml directory -->
+                                    <directory>${project.build.directory}</directory>
+                                    <includes>
+                                        <include>*-tests.jar</include>
+                                    </includes>
+                                    <targetPath>WEB-INF/test-lib</targetPath>
+                                </resource>
+                            </webResources>
+                        </configuration>
+                        <executions>
+                            <execution>
+                                <phase>package</phase>
+                                <goals>
+                                    <goal>war</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+
+        <profile>
+            <id>jetty</id>
+            <activation>
+                <activeByDefault>false</activeByDefault>
+            </activation>
+            <build>
+            <pluginManagement>
+                <plugins>
+                    <plugin>
+                        <groupId>org.codehaus.cargo</groupId>
+                        <artifactId>cargo-maven2-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>start-container</id>
+                                <phase>pre-integration-test</phase>
+                                <goals>
+                                    <goal>start</goal>
+                                </goals>
+                            </execution>
+                            <execution>
+                                <id>stop-container</id>
+                                <phase>post-integration-test</phase>
+                                <goals>
+                                    <goal>stop</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                        <configuration>
+                            <container>
+                                <containerId>jetty6x</containerId>
+                                <type>embedded</type>
+                                <systemProperties>
+                                    <org.apache.commons.logging.Log>
+                                        org.apache.commons.logging.impl.SimpleLog
+                                    </org.apache.commons.logging.Log>
+                                </systemProperties>
+                            </container>
+                            <wait>false</wait>
+                            <configuration>
+                                <properties>
+                                    <cargo.servlet.port>8085</cargo.servlet.port>
+                                </properties>
+                                <deployables>
+                                    <deployable>
+                                        <location>${project.build.directory}/${project.build.finalName}.war</location>
+                                        <pingURL>${webserver.url}/${project.build.finalName}/junit</pingURL>
+                                        <type>war</type>
+                                    </deployable>
+                                </deployables>
+                            </configuration>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </pluginManagement>
+            </build>
+        </profile>
+
+        <profile>
+            <id>geronimo</id>
+            <activation>
+                <activeByDefault>false</activeByDefault>
+                <file>
+                    <exists>src</exists>
+                </file>
+            </activation>
+            <build>
+                <plugins>
+                    <!-- Generate web-xml and geronimo deployment descriptor -->
+                    <plugin>
+                        <groupId>org.apache.tuscany.sca</groupId>
+                        <artifactId>tuscany-maven-web-junit</artifactId>
+                        <version>1.2-incubating-SNAPSHOT</version>
+                        <executions>
+                            <execution>
+                                <id>generate-web-xml</id>
+                                <configuration>
+                                    <geronimo>true</geronimo>
+                                </configuration>
+                                <phase>process-resources</phase>
+                                <goals>
+                                    <goal>generate</goal>
+                                </goals>
+                            </execution>
+                            <execution>
+                                <id>web-junit-test</id>
+                                <configuration>
+                                    <url>http://localhost:8080/${project.build.finalName}/junit</url>
+                                </configuration>
+                                <phase>integration-test</phase>
+                                <goals>
+                                    <goal>test</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+
+                    <plugin>
+                        <groupId>org.apache.geronimo.plugins</groupId>
+                        <artifactId>geronimo-maven-plugin</artifactId>
+                        <version>2.0.2</version>
+                        <configuration>
+                            <geronimoHome>${geronimo.home}</geronimoHome>
+                        </configuration>
+                        <executions>
+                            <execution>
+                                <id>start-container</id>
+                                <phase>pre-integration-test</phase>
+                                <goals>
+                                    <goal>start</goal>
+                                </goals>
+                                <configuration>
+                                    <background>true</background>
+                                </configuration>
+                            </execution>
+                            <execution>
+                                <id>deploy-war</id>
+                                <phase>pre-integration-test</phase>
+                                <goals>
+                                    <goal>deploy</goal>
+                                </goals>
+                                <configuration>
+                                    <moduleArchive>${project.build.directory}/${project.build.finalName}.war</moduleArchive>
+                                </configuration>
+                            </execution>
+                            <execution>
+                                <id>undeploy-war</id>
+                                <phase>post-integration-test</phase>
+                                <goals>
+                                    <goal>undeploy</goal>
+                                </goals>
+                                <configuration>
+                                    <moduleId>${groupId}/${artifactId}/${version}/war</moduleId>
+                                </configuration>
+                            </execution>
+                            <execution>
+                                <id>stop-container</id>
+                                <phase>post-integration-test</phase>
+                                <goals>
+                                    <goal>stop</goal>
+                                </goals>
+                                <configuration>
+                                    <username>system</username>
+                                    <password>manager</password>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
 
 </project>



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org


Mime
View raw message