<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">

	<modelVersion>4.0.0</modelVersion>

	<parent>
		<groupId>org.ops4j.pax.web</groupId>
		<artifactId>pax-web-itest</artifactId>
		<version>11.1.2</version>
		<relativePath>../pom.xml</relativePath>
	</parent>

	<groupId>org.ops4j.pax.web.itest</groupId>
	<artifactId>pax-web-itest-common</artifactId>
	<packaging>bundle</packaging>

	<name>OPS4J Pax Web - Integration Tests - Common</name>

	<description>Abstract Pax Exam base class for many integration tests</description>

	<build>
		<resources>
			<resource>
				<directory>src/main/resources</directory>
				<filtering>true</filtering>
			</resource>
		</resources>

		<plugins>

			<!-- Felix plugins -->

			<plugin>
				<groupId>org.apache.felix</groupId>
				<artifactId>maven-bundle-plugin</artifactId>
				<extensions>true</extensions>
				<configuration>
					<instructions>
						<Import-Package>
							<!-- Servlet API 6.0+ (JakartaEE 10+) -->
							jakarta.servlet;version="[6,7)",
							jakarta.servlet.annotation;version="[6,7)",
							jakarta.servlet.http;version="[6,7)",

							jakarta.websocket;version="[2.1,3)";resolution:=optional,
							jakarta.websocket.server;version="[2.1,3)";resolution:=optional,

							<!-- OSGi Core R8+ -->
							org.osgi.framework;version="[1.10,2)",
							org.osgi.framework.wiring;version="[1.2,2)",
							org.osgi.util.tracker;version="[1.5,2)",

							<!-- OSGi cmpn -->
							org.osgi.service.cm;resolution:=optional,
							org.osgi.service.servlet.context;version="[2,3)",
							org.osgi.service.servlet.runtime.dto;version="[2,3)",
							org.osgi.service.servlet.runtime;version="[2,3)",

							<!-- from pax-web-api -->
							org.ops4j.pax.web.service;version="${pax-web.osgi.version}",
							org.ops4j.pax.web.service.http;version="${pax-web.osgi.version}",

							<!-- from pax-web-spi -->
							org.ops4j.pax.web.service.spi.model.events;version="${pax-web.osgi.version}",
							org.ops4j.pax.web.service.spi.servlet;version="${pax-web.osgi.version}",

							<!-- from pax-web-itest-utils -->
							org.ops4j.pax.web.itest.utils,
							org.ops4j.pax.web.itest.utils.assertion,
							org.ops4j.pax.web.itest.utils.client,
							org.ops4j.pax.web.itest.utils.web,

							<!-- from pax-logging-api -->
							org.slf4j;version="[1.7,3)",
							org.ops4j.pax.logging;version="[2.0,3)",

							<!-- test dependencies -->
							javax.inject
						</Import-Package>
						<DynamicImport-Package>
							org.junit,
							org.junit.*,
							org.ops4j.pax.exam,
							org.ops4j.pax.exam.*
						</DynamicImport-Package>
						<Export-Package>
							org.ops4j.pax.web.itest
						</Export-Package>
						<_contract>!*</_contract>
					</instructions>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<dependencies>

		<!-- All dependencies have scope=compile, which will become scope=test in Jetty/Tomcat/Undertow test projects -->

		<dependency>
			<groupId>org.ops4j.pax.web</groupId>
			<artifactId>pax-web-api</artifactId>
		</dependency>
		<dependency>
			<groupId>org.ops4j.pax.web</groupId>
			<artifactId>pax-web-spi</artifactId>
		</dependency>
		<dependency>
			<groupId>org.ops4j.pax.web.itest</groupId>
			<artifactId>pax-web-itest-utils</artifactId>
		</dependency>

		<!-- OPS4J dependencies -->

		<dependency>
			<groupId>org.ops4j.pax.logging</groupId>
			<artifactId>pax-logging-log4j2</artifactId>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.ops4j.pax.exam</groupId>
			<artifactId>pax-exam</artifactId>
		</dependency>
		<dependency>
			<groupId>org.ops4j.pax.exam</groupId>
			<artifactId>pax-exam-junit4</artifactId>
		</dependency>
		<dependency>
			<groupId>jakarta.servlet</groupId>
			<artifactId>jakarta.servlet-api</artifactId>
		</dependency>

		<!-- OSGi -->

		<dependency>
			<groupId>org.osgi</groupId>
			<artifactId>osgi.core</artifactId>
		</dependency>

		<!-- ServiceMIX -->

		<dependency>
			<groupId>org.apache.servicemix.bundles</groupId>
			<artifactId>org.apache.servicemix.bundles.javax-inject</artifactId>
		</dependency>

	</dependencies>
</project>
