blob: 76581b9524b3d1f8b1f64be81ada013e0b5aba21 [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>
<artifactId>org.apache.sling.cms</artifactId>
<groupId>org.apache.sling</groupId>
<version>1.1.0</version>
</parent>
<artifactId>org.apache.sling.cms.it</artifactId>
<name>Apache Sling - CMS Integration Tests</name>
<properties>
<bnd.baseline.skip>true</bnd.baseline.skip>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>ianal-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>verify-legal-files</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
<filesets>
<fileset>
<directory>${basedir}</directory>
<includes>
<include>sling/**</include>
<include>coverage.ec</include>
<include>launcher/**</include>
</includes>
</fileset>
</filesets>
</configuration>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<!-- Extend RAT configuration from parent pom -->
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
<configuration>
<excludes combine.children="append">
<!-- Exclude sling instance -->
<exclude>sling/**</exclude>
<exclude>launcher/**</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<profiles>
<profile>
<id>ci</id>
<build>
<plugins>
<!-- reserve a network port for the integration tests -->
<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>pre-integration-test</phase>
<configuration>
<portNames>
<portName>http.port</portName>
</portNames>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.sling</groupId>
<artifactId>feature-launcher-maven-plugin</artifactId>
<version>0.1.0</version>
<configuration>
<launches>
<launch>
<id>sling-cms</id>
<feature>
<groupId>${project.groupId}</groupId>
<artifactId>org.apache.sling.cms.feature</artifactId>
<version>${project.version}</version>
<classifier>slingcms-standalone</classifier>
<type>slingosgifeature</type>
</feature>
<launcherArguments>
<frameworkProperties>
<org.osgi.service.http.port>${http.port}</org.osgi.service.http.port>
</frameworkProperties>
</launcherArguments>
<startTimeoutSeconds>180</startTimeoutSeconds>
</launch>
</launches>
</configuration>
<executions>
<execution>
<goals>
<goal>start</goal>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
<configuration>
<systemPropertyVariables>
<sling.http.port>${http.port}</sling.http.port>
<IT.expected.bundles.count>${IT.expected.bundles.count}</IT.expected.bundles.count>
</systemPropertyVariables>
</configuration>
</plugin>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.7.6</version>
<executions>
<execution>
<id>install node and npm</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
<configuration>
<nodeVersion>v14.2.0</nodeVersion>
<npmVersion>6.14.5</npmVersion>
</configuration>
</execution>
<execution>
<id>npm install</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>install</arguments>
</configuration>
</execution>
<execution>
<id>wait for sling</id>
<goals>
<goal>npm</goal>
</goals>
<phase>integration-test</phase>
<configuration>
<arguments>run wait-for-ready</arguments>
<environmentVariables>
<CYPRESS_BASE_URL>http://localhost:${http.port}</CYPRESS_BASE_URL>
</environmentVariables>
</configuration>
</execution>
<execution>
<id>run cypress</id>
<goals>
<goal>npm</goal>
</goals>
<phase>integration-test</phase>
<configuration>
<arguments>run test</arguments>
<environmentVariables>
<CYPRESS_BASE_URL>http://localhost:${http.port}</CYPRESS_BASE_URL>
</environmentVariables>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>