<?xml version="1.0" encoding="UTF-8"?>
<!--
  JBoss, Home of Professional Open Source
  Copyright [2010], Red Hat, Inc., 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.wicket</groupId>
      <artifactId>seam-wicket-parent</artifactId>
      <version>3.1.0.Final</version>
      <relativePath>../../pom.xml</relativePath>
   </parent>

   <artifactId>seam-wicket-example-numberguess</artifactId>
   <packaging>war</packaging>
   <name>Seam for Apache Wicket Numberguess example</name>
   <!-- url required for JAR Manifest -->
   <url>${project.parent.url}</url>

   <properties>
      <jboss.home>${env.JBOSS_HOME}</jboss.home>
      <jboss.domain>default</jboss.domain>
   </properties>

   <dependencies>

      <dependency>
         <groupId>org.jboss.seam.wicket</groupId>
         <artifactId>seam-wicket</artifactId>
         <scope>compile</scope>
         <exclusions>
           <exclusion>
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-api</artifactId>
           </exclusion>
         </exclusions>
      </dependency>

      <dependency>
         <groupId>org.jboss.solder</groupId>
         <artifactId>solder-impl</artifactId>
         <scope>compile</scope>
      </dependency>
      
      <dependency>
            <groupId>org.jboss.shrinkwrap.resolver</groupId>
            <artifactId>shrinkwrap-resolver-api-maven</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.shrinkwrap.resolver</groupId>
            <artifactId>shrinkwrap-resolver-impl-maven</artifactId>
            <scope>test</scope>
        </dependency>

      <dependency>
         <groupId>org.jboss.seam.wicket</groupId>
         <artifactId>seam-wicket-mock</artifactId>
      </dependency>

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

        <dependency>
            <groupId>org.apache.wicket</groupId>
            <artifactId>wicket</artifactId>
        </dependency>
        

      <!-- Test dependencies -->
        <dependency>
             <groupId>org.jboss.arquillian.ajocado</groupId>
             <artifactId>arquillian-ajocado-junit</artifactId>
             <type>pom</type>
             <scope>test</scope>
        </dependency>
      
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <scope>test</scope>
        </dependency>
   </dependencies>

   <build>
      <finalName>wicket-numberguess</finalName>
      <!-- Override the resource filtering to support storing html alongside classes -->
      <resources>
         <resource>
            <filtering>false</filtering>
            <directory>src/main/resources</directory>
         </resource>
         <resource>
            <filtering>false</filtering>
            <directory>src/main/java</directory>
            <includes>
               <include>**</include>
            </includes>
            <excludes>
               <exclude>**/*.java</exclude>
            </excludes>
         </resource>
      </resources>
      <testResources>
         <testResource>
            <filtering>false</filtering>
            <directory>src/test/resources</directory>
            <includes>
               <include>**</include>
            </includes>
         </testResource>
         <testResource>
            <filtering>false</filtering>
            <directory>src/test/java</directory>
            <includes>
               <include>**</include>
            </includes>
            <excludes>
               <exclude>**/*.java</exclude>
            </excludes>
         </testResource>
      </testResources>

      <plugins>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-war-plugin</artifactId>
            <configuration>
               <webResources>
                  <resource>
                     <directory>src/main/webapp/WEB-INF</directory>
                     <targetPath>WEB-INF</targetPath>
                     <includes>
                        <include>**/beans.xml</include>
                        <include>**/web.xml</include>
                     </includes>
                  </resource>
               </webResources>
            </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>default</id>
         <activation>
            <activeByDefault>true</activeByDefault>
         </activation>
         <build>
            <plugins>
               <plugin>
                  <artifactId>maven-surefire-plugin</artifactId>
                  <configuration>
                     <skip>true</skip>
                  </configuration>
               </plugin>
            </plugins>
         </build>
      </profile>

      <!-- mvn clean test -Pitest-jetty-embedded -->
      <profile>
         <id>itest-jetty-embedded</id>
         <dependencies>
            <dependency>
               <groupId>org.jboss.arquillian.container</groupId>
               <artifactId>arquillian-jetty-embedded-7</artifactId>
            </dependency>

            <dependency>
               <groupId>org.eclipse.jetty</groupId>
               <artifactId>jetty-webapp</artifactId>
               <scope>test</scope>
            </dependency>

            <dependency>
               <groupId>org.eclipse.jetty</groupId>
               <artifactId>jetty-plus</artifactId>
               <scope>test</scope>
            </dependency>

            <dependency>
               <groupId>org.jboss.spec.javax.servlet.jsp</groupId>
               <artifactId>jboss-jsp-api_2.2_spec</artifactId>
               <scope>test</scope>
            </dependency>

            <dependency>
               <groupId>org.jboss.weld.servlet</groupId>
               <artifactId>weld-servlet</artifactId>
            </dependency>
         </dependencies>
         <build>
            <plugins>
               <plugin>
                  <artifactId>maven-surefire-plugin</artifactId>
                  <configuration>
                     <skip>false</skip>
                     <excludes>
                        <exclude>org/jboss/seam/wicket/examples/numberguess/ftest/*.java</exclude>
                     </excludes>
                  </configuration>
               </plugin>
            </plugins>
            <testResources>
               <testResource>
                  <directory>${project.basedir}/src/main/webapp/WEB-INF</directory>
               </testResource>
               <testResource>
                  <directory>${project.basedir}/src/test/resources</directory>
               </testResource>
               <testResource>
                  <directory>${project.basedir}/src/test/resources-jetty</directory>
               </testResource>
            </testResources>
         </build>
      </profile>

      <!-- mvn clean package -Pjboss7 -->
      <profile>
         <id>jbossas7</id>
         <activation>
            <property>
                <name>arquillian</name>
                <value>jbossas-managed-6</value>
            </property>
         </activation>
         <dependencies>
            <dependency>
               <groupId>org.slf4j</groupId>
               <artifactId>slf4j-jdk14</artifactId>
               <scope>runtime</scope>
            </dependency>
         </dependencies>
       </profile> 

      <!-- mvn clean package -Pglassfish -->
      <profile>
         <id>glassfish</id>
         <activation>
            <property>
                <name>arquillian</name>
                <value>glassfish-remote-3.1</value>
            </property>
         </activation>
         <dependencies>
            <dependency>
               <groupId>org.slf4j</groupId>
               <artifactId>slf4j-jdk14</artifactId>
               <scope>runtime</scope>
            </dependency>
         </dependencies>
      </profile> 

      <!-- mvn -Pjetty jetty:run -->
      <profile>
         <id>jetty</id>
         <dependencies>
            <dependency>
               <groupId>org.jboss.weld.servlet</groupId>
               <artifactId>weld-servlet</artifactId>
            </dependency>

            <dependency>
               <groupId>org.jboss.spec.javax.annotation</groupId>
               <artifactId>jboss-annotations-api_1.1_spec</artifactId>
               <scope>provided</scope>
            </dependency>

            <!-- Dependencies for launching Jetty from within IDE -->
            <dependency>
               <groupId>org.mortbay.jetty</groupId>
               <artifactId>jetty</artifactId>
            </dependency>

            <dependency>
               <groupId>org.mortbay.jetty</groupId>
               <artifactId>jsp-2.1-jetty</artifactId>
            </dependency>

            <dependency>
               <groupId>org.mortbay.jetty</groupId>
               <artifactId>jetty-naming</artifactId>
            </dependency>

            <dependency>
               <groupId>org.mortbay.jetty</groupId>
               <artifactId>jetty-plus</artifactId>
            </dependency>
         </dependencies>
         <build>
            <plugins>
               <plugin>
                  <artifactId>maven-surefire-plugin</artifactId>
                  <configuration>
                     <skip>true</skip>
                  </configuration>
               </plugin>
               <plugin>
                  <groupId>org.codehaus.mojo</groupId>
                  <artifactId>build-helper-maven-plugin</artifactId>
                  <version>1.5</version>
                  <executions>
                     <execution>
                        <phase>process-sources</phase>
                        <configuration>
                           <sources>
                              <source>${project.basedir}/src/jetty/java</source>
                           </sources>
                        </configuration>
                        <goals>
                           <goal>add-source</goal>
                        </goals>
                     </execution>
                  </executions>
               </plugin>
               <plugin>
                  <groupId>org.mortbay.jetty</groupId>
                  <artifactId>maven-jetty-plugin</artifactId>
                  <!-- TODO move version to parent -->
                  <version>6.1.26</version>
                  <configuration>
                     <overrideWebXml>src/main/webapp/WEB-INF/jetty-web-fragment.xml</overrideWebXml>
                     <jettyEnvXml>src/main/webapp/WEB-INF/jetty-env.xml</jettyEnvXml>
                     <scanIntervalSeconds>3</scanIntervalSeconds>
                  </configuration>
               </plugin>
            </plugins>
         </build>
      </profile>
     <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-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-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-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>
   </profiles>
</project>
