<?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 -->
    <parent>
        <groupId>org.jboss.arquillian.container</groupId>
        <artifactId>arquillian-parent-was</artifactId>
        <version>1.0.0.CR1</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <!-- Model Version -->
    <modelVersion>4.0.0</modelVersion>

    <!-- Artifact Configuration -->
    <artifactId>arquillian-wlp-managed-8.5</artifactId>
    <name>Arquillian Container WebSphere Liberty Profile Managed 8.5</name>
    <description>WebSphere Liberty Profile 8.5 Managed Container integration for the Arquillian Project</description>

    <properties>
        <skipTests>false</skipTests>
    </properties>

    <!-- Build -->
    <build>
        <plugins>
			<plugin>
				<groupId>net.wasdev.wlp.maven.plugins</groupId>
				<artifactId>liberty-maven-plugin</artifactId>
				<version>1.2</version>
				<executions>
					<execution>
						<id>create-server</id>
						<!-- Plugin execution only succeeds here in the correct order because
						     execution id of the test is not 'default-test'.
						     Because Maven. See MNG-5799 and MNG-5987 -->
						<phase>test</phase>
						<goals>
							<goal>create-server</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<skip>${skipTests}</skip>
					<serverName>defaultServer</serverName>
					<assemblyArtifact>
						<groupId>com.ibm.websphere.appserver.runtime</groupId>
						<artifactId>wlp-javaee7</artifactId>
						<version>16.0.0.3</version>
						<type>zip</type>
					</assemblyArtifact>
				</configuration>
			</plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <skip>true</skip>
                    <systemProperties>
                        <property>
                            <name>java.util.logging.config.file</name>
                            <value>${basedir}/src/test/resources/logging.properties</value>
                        </property>
                    </systemProperties>
                    <argLine>-Dproject.build.directory=${project.build.directory}</argLine>
                </configuration>
                <executions>
                    <execution>
                        <id>wlp-dropins-deployment-test</id>
                        <phase>test</phase>
                        <goals>  
                            <goal>test</goal>  
                        </goals>  
                        <configuration>
                            <skip>${skipTests}</skip>
                            <reportsDirectory>${project.build.directory}/surefire-reports/wlp-dropins-deployment-test</reportsDirectory>
                            <systemPropertyVariables>
                                <arquillian.launch>wlp-dropins-deployment</arquillian.launch>
                            </systemPropertyVariables>
                        </configuration>
                    </execution>
                    <execution>
                        <id>wlp-xml-deployment-test</id>
                        <phase>test</phase>
                        <goals>  
                            <goal>test</goal>  
                        </goals>  
                        <configuration>
                            <skip>${skipTests}</skip>
                            <reportsDirectory>${project.build.directory}/surefire-reports/wlp-xml-deployment-test</reportsDirectory>
                            <systemPropertyVariables>
                                <arquillian.launch>wlp-xml-deployment</arquillian.launch>
                            </systemPropertyVariables>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <!-- Dependencies -->
    <dependencies>

        <!-- org.jboss.arquillian -->
        <dependency>
            <groupId>org.jboss.arquillian.container</groupId>
            <artifactId>arquillian-container-spi</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.arquillian.container</groupId>
            <artifactId>arquillian-container-test-spi</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.arquillian.protocol</groupId>
            <artifactId>arquillian-protocol-servlet</artifactId>
        </dependency>

        <dependency>
            <groupId>org.jboss.arquillian.testenricher</groupId>
            <artifactId>arquillian-testenricher-cdi</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.arquillian.testenricher</groupId>
            <artifactId>arquillian-testenricher-ejb</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.arquillian.testenricher</groupId>
            <artifactId>arquillian-testenricher-resource</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.arquillian.testenricher</groupId>
            <artifactId>arquillian-testenricher-initialcontext</artifactId>
        </dependency>
        
        <!-- Java EE Spec APIs -->

        <dependency>
            <groupId>org.jboss.spec.javax.servlet</groupId>
            <artifactId>jboss-servlet-api_3.0_spec</artifactId>
            <version>[1.0,)</version>
        </dependency>

        <dependency>
            <groupId>javax.inject</groupId>
            <artifactId>javax.inject</artifactId>
            <version>1</version>
        </dependency>

        <!-- Sun Tools -->

        <dependency>
            <groupId>com.sun</groupId>
            <artifactId>tools</artifactId>
            <version>1.6.0</version>
            <scope>system</scope>
            <systemPath>${java.home}/../lib/tools.jar</systemPath>
        </dependency>

        <!-- Testing -->

        <dependency>
            <groupId>org.jboss.arquillian.junit</groupId>
            <artifactId>arquillian-junit-container</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>

    </dependencies>
</project>

