You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by cz...@apache.org on 2015/04/15 04:36:27 UTC

svn commit: r1673622 - in /sling/trunk/contrib/launchpad/testing: pom.xml src/main/bundles/ src/main/resources/META-INF/

Author: cziegeler
Date: Wed Apr 15 02:36:27 2015
New Revision: 1673622

URL: http://svn.apache.org/r1673622
Log:
SLING-4597 : Migrate contrib launchpad testing to provisioning model

Removed:
    sling/trunk/contrib/launchpad/testing/src/main/bundles/
    sling/trunk/contrib/launchpad/testing/src/main/resources/META-INF/
Modified:
    sling/trunk/contrib/launchpad/testing/pom.xml

Modified: sling/trunk/contrib/launchpad/testing/pom.xml
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/launchpad/testing/pom.xml?rev=1673622&r1=1673621&r2=1673622&view=diff
==============================================================================
--- sling/trunk/contrib/launchpad/testing/pom.xml (original)
+++ sling/trunk/contrib/launchpad/testing/pom.xml Wed Apr 15 02:36:27 2015
@@ -28,16 +28,15 @@
     </parent>
 
     <artifactId>org.apache.sling.launchpad.contrib-testing</artifactId>
-    <packaging>war</packaging>
+    <packaging>slingstart</packaging>
     <version>4-SNAPSHOT</version>
 
     <name>Apache Sling Launchpad Contrib Testing</name>
     <description>
-        Sling Launchpad Contrib Testing module, contains integration tests that
+        Apache Sling Launchpad Contrib Testing module, contains integration tests that
         were previously in the launchpad webapp module.
     </description>
 
-
     <scm>
         <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/contrib/launchpad/testing</connection>
         <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/contrib/launchpad/testing</developerConnection>
@@ -56,51 +55,10 @@
 
         <!-- hostname for integration tests -->
         <test.host>localhost</test.host>
-
-        <!--
-            Disable Jetty webapp rescan (override with -D)
-        -->
-        <jetty.scan.interval.seconds>0</jetty.scan.interval.seconds>
-
-        <!--
-            Sling home directory when starting with jetty:run
-        -->
-        <jetty.sling.home>target/sling</jetty.sling.home>
-
-        <!--
-            Defines which tests are for the "integration-testing" phase
-        -->
-        <integration.test.code.path>
-            **/launchpad/webapp/integrationtest
-        </integration.test.code.path>
-
-        <!--
-            Set this to true to stop mvn once the integration test Jetty instance is
-            started. Useful to manually test the integration testing webapp.
-        -->
-        <integration.test.wait>false</integration.test.wait>
-
-        <resources.bundles.path>${project.build.directory}/launchpad-bundles/resources/bundles</resources.bundles.path>
     </properties>
 
     <build>
         <plugins>
-
-            <plugin>
-                <artifactId>maven-clean-plugin</artifactId>
-                <configuration>
-                    <filesets>
-                        <fileset>
-                            <directory>${basedir}</directory>
-                            <includes>
-                                <include>derby.log</include>
-                                <include>cachedir</include>
-                                <include>sling</include>
-                            </includes>
-                        </fileset>
-                    </filesets>
-                </configuration>
-            </plugin>
             <plugin>
                 <groupId>org.codehaus.mojo</groupId>
                 <artifactId>build-helper-maven-plugin</artifactId>
@@ -120,282 +78,71 @@
                 </executions>
             </plugin>
             <plugin>
-                 <groupId>org.apache.maven.plugins</groupId>
-                 <artifactId>maven-antrun-plugin</artifactId>
-                 <executions>
-                     <execution>
-                         <id>delete-sling-folder</id>
-                         <phase>package</phase>
-                         <goals>
-                             <goal>run</goal>
-                         </goals>
-                         <configuration>
-                             <tasks>
-                                 <echo>SLING-845 - delete parent sling folder before integration tests</echo>
-                                 <delete dir="../../sling" />
-                             </tasks>
-                        </configuration>
-                     </execution>
-                 </executions>
-             </plugin>
-
-            <plugin>
                 <groupId>org.apache.sling</groupId>
