| <?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> |
| <groupId>org.apache.sling.samples</groupId> |
| <artifactId>inplace-integration-test</artifactId> |
| <version>0.0.1-SNAPSHOT</version> |
| <packaging>bundle</packaging> |
| <name>Sample In-Place Integration Test</name> |
| <description>Sling Integration Test Demo Project</description> |
| <properties> |
| <jetty.scan.interval.seconds>0</jetty.scan.interval.seconds> |
| <jetty.sling.home>target/sling</jetty.sling.home> |
| <test.host>localhost</test.host> |
| <integration.test.wait>false</integration.test.wait> |
| <http.base.path /> |
| <webdav.workspace.path /> |
| <test.webapp.classifier>testwebapp</test.webapp.classifier> |
| <test.webapp.war>${project.build.directory}/${project.build.finalName}-${test.webapp.classifier}.war</test.webapp.war> |
| </properties> |
| <scm> |
| <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/samples/inplace-integration-test</connection> |
| <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/samples/inplace-integration-test</developerConnection> |
| <url>http://svn.apache.org/viewvc/sling/trunk/samples/inplace-integration-test</url> |
| </scm> |
| <build> |
| <plugins> |
| <plugin> |
| <groupId>org.codehaus.mojo</groupId> |
| <artifactId>build-helper-maven-plugin</artifactId> |
| <version>1.5</version> |
| <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.felix</groupId> |
| <artifactId>maven-bundle-plugin</artifactId> |
| <version>2.0.1</version> |
| <extensions>true</extensions> |
| </plugin> |
| <plugin> |
| <groupId>org.apache.felix</groupId> |
| <artifactId>maven-scr-plugin</artifactId> |
| <version>1.4.0</version> |
| <executions> |
| <execution> |
| <id>generate-scr-descriptor</id> |
| <goals> |
| <goal>scr</goal> |
| </goals> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <groupId>org.apache.sling</groupId> |
| <artifactId>maven-launchpad-plugin</artifactId> |
| <version>2.0.7-SNAPSHOT</version> |
| <executions> |
| <execution> |
| <id>prepare-test-webapp</id> |
| <goals> |
| <goal>prepare-test-webapp</goal> |
| </goals> |
| <configuration> |
| <defaultBundleList> |
| <version>6-SNAPSHOT</version> |
| </defaultBundleList> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <artifactId>maven-war-plugin</artifactId> |
| <executions> |
| <execution> |
| <id>create-test-war</id> |
| <phase>package</phase> |
| <goals> |
| <goal>war</goal> |
| </goals> |
| <configuration> |
| <classifier>${test.webapp.classifier}</classifier> |
| <failOnMissingWebXml>false</failOnMissingWebXml> |
| <primaryArtifact>false</primaryArtifact> |
| <overlays> |
| <overlay> |
| <groupId>org.apache.sling</groupId> |
| <artifactId>org.apache.sling.launchpad.base</artifactId> |
| <classifier>webapp</classifier> |
| <type>war</type> |
| </overlay> |
| </overlays> |
| <webResources> |
| <resource> |
| <directory>${project.build.directory}/launchpad-bundles</directory> |
| <targetPath>WEB-INF</targetPath> |
| </resource> |
| </webResources> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| |
| <!-- |
| This isn't necessary to run integration tests, but it is helpful to be able to run $ mvn jetty:run |
| --> |
| <plugin> |
| <groupId>org.mortbay.jetty</groupId> |
| <artifactId>maven-jetty-plugin</artifactId> |
| <version>6.1.22</version> |
| <configuration> |
| <contextPath>/</contextPath> |
| <scanIntervalSeconds> |
| ${jetty.scan.interval.seconds} |
| </scanIntervalSeconds> |
| |
| <connectors> |
| <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector"> |
| <port>${http.port}</port> |
| <maxIdleTime>60000</maxIdleTime> |
| </connector> |
| </connectors> |
| |
| <webApp>${test.webapp.war}</webApp> |
| |
| <webAppConfig> |
| <initParams> |
| <sling.home>${jetty.sling.home}</sling.home> |
| </initParams> |
| </webAppConfig> |
| |
| </configuration> |
| </plugin> |
| <plugin> |
| <artifactId>maven-compiler-plugin</artifactId> |
| <configuration> |
| <source>1.5</source> |
| <target>1.5</target> |
| </configuration> |
| </plugin> |
| |
| </plugins> |
| </build> |
| <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-failsafe-plugin</artifactId> |
| <version>2.5</version> |
| <executions> |
| <execution> |
| <id>integration-test</id> |
| <goals> |
| <goal>integration-test</goal> |
| </goals> |
| </execution> |
| <execution> |
| <id>verify</id> |
| <goals> |
| <goal>verify</goal> |
| </goals> |
| </execution> |
| </executions> |
| <configuration> |
| <systemProperties> |
| <property> |
| <name>launchpad.http.server.url</name> |
| <value>http://${test.host}:${http.port}/${project.build.finalName}-${test.webapp.classifier}</value> |
| </property> |
| <property> |
| <name>launchpad.webdav.server.url</name> |
| <value>http://${test.host}:${http.port}/${project.build.finalName}-${test.webapp.classifier}/${webdav.workspace.path}</value> |
| </property> |
| </systemProperties> |
| </configuration> |
| </plugin> |
| <plugin> |
| <groupId>org.codehaus.cargo</groupId> |
| <artifactId>cargo-maven2-plugin</artifactId> |
| <version>1.0</version> |
| <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> |
| <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> |
| <deployables> |
| <deployable> |
| <location>${test.webapp.war}</location> |
| <type>war</type> |
| </deployable> |
| </deployables> |
| </configuration> |
| |
| </configuration> |
| </plugin> |
| </plugins> |
| </build> |
| </profile> |
| </profiles> |
| <dependencies> |
| <!-- These dependencies cover our sample servlet. --> |
| <dependency> |
| <groupId>org.apache.sling</groupId> |
| <artifactId>org.apache.sling.api</artifactId> |
| <version>2.0.8</version> |
| <scope>provided</scope> |
| </dependency> |
| <dependency> |
| <groupId>javax.servlet</groupId> |
| <artifactId>servlet-api</artifactId> |
| <version>2.5</version> |
| <scope>provided</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.felix</groupId> |
| <artifactId>org.apache.felix.scr.annotations</artifactId> |
| <version>1.0.0</version> |
| <scope>provided</scope> |
| </dependency> |
| |
| |
| <!-- These dependencies cover our sample servlet. --> |
| <dependency> |
| <groupId>org.apache.sling</groupId> |
| <artifactId>org.apache.sling.commons.testing</artifactId> |
| <version>2.0.7-SNAPSHOT</version> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>commons-logging</groupId> |
| <artifactId>commons-logging</artifactId> |
| <version>1.1.1</version> |
| <scope>test</scope> |
| </dependency> |
| |
| <!-- We need the base webapp for integration tests --> |
| <dependency> |
| <groupId>org.apache.sling</groupId> |
| <artifactId>org.apache.sling.launchpad.base</artifactId> |
| <version>2.2.0</version> |
| <classifier>webapp</classifier> |
| <type>war</type> |
| <scope>test</scope> |
| </dependency> |
| </dependencies> |
| </project> |