<?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.samples</groupId>
		<artifactId>samples-jsf</artifactId>
		<version>8.0.36</version>
		<relativePath>../pom.xml</relativePath>
	</parent>

	<groupId>org.ops4j.pax.web.samples</groupId>
	<artifactId>war-jsf23-wired</artifactId>
	<packaging>war</packaging>

	<name>OPS4J Pax Web JSF Samples - wired JSF</name>

	<description>This WAR depends on MyFaces and their dependencies through Import-Package</description>

	<build>
		<resources>
			<resource>
				<directory>src/main/resources</directory>
				<filtering>true</filtering>
			</resource>
		</resources>
		<plugins>
			<plugin>
				<groupId>org.apache.felix</groupId>
				<artifactId>maven-bundle-plugin</artifactId>
				<extensions>true</extensions>
				<configuration>
					<supportedProjectTypes>
						<supportedProjectType>jar</supportedProjectType>
						<supportedProjectType>war</supportedProjectType>
						<supportedProjectType>bundle</supportedProjectType>
					</supportedProjectTypes>
					<instructions>
						<Import-Package>
							<!-- This is one of the required "wires" - to ensure that this WAB is "wired" to MyFaces -->
							javax.faces.webapp
						</Import-Package>
						<Require-Bundle>
							<!--
								However, after turning off recursive detection of "WAB class space", we need to
								wire to myfaces-impl too (so proper SCI is registered)
								See: https://github.com/ops4j/org.ops4j.pax.web/issues/1852
							-->
							org.apache.myfaces.core.impl
						</Require-Bundle>
						<Private-Package>
							org.ops4j.pax.web.samples.warjsf23
						</Private-Package>
						<_wab>${project.build.directory}/${project.build.finalName}</_wab>
						<Web-ContextPath>/war-jsf23-wired</Web-ContextPath>
						<Export-Package />
					</instructions>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<dependencies>

		<!-- OSGi -->

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

		<!-- JavaEE -->

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

		<!-- Other -->

		<dependency>
			<groupId>org.apache.myfaces.core</groupId>
			<artifactId>myfaces-api</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.myfaces.core</groupId>
			<artifactId>myfaces-impl</artifactId>
			<scope>provided</scope>
		</dependency>

	</dependencies>

</project>