-                <artifactId>maven-launchpad-plugin</artifactId>
-                <!-- Version newer than the one declared in the parent pom -->
-                <version>2.3.0</version>
+                <artifactId>slingstart-maven-plugin</artifactId>
+                <version>1.0.5-SNAPSHOT</version>
+                <extensions>true</extensions>
                 <executions>
                     <execution>
-                        <id>prepare-package</id>
+                        <id>start-container</id>
                         <goals>
-                            <goal>prepare-package</goal>
+                            <goal>start</goal>
+                            <goal>stop</goal>
                         </goals>
-                        <configuration>
-                            <defaultBundleList>
-                                <version>7</version>
-                            </defaultBundleList>
-                        </configuration>
                     </execution>
                 </executions>
-            </plugin>
-
-            <!--
-              Include sling-app launcher classes and resources, but no Sling
-              bundles (we want to specify our own versions)
-            -->
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-war-plugin</artifactId>
                 <configuration>
-                    <webResources>
-                        <!-- the configuration resources -->
-                        <resource>
-                            <directory>
-                                ${project.build.directory}/launchpad-bundles
-                            </directory>
-                            <targetPath>WEB-INF</targetPath>
-                        </resource>
-                        <!-- Legal stuff -->
-                        <resource>
-                            <directory>${basedir}</directory>
-                            <targetPath>META-INF</targetPath>
-                            <includes>
-                                <include>LICENSE*</include>
-                                <include>NOTICE*</include>
-                            </includes>
-                        </resource>
-                    </webResources>
+                    <servers>
+                        <server>
+                            <port>${http.port}</port>
+                            <controlPort>${sling.control.port}</controlPort>
+                            <runmode>${sling.run.modes}</runmode>
+                            <contextPath>${http.base.path}</contextPath>
+                        </server>
+                    </servers>
                 </configuration>
             </plugin>
-
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-surefire-plugin</artifactId>
+	            <artifactId>maven-failsafe-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>integration-test</goal>
+                            <goal>verify</goal>
+                        </goals>
+                    </execution>
+                </executions>
                 <configuration>
-                    <systemProperties>
-                        <!--
-                            WARNING: make sure these URLs are consistent with the
-                            cargo-maven2-plugin settings: AFAIK Maven does not
-                            expand variables in the <value> element.
-                            And WARNING: these properties are duplicated somewhere in this
-                            POM with slightly different values...there must be a better way.
-                        -->
-                        <property>
-                            <name>launchpad.http.server.url</name>
-                            <value>
-                                http://${test.host}:${http.port}/${http.base.path}
-                            </value>
-                        </property>
-                        <property>
-                            <name>launchpad.webdav.server.url</name>
-                            <value>
-                                http://${test.host}:${http.port}/${webdav.workspace.path}
-                            </value>
-                        </property>
-                        <property>
-                            <name>launchpad.servlet.context</name>
-                            <value>
-                                /${http.base.path}
-                            </value>
-                        </property>
-                    </systemProperties>
+                    <includes>
+                        <include>**/*Test.java</include>
+                        <include>**/*IT.java</include>
+                    </includes>
+                    <excludes>
+                        <exclude>${failsafe.exclude}</exclude>
+                    </excludes>
+                    <excludedGroups>${sling.it.excludedGroups}</excludedGroups>
+                    <systemPropertyVariables>
+                        <launchpad.http.server.url>http://${test.host}:${http.port}/</launchpad.http.server.url>
+                        <launchpad.webdav.server.url>http://${test.host}:${http.port}/${webdav.workspace.path}</launchpad.webdav.server.url>
+                        <launchpad.servlet.context>${http.base.path}</launchpad.servlet.context>
+                    </systemPropertyVariables>
                 </configuration>
             </plugin>
-        </plugins>
-    </build>
-    <reporting>
-        <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-javadoc-plugin</artifactId>
+	            <artifactId>maven-surefire-plugin</artifactId>
                 <configuration>
-                  <!-- No javadocs -->
-                    <excludePackageNames>
-                        org.apache.sling
-                    </excludePackageNames>
+                    <excludes>
+                        <exclude>**/*Test.java</exclude>
+                        <exclude>**/*IT.java</exclude>
+                    </excludes>
                 </configuration>
             </plugin>
         </plugins>
