blob: 407842d099a62777b00b950ed64b3040a4c0fa40 [file] [log] [blame]
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
<version>10</version>
<relativePath>../../parent/pom.xml</relativePath>
</parent>
<artifactId>org.apache.sling.launchpad.testing</artifactId>
<packaging>jar</packaging>
<version>6</version>
<name>Apache Sling Launchpad Testing</name>
<description>
Sling Launchpad 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/tags/org.apache.sling.launchpad.testing-6</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.launchpad.testing-6</developerConnection>
<url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.launchpad.testing-6</url>
</scm>
<properties>
<!-- HTTP port to use when running mvn launchpad:run -->
<run.http.port>8080</run.http.port>
<!-- Timeout when checking for Sling readyness before starting tests -->
<HttpTestBase.readyTimeoutSeconds>62</HttpTestBase.readyTimeoutSeconds>
<!-- path suffix for HTTP access to Sling -->
<http.base.path />
<!-- path suffix for WebDAV access to the repository -->
<webdav.workspace.path />
<!-- hostname for integration tests -->
<test.host>localhost</test.host>
<!--
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>
<slf4j.version>1.5.11</slf4j.version>
<logback.version>0.9.20</logback.version>
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.2</version>
<configuration>
<filesets>
<fileset>
<directory>${basedir}</directory>
<includes>
<include>derby.log</include>
<include>cachedir</include>
<include>sling</include>
<include>jackrabbit</include>
<include>coverage.ec</include>
</includes>
</fileset>
</filesets>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>reserve-network-port</id>
<goals>
<goal>reserve-network-port</goal>
</goals>
<phase>process-resources</phase>
<configuration>
<portNames>
<portName>http.port</portName>
</portNames>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
<manifest>
<addDefaultImplementationEntries>
true
</addDefaultImplementationEntries>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.sling</groupId>
<artifactId>maven-launchpad-plugin</artifactId>
<version>2.0.10</version>
<executions>
<execution>
<id>prepare-package</id>
<goals>
<goal>prepare-package</goal>
</goals>
</execution>
<execution>
<id>default-cli</id>
<configuration>
<httpPort>${run.http.port}</httpPort>
</configuration>
</execution>
</executions>
<configuration>
<defaultBundleList>
<version>${project.version}</version>
</defaultBundleList>
</configuration>
<dependencies>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.launchpad.base</artifactId>
<version>2.3.0</version>
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.launchpad.base</artifactId>
<version>2.3.0</version>
<classifier>app</classifier>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>emma-maven-plugin</artifactId>
<configuration>
<filters>
<filter>-*</filter>
</filters>
</configuration>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<!-- No javadocs -->
<excludePackageNames>
org.apache.sling
</excludePackageNames>
</configuration>
</plugin>
</plugins>
</reporting>
<profiles>
<profile>
<!--
Run the integration tests.
-->
<id>integrationTesting</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>
<!-- needed to make it possible to scan the jar -->
<useManifestOnlyJar>false</useManifestOnlyJar>
<excludes>
<exclude>none</exclude>
</excludes>
<includes>
<include>
**/launchpad/testing/TestAll.java
</include>
</includes>
<systemProperties>
<!--
WARNING: make sure these URLs are consistent with the
maven-launchpad-plugin settings below.
-->
<property>
<name>
launchpad.http.server.url
</name>
<value>
http://${test.host}:${http.port}/
</value>
</property>
<property>
<name>
launchpad.webdav.server.url
</name>
<value>
http://${test.host}:${http.port}/${webdav.workspace.path}
</value>
</property>
<property>
<name>HttpTestBase.readyTimeoutSeconds</name>
<value>
${HttpTestBase.readyTimeoutSeconds}
</value>
</property>
</systemProperties>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.sling</groupId>
<artifactId>maven-launchpad-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>
<httpPort>${http.port}</httpPort>
<controlHost>${test.host}</controlHost>
</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.
-->
<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>
<exclude>
**/launchpad/testing/TestAll.java
</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>pax-web</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.sling</groupId>
<artifactId>maven-launchpad-plugin</artifactId>
<configuration>
<jarWebSupport>
<groupId>org.ops4j.pax.web</groupId>
<artifactId>pax-web-service</artifactId>
<version>0.6.0</version>
</jarWebSupport>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>exclude-initial-content</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.sling</groupId>
<artifactId>maven-launchpad-plugin</artifactId>
<configuration>
<bundleExclusions>
<bundle>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.launchpad.content</artifactId>
</bundle>
</bundleExclusions>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>test-reactor-sling-bundles</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.sling</groupId>
<artifactId>maven-launchpad-plugin</artifactId>
<configuration>
<rewriteRuleFiles>
<rewriteRuleFile>
${basedir}/src/test/rules/reactor.drl
</rewriteRuleFile>
</rewriteRuleFiles>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>emma</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.sling</groupId>
<artifactId>maven-launchpad-plugin</artifactId>
<configuration>
<rewriteRuleFiles combine.children="append">
<rewriteRuleFile>
${basedir}/src/test/rules/emma.drl
</rewriteRuleFile>
</rewriteRuleFiles>
</configuration>
<dependencies>
<dependency>
<groupId>emma</groupId>
<artifactId>emma</artifactId>
<version>2.0.5312</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>emma-report</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>emma-report</id>
<phase>validate</phase>
<goals>
<goal>java</goal>
</goals>
<configuration>
<mainClass>emma</mainClass>
<arguments>
<argument>report</argument>
<argument>-r</argument>
<argument>html</argument>
<argument>-in</argument>
<argument>${user.dir}/coverage.em,${user.dir}/coverage.ec</argument>
<argument>-sp</argument>
<argument>${sourceDirs}</argument>
</arguments>
<includePluginDependencies>true</includePluginDependencies>
<includeProjectDependencies>false</includeProjectDependencies>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>emma</groupId>
<artifactId>emma</artifactId>
<version>2.0.5312</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<dependencies>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.launchpad.integration-tests</artifactId>
<version>1.0.0</version>
<scope>test</scope>
</dependency>
<!-- The basic Sling WebApp -->
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.launchpad.base</artifactId>
<version>2.3.0</version>
<classifier>app</classifier>
</dependency>
<!-- JCR Install - needs to be in a profile -->
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>biz.aQute</groupId>
<artifactId>bnd</artifactId>
<version>0.0.169</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.jcr</groupId>
<artifactId>jcr</artifactId>
<version>2.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>jackrabbit-jcr2dav</artifactId>
<version>2.0.0</version>
<scope>test</scope>
</dependency>
<!-- Dependencies for the Test Build and Run -->
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.commons.testing</artifactId>
<version>2.0.8</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
</exclusion>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.servlets.post</artifactId>
<version>2.1.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>${slf4j.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>log4j-over-slf4j</artifactId>
<version>${slf4j.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>