<?xml version="1.0" encoding="UTF-8"?>
<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">

	<parent>
		<groupId>com.liferay.faces.test</groupId>
		<artifactId>com.liferay.faces.test.bridge.tck.parent</artifactId>
		<version>5.0.0</version>
		<relativePath>../pom.xml</relativePath>
	</parent>

	<modelVersion>4.0.0</modelVersion>
	<artifactId>com.liferay.faces.test.bridge.tck.main.portlet</artifactId>
	<name>Bridge TCK Main Portlet</name>
	<packaging>war</packaging>

	<dependencies>
		<dependency>
			<groupId>com.bekk.boss</groupId>
			<artifactId>maven-jetty-pluto-embedded</artifactId>
			<version>1.0.1</version>
			<scope>provided</scope>
			<exclusions>
				<exclusion>
					<groupId>javax.portlet</groupId>
					<artifactId>portlet-api</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>${project.groupId}</groupId>
			<artifactId>com.liferay.faces.test.bridge.tck.common</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>${project.groupId}</groupId>
			<artifactId>com.liferay.faces.test.bridge.tck.factories</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>${project.groupId}</groupId>
			<artifactId>com.liferay.faces.test.bridge.tck.encode.url.tests</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>${project.groupId}</groupId>
			<artifactId>com.liferay.faces.test.bridge.tck.compat</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>com.liferay.faces</groupId>
			<artifactId>com.liferay.faces.bridge.impl</artifactId>
		</dependency>
		<dependency>
			<groupId>org.glassfish.web</groupId>
			<artifactId>jstl-impl</artifactId>
		</dependency>
		<dependency>
			<groupId>javax.el</groupId>
			<artifactId>javax.el-api</artifactId>
		</dependency>
		<dependency>
			<groupId>${faces.api.group.id}</groupId>
			<artifactId>${faces.api.artifact.id}</artifactId>
		</dependency>
		<dependency>
			<groupId>${faces.impl.group.id}</groupId>
			<artifactId>${faces.impl.artifact.id}</artifactId>
		</dependency>
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>javax.servlet-api</artifactId>
		</dependency>
		<dependency>
			<groupId>javax.servlet.jsp</groupId>
			<artifactId>javax.servlet.jsp-api</artifactId>
		</dependency>
		<dependency>
			<groupId>javax.portlet</groupId>
			<artifactId>portlet-api</artifactId>
		</dependency>
		<dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
		</dependency>
		<dependency>
			<groupId>org.osgi</groupId>
			<artifactId>org.osgi.core</artifactId>
		</dependency>
	</dependencies>

	<properties>
		<integration.trim.stack.trace>true</integration.trim.stack.trace>
		<portlet.container>liferay</portlet.container>
		<integration.container>${portlet.container}</integration.container>
		<portal.version.major>${liferay.version.major}</portal.version.major>
		<tck.test.case.class>LiferayTckTestCase</tck.test.case.class>
		<webapp.descriptor>web-${portlet.container}${portal.version.major}-${app.server.type}.xml</webapp.descriptor>
	</properties>

	<profiles>
		<!-- containers -->
		<profile>
			<id>liferay</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<properties>
				<integration.container>${portlet.container}</integration.container>
				<portal.version.major>${liferay.version.major}</portal.version.major>
				<portlet.container>liferay</portlet.container>
			</properties>
			<dependencies>
				<dependency>
					<groupId>com.liferay.faces</groupId>
					<artifactId>com.liferay.faces.bridge.ext</artifactId>
					<version>${liferay.faces.bridge.ext.version}</version>
					<scope>${war.dependency.scope}</scope>
				</dependency>
				<dependency>
					<groupId>com.liferay.faces.test</groupId>
					<artifactId>com.liferay.faces.test.bridge.tck.liferay.harness</artifactId>
					<version>${project.version}</version>
					<scope>test</scope>
				</dependency>
			</dependencies>
		</profile>
		<profile>
			<id>liferay62</id>
			<properties>
				<portlet.container>liferay</portlet.container>
				<integration.container>${portlet.container}62</integration.container>
				<portal.version.major>6</portal.version.major>
				<integration.tests.file>/${portlet.container}-tests.xml</integration.tests.file>
			</properties>
			<dependencies>
				<dependency>
					<groupId>com.liferay.faces</groupId>
					<artifactId>com.liferay.faces.bridge.ext</artifactId>
					<version>${liferay.faces.bridge.ext.version}</version>
				</dependency>
			</dependencies>
		</profile>
		<profile>
			<id>pluto</id>
			<properties>
				<portlet.container>pluto</portlet.container>
				<integration.container>${portlet.container}</integration.container>
				<portal.version.major>3</portal.version.major>
				<tck.test.case.class>TckTestCase</tck.test.case.class>
			</properties>
		</profile>
		<profile>
			<id>pluto2</id>
			<properties>
				<portlet.container>pluto</portlet.container>
				<integration.container>${portlet.container}2</integration.container>
				<portal.version.major>2</portal.version.major>
				<tck.test.case.class>TckTestCase</tck.test.case.class>
			</properties>
		</profile>
		<profile>
			<id>thin</id>
			<properties>
				<!-- The following Import-Package directive ensures that the bridge.tck.main.portlet module will -->
				<!-- deploy correctly on Liferay, since the PlutoPortalDriverFilter is only required with Pluto. -->
				<osgi.import.package>
					Import-Package:\
						org.apache.pluto.driver;resolution:=optional,\
						${osgi.import.package.liferay.faces.bridge}
				</osgi.import.package>
				<!-- Test Page 019: chapter4_2_6Tests-getBridgeClassNameMethodTest-portlet -->
				<osgi.require.capability>
					Require-Capability: \
						osgi.serviceloader;filter:="(osgi.serviceloader=javax.portlet.faces.Bridge)";\
						cardinality:=multiple;resolution:=optional,\
						osgi.extender; filter:="(osgi.extender=osgi.serviceloader.processor)";resolution:=optional
				</osgi.require.capability>
			</properties>
		</profile>
		<profile>
			<id>websphere</id>
			<properties>
				<integration.host>192.168.10.110</integration.host>
				<integration.port>9080</integration.port>
			</properties>
		</profile>
		<!-- /containers -->
		<!-- browsers -->
		<profile>
			<id>firefox</id>
			<properties>
				<integration.browser.name>firefox</integration.browser.name>
			</properties>
		</profile>
		<profile>
			<id>htmlunit</id>
			<properties>
				<integration.browser.name>htmlunit</integration.browser.name>
			</properties>
			<dependencies>
				<dependency>
					<groupId>org.seleniumhq.selenium</groupId>
					<artifactId>htmlunit-driver</artifactId>
					<scope>test</scope>
				</dependency>
				<dependency>
					<groupId>xml-apis</groupId>
					<artifactId>xml-apis</artifactId>
					<version>1.4.01</version>
					<scope>test</scope>
				</dependency>
				<dependency>
					<groupId>org.eclipse.jetty.websocket</groupId>
					<artifactId>websocket-client</artifactId>
					<version>9.2.18.v20160721</version>
					<scope>test</scope>
				</dependency>
				<dependency>
					<groupId>org.apache.httpcomponents</groupId>
					<artifactId>httpclient</artifactId>
					<version>4.5.13</version>
					<scope>test</scope>
				</dependency>
			</dependencies>
		</profile>
		<profile>
			<id>jbrowser</id>
			<properties>
				<integration.browser.name>jbrowser</integration.browser.name>
			</properties>
			<dependencies>
				<dependency>
					<groupId>com.machinepublishers</groupId>
					<artifactId>jbrowserdriver</artifactId>
					<scope>test</scope>
				</dependency>
			</dependencies>
		</profile>
		<profile>
			<id>phantomjs</id>
			<properties>
				<integration.browser.name>phantomjs</integration.browser.name>
			</properties>
			<dependencies>
				<dependency>
					<groupId>com.codeborne</groupId>
					<artifactId>phantomjsdriver</artifactId>
					<scope>test</scope>
				</dependency>
			</dependencies>
		</profile>
		<!-- /browsers -->
		<profile>
			<id>selenium</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-failsafe-plugin</artifactId>
						<version>2.19.1</version>
						<executions>
							<execution>
								<id>selenium-tests</id>
								<goals>
									<goal>integration-test</goal>
									<goal>verify</goal>
								</goals>
								<configuration>
									<systemPropertyVariables>
										<RUNNING_WITH_MAVEN>true</RUNNING_WITH_MAVEN>
										<!-- Specify a property like so: -Dintegration.browser.name=phantomjs -->
										<integration.browser.name>${integration.browser.name}</integration.browser.name>
										<integration.browser.headless>${integration.browser.headless}</integration.browser.headless>
										<integration.browser.simulate.mobile>${integration.browser.simulate.mobile}</integration.browser.simulate.mobile>
										<integration.browser.driver.wait.time.out>${integration.browser.driver.wait.time.out}</integration.browser.driver.wait.time.out>
										<integration.context>${integration.context}</integration.context>
										<integration.excluded.tests.file>${integration.excluded.tests.file}</integration.excluded.tests.file>
										<integration.container>${integration.container}</integration.container>
										<integration.host>${integration.host}</integration.host>
										<integration.port>${integration.port}</integration.port>
										<integration.sign.in.context>${integration.sign.in.context}</integration.sign.in.context>
										<integration.login.xpath>${integration.login.xpath}</integration.login.xpath>
										<integration.password.xpath>${integration.password.xpath}</integration.password.xpath>
										<integration.sign.in.button.xpath>${integration.sign.in.button.xpath}</integration.sign.in.button.xpath>
										<integration.tests.file>${integration.tests.file}</integration.tests.file>
										<integration.test.filter>${integration.test.filter}</integration.test.filter>
										<integration.login>${integration.login}</integration.login>
										<integration.password>${integration.password}</integration.password>
										<integration.default.liferay.window.state>${integration.default.liferay.window.state}</integration.default.liferay.window.state>
									</systemPropertyVariables>
									<properties>
										<property>
											<name>listener</name>
											<value>com.liferay.faces.test.selenium.browser.BrowserDriverManagingTestSuiteListener</value>
										</property>
									</properties>
									<includes>
										<include>**/*Test.java,**/Test*.java,**/${tck.test.case.class}.java</include>
									</includes>
									<trimStackTrace>${integration.trim.stack.trace}</trimStackTrace>
									<dependenciesToScan>
										<dependency>${project.groupId}:com.liferay.faces.test.bridge.tck.harness</dependency>
										<dependency>${project.groupId}:com.liferay.faces.test.bridge.tck.liferay.harness</dependency>
									</dependenciesToScan>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
			<dependencies>
				<dependency>
					<groupId>com.liferay.faces</groupId>
					<artifactId>com.liferay.faces.bridge.api</artifactId>
					<scope>test</scope>
				</dependency>
				<dependency>
					<groupId>javax.portlet</groupId>
					<artifactId>portlet-api</artifactId>
					<scope>test</scope>
				</dependency>
				<dependency>
					<groupId>${project.groupId}</groupId>
					<artifactId>com.liferay.faces.test.bridge.tck.harness</artifactId>
					<version>${project.version}</version>
					<scope>test</scope>
				</dependency>
				<dependency>
					<groupId>${project.groupId}</groupId>
					<artifactId>com.liferay.faces.test.bridge.tck.liferay.harness</artifactId>
					<version>${project.version}</version>
					<scope>test</scope>
				</dependency>

				<!-- Integration test dependencies. -->
				<dependency>
					<groupId>com.liferay.faces.test</groupId>
					<artifactId>com.liferay.faces.test.selenium</artifactId>
					<scope>test</scope>
				</dependency>
				<dependency>
					<groupId>org.seleniumhq.selenium</groupId>
					<artifactId>selenium-java</artifactId>
					<scope>test</scope>
				</dependency>
				<dependency>
					<groupId>org.seleniumhq.selenium</groupId>
					<artifactId>selenium-api</artifactId>
					<scope>test</scope>
				</dependency>
				<dependency>
					<groupId>org.seleniumhq.selenium</groupId>
					<artifactId>selenium-remote-driver</artifactId>
					<scope>test</scope>
				</dependency>
				<dependency>
					<groupId>org.seleniumhq.selenium</groupId>
					<artifactId>selenium-support</artifactId>
					<scope>test</scope>
				</dependency>
				<dependency>
					<groupId>org.slf4j</groupId>
					<artifactId>slf4j-log4j12</artifactId>
					<scope>test</scope>
				</dependency>
				<dependency>
					<groupId>log4j</groupId>
					<artifactId>log4j</artifactId>
					<scope>test</scope>
				</dependency>
				<dependency>
					<groupId>junit</groupId>
					<artifactId>junit</artifactId>
					<scope>test</scope>
				</dependency>
				<!-- End integration test dependencies. -->
			</dependencies>
		</profile>
	</profiles>

</project>
