<?xml version="1.0" encoding="UTF-8"?>
<!--
  JBoss, Home of Professional Open Source
  Copyright 2010, Red Hat Middleware LLC, and individual contributors
  by the @authors tag. See the copyright.txt in the distribution for a
  full listing of individual contributors.

  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.jboss.seam.examples</groupId>
        <artifactId>seam-examples-parent</artifactId>
        <version>3.1.0.Beta3</version>
        <relativePath>../pom.xml</relativePath>
    </parent>
    <groupId>org.jboss.seam.examples</groupId>
    <artifactId>seam-booking</artifactId>
    <packaging>war</packaging>
    <name>Seam Booking Example</name>
    <description>The Seam booking example using the simplified Java EE 6 programming model and packaging structure (i.e., web archive)</description>
    <url>http://seamframework.org/Seam3</url>

    <properties>
        <jpamodelgen.version>1.1.1.Final</jpamodelgen.version>
    </properties>

    <dependencies>
        <!-- Annotation processor for generating typed loggers -->
        <dependency>
            <groupId>org.jboss.solder</groupId>
            <artifactId>solder-tooling</artifactId>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>

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

        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-jpamodelgen</artifactId>
            <version>${jpamodelgen.version}</version>
            <scope>provided</scope>
            <!-- Excluded Hibernate-provided JPA API because it's provided by the Java EE 6 dependencies -->
            <exclusions>
                <exclusion>
                    <groupId>org.hibernate.javax.persistence</groupId>
                    <artifactId>hibernate-jpa-2.0-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
    
        <dependency>
            <groupId>org.jboss.seam.faces</groupId>
            <artifactId>seam-faces</artifactId>
        </dependency>
        
        <dependency>
            <groupId>org.jboss.seam.international</groupId>
            <artifactId>seam-international</artifactId>
        </dependency>
        
        <dependency>
           <groupId>org.jboss.seam.security</groupId>
           <artifactId>seam-security</artifactId>
           <scope>compile</scope>
        </dependency>
        
        <dependency>
           <groupId>org.jboss.seam.transaction</groupId>
           <artifactId>seam-transaction</artifactId>
           <scope>compile</scope>
        </dependency>
        
        <dependency>
            <groupId>org.picketlink.idm</groupId>
            <artifactId>picketlink-idm-core</artifactId>
            <version>1.5.0.Alpha02</version>
        </dependency>
        
        <dependency>
            <groupId>com.ocpsoft</groupId>
            <artifactId>ocpsoft-pretty-time</artifactId>
            <version>1.0.6</version>
        </dependency>

        <dependency>
            <groupId>com.ocpsoft</groupId>
            <artifactId>prettyfaces-jsf2</artifactId>
            <version>3.2.0</version>
        </dependency>
        
        <dependency>
         <groupId>commons-digester</groupId>
         <artifactId>commons-digester</artifactId>
         <version>2.1</version>
        </dependency>
        
        <!-- Bean Validation Implementation; provides portable constraints @NotEmpty, @Email and @Url -->
        <!-- Hibernate Validator is the only JSR-303 implementation at the moment, so we can assume it's provided -->
        <!-- TODO Move Hibernate Validator to app server specific sections -->
        <dependency>
            <groupId>org.hibernate.</groupId>
            <artifactId>hibernate-validator</artifactId>
            <version>4.1.0.Final</version>
            <scope>provided</scope>
        </dependency>

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

        <dependency>
            <groupId>org.jboss.spec</groupId>
            <artifactId>jboss-javaee-6.0</artifactId>
            <type>pom</type>
            <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>
        <dependency>
            <groupId>org.jboss.shrinkwrap.resolver</groupId>
            <artifactId>shrinkwrap-resolver-impl-maven</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <defaultGoal>package</defaultGoal>
        <finalName>seam-booking</finalName>
        <plugins>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <!-- activate only when you need to generate the metamodel -->
                    <!--
                    <compilerArgument>-proc:none</compilerArgument>
                    -->
                </configuration>
            </plugin>

            <!--
            <plugin>
                <groupId>org.codehaus.groovy.maven</groupId>
                <artifactId>gmaven-plugin</artifactId>
                <version>1.0</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>testCompile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            -->

            <plugin>
                <artifactId>maven-eclipse-plugin</artifactId>
                <version>2.8</version>
                <configuration>
                    <additionalBuildcommands>
                        <!--
                            annoyingly creates a bin directory <buildCommand>
                            <name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
                            </buildCommand>
                        -->
                        <buildCommand>
                            <name>org.jboss.tools.common.verification.verifybuilder</name>
                        </buildCommand>
                    </additionalBuildcommands>
                    <additionalConfig>
                        <file>
                            <name>.settings/org.maven.ide.eclipse.prefs</name>
                            <content>eclipse.preferences.version=1
                                fullBuildGoals=process-test-resources
                                includeModules=false
                                resolveWorkspaceProjects=true
                                resourceFilterGoals=process-resources
                                resources\:testResources
                                skipCompilerPlugin=true
                                version=1</content>
                        </file>
                    </additionalConfig>
                    <additionalProjectFacets>
                        <jst.jsf>2.0</jst.jsf>
                    </additionalProjectFacets>
                    <additionalProjectnatures>
                        <projectnature>org.eclipse.wst.jsdt.core.jsNature</projectnature>
                        <projectnature>org.jboss.tools.jsf.jsfnature</projectnature>
                    </additionalProjectnatures>
                    <workspace>${user.home}/.eclipse/workspace</workspace>
                    <wtpdefaultserver>JBossAS</wtpdefaultserver>
                    <wtpversion>2.0</wtpversion>
                    <!--
                    <downloadSources>true</downloadSources>
                    <downloadJavadocs>true</downloadJavadocs>
                    -->
                </configuration>
            </plugin>
            
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>
        
        </plugins>
    </build>
    <profiles>

        <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>    
    
        <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>
            <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>**/ftest/*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>
    </profiles>


    <scm>
        <connection>scm:git:git://github.com/seam/examples.git</connection>
        <developerConnection>scm:git:git@github.com:seam/examples.git</developerConnection>
        <url>http://github.com/seam</url>
    </scm>

</project>
