<?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</groupId>
		<artifactId>web</artifactId>
		<version>11.0.1</version>
		<relativePath>../pom.xml</relativePath>
	</parent>

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

	<name>OPS4J Pax Web - Undertow</name>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.felix</groupId>
				<artifactId>maven-bundle-plugin</artifactId>
				<extensions>true</extensions>
				<configuration>
					<instructions>
						<Bundle-Activator>org.ops4j.pax.web.service.undertow.internal.Activator</Bundle-Activator>
						<Import-Package>
							<!-- Servlet API 6.0+ (JakartaEE 10+) -->
							jakarta.servlet;version="[6,7)",
							jakarta.servlet.annotation;version="[6,7)",
							jakarta.servlet.descriptor;version="[6,7)",
							jakarta.servlet.http;version="[6,7)",

							jakarta.annotation;version="[3.0,4.0)";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.servlet.whiteboard;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}",
							org.ops4j.pax.web.utils;version="${pax-web.osgi.version}",
							<!-- from pax-web-spi -->
							org.ops4j.pax.web.service.spi.*;version="${pax-web.osgi.version}",

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

							<!-- undertow and xnio packages -->
							org.xnio;version="[3.8,4)",
							org.xnio.channels;version="[3.8,4)",
							io.undertow;version="[2.3,3)",
							io.undertow.attribute;version="[2.3,3)",
							io.undertow.connector;version="[2.3,3)",
							io.undertow.io;version="[2.3,3)",
							io.undertow.predicate;version="[2.3,3)",
							io.undertow.protocols.ssl;version="[2.3,3)",
							io.undertow.security.api;version="[2.3,3)",
							io.undertow.security.idm;version="[2.3,3)",
							io.undertow.security.impl;version="[2.3,3)",
							io.undertow.server;version="[2.3,3)",
							io.undertow.server.handlers;version="[2.3,3)",
							io.undertow.server.handlers.accesslog;version="[2.3,3)",
							io.undertow.server.handlers.builder;version="[2.3,3)",
							io.undertow.server.handlers.cache;version="[2.3,3)",
							io.undertow.server.handlers.encoding;version="[2.3,3)",
							io.undertow.server.handlers.resource;version="[2.3,3)",
							io.undertow.server.protocol.http;version="[2.3,3)",
							io.undertow.server.protocol.http2;version="[2.3,3)",
							io.undertow.server.protocol.proxy;version="[2.3,3)",
							io.undertow.server.session;version="[2.3,3)",
							io.undertow.servlet;version="[2.3,3)",
							io.undertow.servlet.api;version="[2.3,3)",
							io.undertow.servlet.core;version="[2.3,3)",
							io.undertow.servlet.handlers;version="[2.3,3)",
							io.undertow.servlet.spec;version="[2.3,3)",
							io.undertow.servlet.util;version="[2.3,3)",
							io.undertow.util;version="[2.3,3)",

							<!-- other -->
							javax.management,
							javax.net.ssl,
							javax.security.auth,
							javax.security.auth.callback,
							javax.security.auth.login,
							javax.security.auth.x500,
							javax.xml.namespace,
							javax.xml.parsers,
							javax.xml.stream,
							org.xml.sax,
							org.xml.sax.helpers,
							sun.misc;resolution:=optional
						</Import-Package>
						<Provide-Capability>
							osgi.service;effective:=active;objectClass:List&lt;String&gt;="org.ops4j.pax.web.service.spi.ServerControllerFactory"
						</Provide-Capability>
						<Export-Package>
							org.ops4j.pax.web.service.undertow,
							org.ops4j.pax.web.service.undertow.configuration.model,

							<!-- these packages are required for Undertow 2.2.x and XNIO 3.8.x -->
							org.jboss.threads,
							org.jboss.threads.management,
							org.wildfly.client.config,
							org.wildfly.client.config._private,
							org.wildfly.common,
							org.wildfly.common._private,
							org.wildfly.common.context,
							org.wildfly.common.cpu,
							org.wildfly.common.expression,
							org.wildfly.common.function,
							org.wildfly.common.lock,
							org.wildfly.common.math,
							org.wildfly.common.net,
							org.wildfly.common.ref
						</Export-Package>
						<Private-Package>
							org.ops4j.pax.web.service.undertow.internal.*,
						</Private-Package>
					</instructions>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<dependencies>

		<!-- pax-web own artifacts -->

		<dependency>
			<groupId>org.ops4j.pax.web</groupId>
			<artifactId>pax-web-api</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.ops4j.pax.web</groupId>
			<artifactId>pax-web-spi</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.ops4j.pax.web</groupId>
			<artifactId>pax-web-runtime</artifactId>
			<scope>provided</scope>
		</dependency>

		<!-- OSGi -->

		<dependency>
			<groupId>org.osgi</groupId>
			<artifactId>osgi.core</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.osgi</groupId>
			<artifactId>org.osgi.service.servlet</artifactId>
			<scope>provided</scope>
		</dependency>

		<!-- JakartaEE -->

		<dependency>
			<groupId>jakarta.annotation</groupId>
			<artifactId>jakarta.annotation-api</artifactId>
		</dependency>
		<dependency>
			<groupId>jakarta.servlet</groupId>
			<artifactId>jakarta.servlet-api</artifactId>
			<scope>provided</scope>
		</dependency>

		<!-- Undertow -->

		<dependency>
			<groupId>io.undertow</groupId>
			<artifactId>undertow-core</artifactId>
		</dependency>
		<dependency>
			<groupId>io.undertow</groupId>
			<artifactId>undertow-servlet</artifactId>
		</dependency>

		<dependency>
			<groupId>org.jboss.xnio</groupId>
			<artifactId>xnio-api</artifactId>
		</dependency>
		<dependency>
			<groupId>org.jboss.xnio</groupId>
			<artifactId>xnio-nio</artifactId>
		</dependency>

		<dependency>
			<groupId>org.jboss.threads</groupId>
			<artifactId>jboss-threads</artifactId>
		</dependency>

		<dependency>
			<groupId>org.wildfly.common</groupId>
			<artifactId>wildfly-common</artifactId>
		</dependency>
		<dependency>
			<groupId>org.wildfly.client</groupId>
			<artifactId>wildfly-client-config</artifactId>
		</dependency>

		<!-- Logging -->

		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>jul-to-slf4j</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-slf4j2-impl</artifactId>
			<scope>test</scope>
		</dependency>

		<!-- Other -->

		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.apache.httpcomponents.client5</groupId>
			<artifactId>httpclient5</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.httpcomponents.core5</groupId>
			<artifactId>httpcore5</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.httpcomponents.core5</groupId>
			<artifactId>httpcore5-h2</artifactId>
			<scope>test</scope>
		</dependency>

		<!-- Testing -->

		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-api</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-engine</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.assertj</groupId>
			<artifactId>assertj-core</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-core</artifactId>
			<scope>test</scope>
		</dependency>

	</dependencies>

</project>
