<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright 2021 OPS4J.

    Licensed 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.ops4j.pax.web</groupId>
		<artifactId>pax-web-itest</artifactId>
		<version>8.0.2</version>
		<relativePath>../pom.xml</relativePath>
	</parent>

	<groupId>org.ops4j.pax.web.itest</groupId>
	<artifactId>pax-web-itest-container</artifactId>
	<packaging>pom</packaging>

	<name>OPS4J Pax Web - Container Tests</name>

	<description>Container integration tests for Pax Web</description>

	<modules>
		<module>pax-web-itest-container-common</module>
	</modules>

	<build>
		<testResources>
			<testResource>
				<directory>src/test/resources</directory>
				<filtering>true</filtering>
			</testResource>
			<testResource>
				<directory>src/test/resources-binary</directory>
				<filtering>false</filtering>
			</testResource>
		</testResources>

		<plugins>

			<!-- Core plugins -->

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-failsafe-plugin</artifactId>
				<configuration>
					<includes>
						<include>**/*IntegrationTest.java</include>
					</includes>
					<systemPropertyVariables>
						<!--
							to configure pax-exam with pax.exam.system=default which gives us more control over installed bundles
							see: org.ops4j.pax.exam.ConfigurationManager.ConfigurationManager()
						-->
						<pax.exam.configuration>file:../../etc/controlled-exam.properties</pax.exam.configuration>

						<commons-beanutils.version>${dependency.commons-beanutils}</commons-beanutils.version>
						<commons-collections.version>${dependency.commons-collections3}</commons-collections.version>
						<commons-digester.version>${dependency.commons-digester}</commons-digester.version>
						<commons-fileupload.version>${dependency.commons-fileupload}</commons-fileupload.version>
						<commons-io.version>${dependency.commons-io}</commons-io.version>
						<felix-webconsole.version>${dependency.org.apache.felix.webconsole}</felix-webconsole.version>
						<jakarta-el-api.version>${dependency.jakarta.el-api}</jakarta-el-api.version>
						<jakarta-enterprise-cdi-api.version>${dependency.jakarta.enterprise.cdi-api}</jakarta-enterprise-cdi-api.version>
						<jakarta-interceptor-api.version>${dependency.jakarta.interceptor-api}</jakarta-interceptor-api.version>
						<jakarta-websocket-api.version>${dependency.jakarta.websocket-api}</jakarta-websocket-api.version>
						<jakarta-xml-bind-api.version>${dependency.jakarta.xml.bind-api}</jakarta-xml-bind-api.version>
						<activation.version>${dependency.com.sun.activation}</activation.version>
						<karaf.version>${dependency.org.apache.karaf}</karaf.version>
						<myfaces.version>${dependency.org.apache.myfaces}</myfaces.version>
						<pax-web.version>${project.version}</pax-web.version>
					</systemPropertyVariables>
					<redirectTestOutputToFile>true</redirectTestOutputToFile>
					<runOrder>alphabetical</runOrder>
					<!--
						be careful to not load pax-logging-log4j1 and pax-logging-api through system class loader.
						failsafe has to isolate running OSGi framework from these jars - they have to be installed
						only as bundles
					-->
					<classpathDependencyScopeExclude>runtime</classpathDependencyScopeExclude>
					<forkCount>1</forkCount>
					<reuseForks>false</reuseForks>
					<trimStackTrace>false</trimStackTrace>
				</configuration>
				<executions>
					<execution>
						<id>integration-test</id>
						<goals>
							<goal>integration-test</goal>
						</goals>
					</execution>
					<execution>
						<id>verify</id>
						<goals>
							<goal>verify</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<configuration>
					<skip>true</skip>
				</configuration>
			</plugin>

			<!-- ServiceMix plugins -->

			<plugin>
				<groupId>org.apache.servicemix.tooling</groupId>
				<artifactId>depends-maven-plugin</artifactId>
				<executions>
					<execution>
						<id>generate-depends-file</id>
						<goals>
							<goal>generate-depends-file</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

		</plugins>
	</build>

	<profiles>
		<profile>
			<id>jetty</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<modules>
				<module>pax-web-itest-jetty</module>
			</modules>
		</profile>
		<profile>
			<id>tomcat</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<modules>
				<module>pax-web-itest-tomcat</module>
			</modules>
		</profile>
		<profile>
			<id>undertow</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<modules>
				<module>pax-web-itest-undertow</module>
			</modules>
		</profile>
	</profiles>

</project>
