<?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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

  <packaging>jar</packaging>

  <parent>
    <groupId>org.juzu</groupId>
    <artifactId>juzu-parent</artifactId>
    <version>0.7.0-beta13</version>
  </parent>

  <groupId>org.juzu</groupId>
  <artifactId>juzu-booking</artifactId>
  <version>0.7.0-beta13</version>

  <name>Juzu Booking</name>
  <description>The infamous booking application</description>

  <dependencies>

    <dependency>
      <groupId>org.juzu</groupId>
      <artifactId>juzu-bom-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.juzu</groupId>
      <artifactId>juzu-plugins-servlet</artifactId>
    </dependency>
    <dependency>
      <groupId>org.juzu</groupId>
      <artifactId>juzu-plugins-portlet</artifactId>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.juzu</groupId>
      <artifactId>juzu-bom-arquillian</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.juzu</groupId>
      <artifactId>juzu-bom-arquillian-tomcat7</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <finalName>juzu-booking</finalName>
    <plugins>

      <!-- Precompile the template class in maven (this is optional) -->
      <plugin>
        <groupId>org.codehaus.gmaven</groupId>
        <artifactId>gmaven-plugin</artifactId>
        <version>1.5</version>
        <executions>
          <execution>
            <goals>
              <goal>compile</goal>
            </goals>
            <configuration>
              <sources>
                <fileset>
                  <directory>${project.build.outputDirectory}</directory>
                  <includes>
                    <include>**/*.groovy</include>
                  </includes>
                </fileset>
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <dependencies>
          <dependency>
            <groupId>org.juzu</groupId>
            <artifactId>juzu-bom-core</artifactId>
            <version>${project.version}</version>
          </dependency>
        </dependencies>
        <configuration>
          <attach>true</attach>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>single</goal>
            </goals>
            <phase>package</phase>
            <configuration>
              <descriptorRefs>
                <descriptorRef>tomcat-guice</descriptorRef>
                <descriptorRef>gatein</descriptorRef>
                <descriptorRef>liferay</descriptorRef>
                <descriptorRef>ee</descriptorRef>
              </descriptorRefs>
            </configuration>
          </execution>
        </executions>

      </plugin>

    </plugins>
  </build>

  <!-- Generates an executable jar with Tomcat -->
  <profiles>
    <profile>
      <id>exe</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.tomcat.maven</groupId>
            <artifactId>tomcat7-maven-plugin</artifactId>
            <version>2.1</version>
            <executions>
              <execution>
                <goals>
                  <goal>exec-war-only</goal>
                </goals>
                <phase>package</phase>
                <configuration>
                  <warRunDependencies>
                    <warRunDependency>
                      <dependency>
                        <groupId>org.juzu</groupId>
                        <artifactId>juzu-booking</artifactId>
                        <version>${project.version}</version>
                        <classifier>tomcat-guice</classifier>
                        <type>war</type>
                      </dependency>
                      <contextPath>/</contextPath>
                    </warRunDependency>
<!--
                    <warRunDependency>
                      <dependency>
                        <groupId>org.gatein.portal</groupId>
                        <artifactId>portal.web</artifactId>
                        <version>${project.version}</version>
                        <classifier>tomcat</classifier>
                        <type>war</type>
                      </dependency>
                      <contextPath>/portal</contextPath>
                    </warRunDependency>
                    <warRunDependency>
                      <dependency>
                        <groupId>org.gatein.portal</groupId>
                        <artifactId>org.gatein.portal.examples.portlets</artifactId>
                        <version>${project.version}</version>
                        <type>war</type>
                      </dependency>
                      <contextPath>/samples</contextPath>
                    </warRunDependency>
-->
                  </warRunDependencies>
<!--
                  <extraDependencies>
                    <extraDependency>
                      <groupId>javax.portlet</groupId>
                      <artifactId>portlet-api</artifactId>
                      <version>2.0</version>
                    </extraDependency>
                  </extraDependencies>
-->
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
