<?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</groupId>
        <artifactId>arquillian-build</artifactId>
        <version>1.0.0.CR4</version>
        <relativePath>../../build/pom.xml</relativePath>
    </parent>

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

    <!-- Artifact Configuration -->
    <groupId>org.jboss.arquillian.example</groupId>
    <artifactId>arquillian-example-junit</artifactId>
    <name>Arquillian Example JUnit</name>
    <description>JUnit example of Arquillian Usage</description>
    <!-- Properties -->
    <properties>

        <!-- Versioning -->
        <version.weld_core>1.0.1-SP4</version.weld_core>
        <version.weld_core_11>1.1.0.Final</version.weld_core_11>
        <version.org.apache.openejb_openejb.core>3.1.4</version.org.apache.openejb_openejb.core>
        <version.openwebbeans>1.0.0</version.openwebbeans>
        <version.jboss_60>6.0.0.Final</version.jboss_60>
        <version.jboss_51>5.1.0.GA</version.jboss_51>
        <version.jboss_50>5.0.1.GA</version.jboss_50>
        <version.glassfish_31>3.1</version.glassfish_31>

    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <!-- <parallel>none</parallel> -->
                </configuration>
            </plugin>
        </plugins>
    </build>
    <profiles>
        <profile>
            <id>default</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <dependencies>
                <dependency>
                    <!-- Need on all profiles except Glassfish to compile, 
                        api is not 100% up to date with final spec -->
                    <groupId>org.jboss.ejb3</groupId>
                    <artifactId>jboss-ejb3-api</artifactId>
                    <version>3.1.0</version>
                    <scope>provided</scope>
                </dependency>
                <dependency>
                    <groupId>javax.persistence</groupId>
                    <artifactId>persistence-api</artifactId>
                    <version>1.0</version>
                    <scope>test</scope>
                </dependency>
            </dependencies>
            <build>
                <plugins>
                    <!-- Surefire -->
                    <plugin>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <!-- ARQ-60 -->
                            <skip>true</skip>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>weld-se-embedded</id>
            <dependencies>
                <dependency>
                    <groupId>org.jboss.arquillian.container</groupId>
                    <artifactId>arquillian-weld-se-embedded-1</artifactId>
                    <version>${project.version}</version>
                </dependency>
                <dependency>
                    <!-- Need on all profiles except Glassfish to compile, 
                        api is not 100% up to date with final spec -->
                    <groupId>org.jboss.ejb3</groupId>
                    <artifactId>jboss-ejb3-api</artifactId>
                    <version>3.1.0</version>
                </dependency>
                <!-- org.jboss.weld -->
                <dependency>
                    <groupId>org.jboss.weld</groupId>
                    <artifactId>weld-core</artifactId>
                </dependency>
                <dependency>
                    <groupId>org.jboss.weld</groupId>
                    <artifactId>weld-api</artifactId>
                </dependency>
                <dependency>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-simple</artifactId>
                </dependency>
                <dependency>
                    <groupId>javax.el</groupId>
                    <artifactId>el-api</artifactId>
                    <version>2.2</version>
                </dependency>
            </dependencies>
            <dependencyManagement>
                <dependencies>
                    <!-- org.jboss.weld -->
                    <dependency>
                        <groupId>org.jboss.weld</groupId>
                        <artifactId>weld-core-bom</artifactId>
                        <version>${version.weld_core}</version>
                        <type>pom</type>
                        <scope>import</scope>
                    </dependency>
                </dependencies>
            </dependencyManagement>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <includes>
                                <include>com/acme/cdi/random/*</include>
                            </includes>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>weld-ee-embedded</id>
            <dependencies>
                <dependency>
                    <groupId>org.jboss.arquillian.container</groupId>
                    <artifactId>arquillian-weld-ee-embedded-1.1</artifactId>
                    <version>${project.version}</version>
                </dependency>
                <dependency>
                    <!-- Need on all profiles except Glassfish to compile, 
                        api is not 100% up to date with final spec -->
                    <groupId>org.jboss.ejb3</groupId>
                    <artifactId>jboss-ejb3-api</artifactId>
                    <version>3.1.0</version>
                </dependency>
                <!-- org.jboss.weld -->
                <dependency>
                    <groupId>org.jboss.weld</groupId>
                    <artifactId>weld-core</artifactId>
                </dependency>
                <dependency>
                    <groupId>org.jboss.weld</groupId>
                    <artifactId>weld-api</artifactId>
                </dependency>
                <dependency>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-simple</artifactId>
                </dependency>
                <dependency>
                    <groupId>javax.el</groupId>
                    <artifactId>el-api</artifactId>
                    <version>2.2</version>
                </dependency>
                <dependency>
                    <groupId>javax.transaction</groupId>
                    <artifactId>jta</artifactId>
                    <version>1.1</version>
                    <scope>provided</scope>
                </dependency>

                <dependency>
                    <groupId>javax.persistence</groupId>
                    <artifactId>persistence-api</artifactId>
                    <version>1.0</version>
                    <scope>provided</scope>
                </dependency>
                <dependency>
                    <groupId>javax.validation</groupId>
                    <artifactId>validation-api</artifactId>
                    <version>1.0.0.GA</version>
                    <scope>provided</scope>
                </dependency>
                <dependency>
                    <groupId>org.jboss.spec.javax.servlet</groupId>
                    <artifactId>jboss-servlet-api_3.0_spec</artifactId>
                    <version>1.0.0.Beta2</version>
                    <scope>provided</scope>
                </dependency>

            </dependencies>
            <dependencyManagement>
                <dependencies>
                    <!-- org.jboss.weld -->
                    <dependency>
                        <groupId>org.jboss.weld</groupId>
                        <artifactId>weld-core-bom</artifactId>
                        <version>${version.weld_core_11}</version>
                        <type>pom</type>
                        <scope>import</scope>
                    </dependency>
                </dependencies>
            </dependencyManagement>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <includes>
                                <include>com/acme/cdi/payment/*</include>
                                <include>com/acme/cdi/conversation/*</include>
                            </includes>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>openwebbeans-embedded</id>
            <dependencies>
                <dependency>
                    <groupId>org.jboss.arquillian.container</groupId>
                    <artifactId>arquillian-openwebbeans-embedded-1</artifactId>
                    <version>${project.version}</version>
                </dependency>
                <dependency>
                    <!-- Need on all profiles except Glassfish to compile, 
                        api is not 100% up to date with final spec -->
                    <groupId>org.jboss.ejb3</groupId>
                    <artifactId>jboss-ejb3-api</artifactId>
                    <version>3.1.0</version>
                </dependency>
                <dependency>
                    <groupId>org.apache.openwebbeans</groupId>
                    <artifactId>openwebbeans-spi</artifactId>
                </dependency>
                <dependency>
                    <groupId>org.apache.openwebbeans</groupId>
                    <artifactId>openwebbeans-impl</artifactId>
                </dependency>
                <dependency>
                    <groupId>org.apache.geronimo.specs</groupId>
                    <artifactId>geronimo-el_2.2_spec</artifactId>
                </dependency>
                <dependency>
                    <groupId>org.apache.geronimo.specs</groupId>
                    <artifactId>geronimo-jta_1.1_spec</artifactId>
                </dependency>
                <dependency>
                    <groupId>org.apache.geronimo.specs</groupId>
                    <artifactId>geronimo-validation_1.0_spec</artifactId>
                </dependency>
                <dependency>
                    <groupId>org.apache.geronimo.specs</groupId>
                    <artifactId>geronimo-interceptor_1.1_spec</artifactId>
                </dependency>
                <dependency>
                    <groupId>org.apache.geronimo.specs</groupId>
                    <artifactId>geronimo-jcdi_1.0_spec</artifactId>
                </dependency>
                <dependency>
                    <groupId>org.apache.geronimo.specs</groupId>
                    <artifactId>geronimo-atinject_1.0_spec</artifactId>
                </dependency>
                <dependency>
                    <groupId>org.apache.geronimo.specs</groupId>
                    <artifactId>geronimo-servlet_2.5_spec</artifactId>
                </dependency>
            </dependencies>
            <dependencyManagement>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.openwebbeans</groupId>
                        <artifactId>openwebbeans</artifactId>
                        <version>${version.openwebbeans}</version>
                        <type>pom</type>
                        <scope>import</scope>
                    </dependency>
                </dependencies>
            </dependencyManagement>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <includes>
                                <include>com/acme/cdi/**</include>
                            </includes>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>jbossas-embedded-6</id>
            <dependencies>
                <dependency>
                    <groupId>org.jboss.arquillian.container</groupId>
                    <artifactId>arquillian-jbossas-embedded-6</artifactId>
                    <version>${project.version}</version>
                </dependency>
                <dependency>
                    <!-- Need on all profiles except Glassfish to compile, 
                        api is not 100% up to date with final spec -->
                    <groupId>org.jboss.ejb3</groupId>
                    <artifactId>jboss-ejb3-api</artifactId>
                    <version>3.1.0</version>
                </dependency>
                <dependency>
                    <groupId>org.jboss.jbossas</groupId>
                    <artifactId>jboss-as-depchain</artifactId>
                    <version>${version.jboss_60}</version>
                    <type>pom</type>
                </dependency>
            </dependencies>
            <dependencyManagement>
                <dependencies>
                    <dependency>
                        <groupId>org.jboss.jbossas</groupId>
                        <artifactId>jboss-as-depchain</artifactId>
                        <version>${version.jboss_60}</version>
                        <type>pom</type>
                        <scope>import</scope>
                    </dependency>
                </dependencies>
            </dependencyManagement>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <additionalClasspathElements>
                                <additionalClasspathElement>${project.build.directory}/jboss-${version.jboss_60}/client/jbossws-native-client.jar</additionalClasspathElement>
                                <!-- Because jbossweb.sar contains shared 
                                    web.xml, which must be visible from same CL as TomcatDeployer.class.getClassLoader -->
                                <additionalClasspathElement>${project.build.directory}/jboss-${version.jboss_60}/server/default/deploy/jbossweb.sar</additionalClasspathElement>
                            </additionalClasspathElements>

                            <redirectTestOutputToFile>true</redirectTestOutputToFile>
                            <trimStackTrace>false</trimStackTrace>
                            <printSummary>true</printSummary>
                            <forkMode>once</forkMode>

                            <!-- MaxPermSize Required to bump the space for 
                                relective data like classes, methods, etc. EMB-41. Endorsed required for 
                                things like WS support (EMB-61) -->
                            <argLine>-Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Djava.util.logging.manager=org.jboss.logmanager.LogManager -Djava.endorsed.dirs=${project.build.directory}/jboss-${version.jboss_60}/lib/endorsed -Djboss.home=${project.build.directory}/jboss-${version.jboss_60} -Djboss.boot.server.log.dir=${project.build.directory}/jboss-${version.jboss_60} -Dorg.jboss.reflect.spi.TypeInfoFactory=org.jboss.reflect.plugins.introspection.IntrospectionTypeInfoFactory</argLine>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-dependency-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>unpack</id>
                                <phase>process-test-classes</phase> <!-- So run before testing -->
                                <goals>
                                    <goal>unpack</goal>
                                </goals>
                                <configuration>
                                    <artifactItems>
                                        <artifactItem>
                                            <groupId>org.jboss.jbossas</groupId>
                                            <artifactId>jboss-as-distribution</artifactId>
                                            <version>${version.jboss_60}</version>
                                            <type>zip</type>
                                            <overWrite>false</overWrite>
                                            <outputDirectory>${project.build.directory}</outputDirectory>
                                        </artifactItem>
                                    </artifactItems>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>jbossas-remote-5</id>
            <dependencies>
                <dependency>
                    <groupId>org.jboss.arquillian.container</groupId>
                    <artifactId>arquillian-jbossas-remote-5</artifactId>
                    <version>${project.version}</version>
                </dependency>
                <dependency>
                    <!-- Need on all profiles except Glassfish to compile, 
                        api is not 100% up to date with final spec -->
                    <groupId>org.jboss.ejb3</groupId>
                    <artifactId>jboss-ejb3-api</artifactId>
                    <version>3.1.0</version>
                </dependency>
                <dependency>
                    <groupId>org.jboss.jbossas</groupId>
                    <artifactId>jboss-as-client</artifactId>
                    <version>${version.jboss_50}</version>
                    <type>pom</type>
                </dependency>
            </dependencies>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <includes>
                                <include>com/acme/ejb/*</include>
                                <include>com/acme/jms/*</include>
                                <include>com/acme/resource/*</include>
                            </includes>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>jbossas-remote-5.1</id>
            <dependencies>
                <dependency>
                    <groupId>org.jboss.arquillian.container</groupId>
                    <artifactId>arquillian-jbossas-remote-5.1</artifactId>
                    <version>${project.version}</version>
                </dependency>
                <dependency>
                    <!-- Need on all profiles except Glassfish to compile, 
                        api is not 100% up to date with final spec -->
                    <groupId>org.jboss.ejb3</groupId>
                    <artifactId>jboss-ejb3-api</artifactId>
                    <version>3.1.0</version>
                </dependency>
                <dependency>
                    <groupId>org.jboss.jbossas</groupId>
                    <artifactId>jboss-as-client</artifactId>
                    <version>${version.jboss_51}</version>
                    <type>pom</type>
                </dependency>
            </dependencies>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <includes>
                                <include>com/acme/ejb/*</include>
                                <include>com/acme/jms/*</include>
                                <include>com/acme/resource/*</include>
                            </includes>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>jbossas-remote-6</id>
            <dependencies>
                <dependency>
                    <groupId>org.jboss.arquillian.container</groupId>
                    <artifactId>arquillian-jbossas-remote-6</artifactId>
                    <version>${project.version}</version>
                </dependency>
                <dependency>
                    <!-- Need on all profiles except Glassfish to compile, 
                        api is not 100% up to date with final spec -->
                    <groupId>org.jboss.ejb3</groupId>
                    <artifactId>jboss-ejb3-api</artifactId>
                    <version>3.1.0</version>
                </dependency>
                <dependency>
                    <groupId>org.jboss.jbossas</groupId>
                    <artifactId>jboss-as-client</artifactId>
                    <version>${version.jboss_60}</version>
                    <type>pom</type>
                </dependency>
            </dependencies>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <excludes>
                                <exclude>com/acme/cdi/conversation/*</exclude>
                            </excludes>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>glassfish-embedded-3.1</id>
            <dependencies>
                <dependency>
                    <groupId>org.jboss.arquillian.container</groupId>
                    <artifactId>arquillian-glassfish-embedded-3.1</artifactId>
                    <version>${project.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.glassfish.extras</groupId>
                    <artifactId>glassfish-embedded-all</artifactId>
                    <version>${version.glassfish_31}</version>
                </dependency>
            </dependencies>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <includes>
                                <include>com/acme/ejb/*</include>
                                <include>com/acme/ejb31/*</include>
                                <include>com/acme/cdi/*</include>
                                <include>com/acme/cdi/payment/*</include>
                                <include>com/acme/cdi/random/*</include>
                                <!-- <include>com/acme/web/*</include> -->
                            </includes>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>openejb-embedded</id>
            <dependencies>
                <dependency>
                    <groupId>org.jboss.arquillian.container</groupId>
                    <artifactId>arquillian-openejb-embedded-3.1</artifactId>
                    <version>${project.version}</version>
                </dependency>
                <dependency>
                    <!-- Need on all profiles except Glassfish to compile, 
                        api is not 100% up to date with final spec -->
                    <groupId>org.jboss.ejb3</groupId>
                    <artifactId>jboss-ejb3-api</artifactId>
                    <version>3.1.0</version>
                </dependency>
                <dependency>
                    <groupId>org.apache.openejb</groupId>
                    <artifactId>openejb-core</artifactId>
                    <version>${version.org.apache.openejb_openejb.core}</version>
                </dependency>
            </dependencies>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <includes>
                                <include>com/acme/ejb/*</include>
                            </includes>
                            <excludes>
                                <exclude>**/TemperatureConverterTestCase*</exclude>
                            </excludes>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>was-remote-7</id>
            <dependencies>
                <dependency>
                    <groupId>org.jboss.arquillian.container</groupId>
                    <artifactId>arquillian-was-remote-7</artifactId>
                    <version>${project.version}</version>
                </dependency>
            </dependencies>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <includes>
                                <include>com/acme/ejb/*</include>
                            </includes>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <!-- Dependencies -->
    <dependencies>

        <dependency>
            <groupId>org.jboss.arquillian.junit</groupId>
            <artifactId>arquillian-junit-container</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>org.jboss.arquillian.example</groupId>
            <artifactId>arquillian-example-domain</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>javax.enterprise</groupId>
            <artifactId>cdi-api</artifactId>
            <version>1.0-SP1</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>javax.jms</groupId>
            <artifactId>jms</artifactId>
            <version>1.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>javax.annotation</groupId>
            <artifactId>jsr250-api</artifactId>
            <version>1.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>javax.mail</groupId>
            <artifactId>mail</artifactId>
            <version>1.4.1</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.shrinkwrap.descriptors</groupId>
            <artifactId>shrinkwrap-descriptors-impl</artifactId>
            <scope>test</scope> <!-- ARQ-514, OK in test scope -->
        </dependency>

    </dependencies>

</project>
