<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.0.0.Beta1</version>
      <relativePath>../../pom.xml</relativePath>
   </parent>

   <artifactId>seam-wicket-example-numberguess</artifactId>
   <packaging>war</packaging>
   <name>Seam 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.mortbay.jetty</groupId>
         <artifactId>jetty</artifactId>
         <scope>test</scope>
      </dependency>
      
      <!-- these next two are because otherwise weld won't bootstrap in jetty -->
      <dependency>
         <groupId>org.jboss.spec.javax.el</groupId>
         <artifactId>jboss-el-api_2.2_spec</artifactId>
         <scope>provided</scope>
      </dependency>

      <dependency>
         <groupId>org.jboss.logging</groupId>
         <artifactId>jboss-logging</artifactId>
      </dependency>

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

   </dependencies>

   <build>
      <finalName>${project.artifactId}</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/java</directory>
            <includes>
               <include>**</include>
            </includes>
            <excludes>
               <exclude>**/*.java</exclude>
            </excludes>
         </testResource>
      </testResources>

      <plugins>
         <plugin>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>maven-jetty-plugin</artifactId>
            <configuration>
               <overrideWebXml>src/main/webapp/WEB-INF/jetty-additions-to-web.xml</overrideWebXml>
               <jettyEnvXml>src/main/webapp/WEB-INF/jetty-env.xml</jettyEnvXml>
            </configuration>
         </plugin>
         <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>
      </plugins>
   </build>

   <profiles>
      <profile>
         <id>jboss6</id>         
         <activation>
            <activeByDefault>true</activeByDefault>
         </activation>         
         <dependencies>

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

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

            <dependency>
               <groupId>javax.inject</groupId>
               <artifactId>javax.inject</artifactId>
               <scope>provided</scope>
            </dependency>

            <!-- ??? -->
            <dependency>
               <groupId>javax.portlet</groupId>
               <artifactId>portlet-api</artifactId>
               <version>2.0</version>
            </dependency>
      
            <dependency>
               <groupId>org.jboss.spec.javax.annotation</groupId>
               <artifactId>jboss-annotations-api_1.1_spec</artifactId>
               <scope>provided</scope>
            </dependency>
      
         </dependencies>
         <build>
            <plugins>
               <plugin>
                  <groupId>org.codehaus.mojo</groupId>
                  <artifactId>jboss-maven-plugin</artifactId>
                  <configuration>
                     <jbossHome>${jboss.home}</jbossHome>
                     <serverName>${jboss.domain}</serverName>
                     <fileNames>
                        <fileName>${project.build.directory}/${project.build.finalName}.war</fileName>
                     </fileNames>
                  </configuration>
               </plugin>
            </plugins>
         </build>
      </profile>      
      <profile>
         <id>jetty</id>
         <dependencies>
      
            <dependency>
               <groupId>org.jboss.seam.wicket</groupId>
               <artifactId>seam-wicket-api</artifactId>
               <version>${project.version}</version>
            </dependency>
      
            <dependency>
               <groupId>javax.enterprise</groupId>
               <artifactId>cdi-api</artifactId>
               <scope>compile</scope>
            </dependency>

            <dependency>
               <groupId>javax.inject</groupId>
               <artifactId>javax.inject</artifactId>
               <scope>compile</scope>
            </dependency>
      
            <dependency>
               <groupId>org.jboss.weld.servlet</groupId>
               <artifactId>weld-servlet</artifactId>
               <scope>compile</scope>
            </dependency>

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

            <dependency>
               <groupId>org.slf4j</groupId>
               <artifactId>slf4j-api</artifactId>
            </dependency>

            <!-- JETTY DEPENDENCIES FOR IN IDE TESTING -->

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

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

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

            <dependency>
               <groupId>org.slf4j</groupId>
               <artifactId>slf4j-jdk14</artifactId>
            </dependency>

         </dependencies>
      </profile>
   </profiles>

</project>
