<?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">
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.jboss.seam.security</groupId>
    <artifactId>seam-security-example-idmconsole</artifactId>
    <packaging>war</packaging>
    <name>Seam Security Identity Management Console Example</name>

    <parent>
        <groupId>org.jboss.seam.examples</groupId>
        <artifactId>seam-examples-parent</artifactId>
        <version>3.1.0.Final</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <properties>
        <!-- Explicitly declaring the source encoding eliminates the following message: 
             [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent! -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <!-- To set the jboss.home environment variable the Maven way, set the jboss.home property in an active profile in the Maven 2 settings.xml file -->
        <jboss.home>${env.JBOSS_HOME}</jboss.home>
        <jboss.domain>default</jboss.domain>
    </properties>

    <dependencies>

        <!-- Seam Security -->
        <dependency>
            <groupId>org.jboss.seam.security</groupId>
            <artifactId>seam-security</artifactId>
	    <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>org.drools</groupId>
            <artifactId>drools-core</artifactId>
        </dependency>

        <dependency>
            <groupId>org.drools</groupId>
            <artifactId>drools-compiler</artifactId>
        </dependency>

        <dependency>
            <groupId>org.jboss.seam.persistence</groupId>
            <artifactId>seam-persistence</artifactId>
        </dependency>

        <dependency>
            <groupId>org.jboss.seam.transaction</groupId>
            <artifactId>seam-transaction</artifactId>
        </dependency>

        <!-- Required for messages API -->
        <dependency>
            <groupId>org.jboss.seam.international</groupId>
            <artifactId>seam-international</artifactId>
        </dependency>

        <!-- Seam Faces required for messages support -->
        <dependency>
            <groupId>org.jboss.seam.faces</groupId>
	    <artifactId>seam-faces</artifactId>
	</dependency>

	<dependency>
	   <groupId>org.jboss.seam.faces</groupId>
	   <artifactId>seam-faces-api</artifactId>
	</dependency>

        <dependency>
           <groupId>joda-time</groupId>
           <artifactId>joda-time</artifactId>
        </dependency>

        <dependency>
           <groupId>org.jboss.solder</groupId>
           <artifactId>solder-impl</artifactId>
        </dependency>

        <!-- CDI (JSR-299) -->
        <dependency>
            <groupId>javax.enterprise</groupId>
            <artifactId>cdi-api</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.hibernate.javax.persistence</groupId>
            <artifactId>hibernate-jpa-2.0-api</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- Bean Validation (JSR-303) -->
        <dependency>
            <groupId>javax.validation</groupId>
            <artifactId>validation-api</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- Bean Validation Implementation -->
        <!-- Provides portable constraints such as @NotEmpty, @Email and @Url -->
        <!-- Hibernate Validator is the only JSR-303 implementation at the moment, so we can assume it's provided -->
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-validator</artifactId>
            <version>4.0.0.GA</version>
            <scope>provided</scope>
        </dependency>

        <!-- JSF -->
        <dependency>
           <groupId>org.jboss.spec.javax.faces</groupId>
	   <artifactId>jboss-jsf-api_2.0_spec</artifactId>
	   <scope>provided</scope>
	</dependency>

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

        <!-- Arquillian Drone support in Arquillian tests -->
        <dependency>
            <groupId>org.jboss.arquillian.extension</groupId>
            <artifactId>arquillian-drone-impl</artifactId>
            <scope>test</scope>
        </dependency>

        <!-- Support for Selenium in Arquillian Drone -->
        <dependency>
            <groupId>org.jboss.arquillian.extension</groupId>
            <artifactId>arquillian-drone-selenium</artifactId>
            <scope>test</scope>
        </dependency>

        <!-- Support for Selenium Server in Arquillian Drone -->
        <!-- Required only if you want Arquillian to control Selenium Server life cycle -->
        <dependency>
            <groupId>org.jboss.arquillian.extension</groupId>
            <artifactId>arquillian-drone-selenium-server</artifactId>
            <scope>test</scope>
        </dependency>

        <!-- Selenium -->
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-java</artifactId>
            <scope>test</scope>
        </dependency>

        <!-- Selenium Server -->
        <!-- Required only if you want Arquillian to control Selenium Server life cycle -->
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-server</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.jboss.arquillian.ajocado</groupId>
            <artifactId>arquillian-ajocado-junit</artifactId>
            <type>pom</type>
            <scope>test</scope>
        </dependency>
   </dependencies>
    <build>
        <finalName>security-idmconsole</finalName>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>jbossas6</id>
            <activation>
                <property>
                    <name>arquillian</name>
                    <value>jbossas-managed-6</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-war-plugin</artifactId>
                        <configuration>
                            <webResources>
                                <resource>
                                    <directory>src/main/resources-jbossas6</directory>
                                </resource>
                            </webResources>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>jbossas7</id>
            <activation>
                <activeByDefault>true</activeByDefault>
                <property>
                    <name>arquillian</name>
                    <value>jbossas-managed-7</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-war-plugin</artifactId>
                        <configuration>
                            <webResources>
                                <resource>
                                    <directory>src/main/resources-jbossas7</directory>
                                </resource>
                            </webResources>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>glassfish</id>
            <activation>
                <property>
                    <name>arquillian</name>
                    <value>glassfish-remote-3.1</value>
                </property>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>joda-time</groupId>
                    <artifactId>joda-time</artifactId>
                </dependency>
            </dependencies>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-war-plugin</artifactId>
                        <configuration>
                            <webResources>
                                <resource>
                                    <directory>src/main/resources-glassfish</directory>
                                </resource>
                            </webResources>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <!-- Functional test profiles -->
        <profile>
            <id>ftest</id>
            <activation>
                <property>
                    <name>arquillian</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-failsafe-plugin</artifactId>
                        <configuration>
                            <includes>
                                <include>**/*Test.java</include>
                            </includes>
                        </configuration>
                        <executions>
                            <execution>
                                <id>integration-test</id>
                                <phase>integration-test</phase>
                                <goals>
                                    <goal>integration-test</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>verify</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>verify</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>jbossas-managed-6</id>
            <activation>
                <property>
                    <name>arquillian</name>
                    <value>jbossas-managed-6</value>
                </property>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>org.jboss.seam.test</groupId>
                    <artifactId>jbossas-managed-6</artifactId>
                    <type>pom</type>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>

        <profile>
            <id>jbossas-remote-6</id>
            <activation>
                <property>
                    <name>arquillian</name>
                    <value>jbossas-remote-6</value>
                </property>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>org.jboss.seam.test</groupId>
                    <artifactId>jbossas-remote-6</artifactId>
                    <type>pom</type>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>jbossas-remote-7</id>
            <activation>
                <property>
                    <name>arquillian</name>
                    <value>jbossas-remote-7</value>
                </property>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>org.jboss.seam.test</groupId>
                    <artifactId>jbossas-remote-7</artifactId>
                    <type>pom</type>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>jbossas-managed-7</id>
            <activation>
                <property>
                    <name>arquillian</name>
                    <value>jbossas-managed-7</value>
                </property>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>org.jboss.seam.test</groupId>
                    <artifactId>jbossas-managed-7</artifactId>
                    <type>pom</type>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>glassfish-remote-3.1</id>
            <activation>
                <property>
                    <name>arquillian</name>
                    <value>glassfish-remote-3.1</value>
                </property>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>org.jboss.seam.test</groupId>
                    <artifactId>glassfish-remote-3.1</artifactId>
                    <type>pom</type>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>openshift-express</id>
            <activation>
                <property>
                    <name>arquillian</name>
                    <value>openshift-express</value>
                </property>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>org.jboss.seam.test</groupId>
                    <artifactId>openshift-express</artifactId>
                    <type>pom</type>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>distribution</id>
            <activation>
                <property>
                    <name>release</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-assembly-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
