<?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-primefaces-embedded</artifactId>
	<packaging>war</packaging>

	<name>OPS4J Pax Web JSF Samples - embedded Primefaces</name>

	<description>This WAR contains MyFaces libs and their dependencies in WEB-INF/lib</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>
							javax.el,
							javax.websocket.*,
							javax.servlet.jsp.jstl.*;version="1.2",
							javax.servlet.jsp.*;version="2.3",
							javax.servlet.*;version="[3.1,5)",
							javax.naming,

							<!-- for InstanceManager needed by MyFaces' Tomcat7AnnotationInjectionProvider -->
							org.apache.tomcat,

							<!-- These are required by embedded MyFaces to generate tokens for viewstate -->
							javax.crypto,
							javax.crypto.spec,

							<!-- This is required at runtime -->
							javax.xml.bind,

							<!-- These are required by embedded MyFaces to parse various descriptors -->
							javax.xml.parsers,
							javax.xml.transform,
							javax.xml.xpath,
							org.xml.sax,
							org.xml.sax.ext,
							org.xml.sax.helpers,
							org.w3c.dom,

							<!-- These will come from pax-logging-api -->
							org.apache.commons.logging,
							org.slf4j
						</Import-Package>
						<Private-Package>
							org.ops4j.pax.web.samples.primefaces
						</Private-Package>
						<_wab>${project.build.directory}/${project.build.finalName}</_wab>
						<Web-ContextPath>/war-primefaces-embedded</Web-ContextPath>
						<Export-Package />
						<Embed-Directory>WEB-INF/lib</Embed-Directory>
						<Embed-Dependency>*;scope=compile;artifactId=!commons-logging</Embed-Dependency>
						<Embed-Transitive>false</Embed-Transitive>
					</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>
		</dependency>
		<dependency>
			<groupId>org.apache.myfaces.core</groupId>
			<artifactId>myfaces-impl</artifactId>
		</dependency>

		<dependency>
			<groupId>org.primefaces</groupId>
			<artifactId>primefaces</artifactId>
		</dependency>

		<dependency>
			<groupId>commons-beanutils</groupId>
			<artifactId>commons-beanutils</artifactId>
		</dependency>
		<dependency>
			<groupId>commons-collections</groupId>
			<artifactId>commons-collections</artifactId>
		</dependency>
		<dependency>
			<groupId>commons-digester</groupId>
			<artifactId>commons-digester</artifactId>
		</dependency>

	</dependencies>

</project>