-    </reporting>
-
-    <profiles>
-        <profile>
-            <!--
-                Run the cargo-based integration tests.
-            -->
-            <id>cargoIntegrationTesting</id>
-            <activation>
-                <property>
-                    <name>!maven.test.skip</name>
-                </property>
-            </activation>
-            <build>
-                <plugins>
-                    <plugin>
-                        <groupId>org.apache.maven.plugins</groupId>
-                        <artifactId>maven-surefire-plugin</artifactId>
-                        <executions>
-                            <execution>
-                                <id>surefire-integration-test</id>
-                                <phase>integration-test</phase>
-                                <goals>
-                                    <goal>test</goal>
-                                </goals>
-                                <configuration>
-                                    <excludes>
-                                        <exclude>none</exclude>
-                                    </excludes>
-                                    <includes>
-                                        <include>
-                                            ${integration.test.code.path}/**/*Test.java
-                                        </include>
-                                    </includes>
-                                    <systemProperties>
-                                        <!--
-                                            WARNING: make sure these URLs are consistent with the
-                                            cargo-maven2-plugin settings: AFAIK Maven does not
-                                            expand variables in the <value> element.
-                                            And WARNING: these properties are duplicated somewhere in this
-                                            POM with slightly different values...there must be a better way.
-                                        -->
-                                        <property>
-                                            <name>
-                                                launchpad.http.server.url
-                                            </name>
-                                            <value>
-                                                http://${test.host}:${http.port}/${http.base.path}
-                                            </value>
-                                        </property>
-                                        <property>
-                                            <name>
-                                                launchpad.webdav.server.url
-                                            </name>
-                                            <value>
-                                                http://${test.host}:${http.port}/${webdav.workspace.path}
-                                            </value>
-                                        </property>
-
-                                    </systemProperties>
-                                </configuration>
-                            </execution>
-                        </executions>
-                    </plugin>
-                    <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>
-                            <wait>${integration.test.wait}</wait>
-                            <container>
-                                <containerId>jetty6x</containerId>
-                                <type>embedded</type>
-                                <systemProperties>
-                                    <sling.home>
-                                        ${basedir}/target/it/sling
-                                    </sling.home>
-                                </systemProperties>
-                            </container>
-                            <deployables>
-                                <deployable>
-                                    <properties>
-                                        <context>/${http.base.path}</context>
-                                    </properties>
-                                </deployable>
-                            </deployables>
-                            <configuration>
-                                <home>${project.build.directory}/cargo</home>
-                                <properties>
-                                    <cargo.servlet.port>
-                                        ${http.port}
-                                    </cargo.servlet.port>
-                                    <!--
-                                        <cargo.jvmargs>-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=30333,server=y,suspend=y</cargo.jvmargs>
-                                    -->
-                                </properties>
-                            </configuration>
-                        </configuration>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile>
-        <profile>
-            <!--
-                By default, do not run the integration tests in the test phase, as they have
-                no Sling instance to talk to.
-                See README.txt for how to run the integration tests against a running instance
-                of Sling.
-            -->
-            <id>disableIntegrationTestsInTestPhase</id>
-            <activation>
-                <property>
-                    <name>!maven.test.skip</name>
-                </property>
-            </activation>
-            <build>
-                <plugins>
-                    <plugin>
-                        <groupId>org.apache.maven.plugins</groupId>
-                        <artifactId>maven-surefire-plugin</artifactId>
-                        <configuration>
-                            <excludes>
-                                <exclude>
-                                    ${integration.test.code.path}/**/*.java
-                                </exclude>
-                            </excludes>
-                        </configuration>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile>
-    </profiles>
+    </build>
 
     <dependencies>
-
-        <!--  The basic Sling WebApp -->
-        <dependency>
-            <groupId>org.apache.sling</groupId>
-            <artifactId>org.apache.sling.launchpad.base</artifactId>
-            <version>2.5.1-SNAPSHOT</version>
-            <classifier>webapp</classifier>
-            <type>war</type>
-            <scope>runtime</scope>
-        </dependency>
-        
         <dependency>
             <groupId>org.osgi</groupId>
             <artifactId>org.osgi.core</artifactId>