<?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>
    <name>Tapestry Build Core</name>
    <description>Parent POM for Tapestry Builds</description>
    <groupId>com.flowlogix</groupId>
    <artifactId>tapestry-build-core</artifactId>
    <packaging>pom</packaging>
    <version>1.2.6</version>
    
    <parent>
        <groupId>com.flowlogix</groupId>
        <artifactId>flowlogix</artifactId>
        <relativePath>../pom.xml</relativePath>
        <version>1.2.6</version>
    </parent>

    <properties>
        <war-deps.scope>compile</war-deps.scope>
        <tap.version>5.3.7</tap.version>
        <gwt.version>2.5.1</gwt.version>
        <guava.version>14.0.1</guava.version>
        <groovy.version>2.1.6</groovy.version>
        <gmaven.runtime>2.0</gmaven.runtime>
        <lombok.version>0.12.0</lombok.version>
    </properties>
        
    <profiles>
        <profile>
            <id>skinny-war</id>
            <properties>
                <war-deps.scope>provided</war-deps.scope>
            </properties>
        </profile>
        <profile>
            <id>self-contained</id>
            <properties>
                <war-deps.scope>compile</war-deps.scope>
            </properties>
        </profile>
    </profiles>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.11</version>
            <scope>test</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>com.google.gwt</groupId>
            <artifactId>gwt-servlet</artifactId>
            <version>${gwt.version}</version>
            <type>jar</type>
            <scope>${war-deps.scope}</scope>
            <exclusions>
                <exclusion>
                    <groupId>eclipse</groupId>
                    <artifactId>jdtcore</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>javax.alidation</groupId>
                    <artifactId>validation-api</artifactId>
                </exclusion>
                <exclusion>
                    <artifactId>json</artifactId>
                    <groupId>org.json</groupId>
                </exclusion>

            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.google.gwt</groupId>
            <artifactId>gwt-user</artifactId>
            <version>${gwt.version}</version>
            <type>jar</type>
            <scope>${war-deps.scope}</scope>
            <exclusions>
                <exclusion>
                    <groupId>eclipse</groupId>
                    <artifactId>jdtcore</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>javax.validation</groupId>
                    <artifactId>validation-api</artifactId>
                </exclusion>
                <exclusion>
                    <artifactId>json</artifactId>
                    <groupId>org.json</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.glassfish.main.extras</groupId>
            <artifactId>glassfish-embedded-all</artifactId>
            <version>4.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>javax</groupId>
            <artifactId>javaee-api</artifactId>
            <version>7.0</version>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <artifactId>activation</artifactId>
                    <groupId>javax.activation</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>javax.mail</artifactId>
                    <groupId>com.sun.mail</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>${lombok.version}</version>
            <type>jar</type>
            <scope>${war-deps.scope}</scope>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>${guava.version}</version>
            <scope>${war-deps.scope}</scope>
        </dependency>
        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
            <version>2.0.1</version>
            <scope>${war-deps.scope}</scope>
        </dependency>
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-all</artifactId>
            <version>${groovy.version}</version>
            <scope>${war-deps.scope}</scope>
        </dependency>
        <dependency>
            <groupId>org.codehaus.gmaven.runtime</groupId>
            <artifactId>gmaven-runtime-${gmaven.runtime}</artifactId>
            <version>1.5</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.tapestry</groupId>
            <artifactId>tapestry-core</artifactId>
            <version>${tap.version}</version>
            <type>jar</type>
            <scope>${war-deps.scope}</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.tapestry</groupId>
            <artifactId>tapestry-ioc</artifactId>
            <version>${tap.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-log4j12</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>log4j</groupId>
                    <artifactId>log4j</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>javassist</groupId>
                    <artifactId>javassist</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.testng</groupId>
                    <artifactId>testng</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>javax.inject</groupId>
                    <artifactId>javax.inject</artifactId>
                </exclusion>
            </exclusions>
            <type>jar</type>
            <scope>${war-deps.scope}</scope>
        </dependency>
        <dependency>
            <artifactId>plastic</artifactId>
            <groupId>org.apache.tapestry</groupId>
            <type>jar</type>
            <version>${tap.version}</version>
            <scope>${war-deps.scope}</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.tapestry</groupId>
            <artifactId>tapestry-func</artifactId>
            <version>${tap.version}</version>
            <type>jar</type>
            <scope>${war-deps.scope}</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.tapestry</groupId>
            <artifactId>tapestry-json</artifactId>
            <version>${tap.version}</version>
            <type>jar</type>
            <scope>${war-deps.scope}</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.tapestry</groupId>
            <artifactId>tapestry-jmx</artifactId>
            <version>${tap.version}</version>
            <type>jar</type>
            <scope>${war-deps.scope}</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.tapestry</groupId>
            <artifactId>tapestry-beanvalidator</artifactId>
            <version>${tap.version}</version>
            <scope>${war-deps.scope}</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.hibernate</groupId>
                    <artifactId>hibernate-validator</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>javax.validation</groupId>
                    <artifactId>validation-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.tapestry</groupId>
            <artifactId>tapestry-upload</artifactId>
            <version>${tap.version}</version>
            <type>jar</type>
            <scope>${war-deps.scope}</scope>
        </dependency>
        <dependency>
            <groupId>org.tynamo</groupId>
            <artifactId>tapestry-exceptionpage</artifactId>
            <version>0.1.2</version>
            <type>jar</type>
            <scope>${war-deps.scope}</scope>
        </dependency>
        <dependency>
            <groupId>org.tynamo</groupId>
            <artifactId>tapestry-security</artifactId>
            <version>0.5.1</version>
            <type>jar</type>
            <scope>${war-deps.scope}</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.shiro</groupId>
            <artifactId>shiro-core</artifactId>
            <version>1.2.2</version>
            <type>jar</type>
            <scope>${war-deps.scope}</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.shiro</groupId>
            <artifactId>shiro-web</artifactId>
            <version>1.2.2</version>
            <type>jar</type>
            <scope>${war-deps.scope}</scope>
        </dependency>
        <dependency>
            <groupId>org.javassist</groupId>
            <artifactId>javassist</artifactId>
            <version>3.18.0-GA</version>
            <type>jar</type>
            <scope>${war-deps.scope}</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.5</version>
            <type>jar</type>
            <scope>${war-deps.scope}</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-jdk14</artifactId>
            <version>1.7.5</version>
            <type>jar</type>
            <scope>${war-deps.scope}</scope>
        </dependency>
        <dependency>
            <groupId>org.antlr</groupId>
            <artifactId>antlr-runtime</artifactId>
            <version>3.5</version>
            <exclusions>
                <exclusion>
                    <groupId>org.antlr</groupId>
                    <artifactId>stringtemplate</artifactId>
                </exclusion>
            </exclusions>
            <type>jar</type>
            <scope>${war-deps.scope}</scope>
        </dependency>
    </dependencies>
    
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>default-cli</id>
                        <inherited>true</inherited>
                        <configuration>
                            <stripVersion>false</stripVersion>
                            <excludeTransitive>true</excludeTransitive>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.antlr</groupId>
                                    <artifactId>antlr-runtime</artifactId>
                                    <type>jar</type>
                                    <overWrite>true</overWrite>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>commons-beanutils</groupId>
                                    <artifactId>commons-beanutils</artifactId>
                                    <version>1.8.3</version>
                                    <type>jar</type>
                                    <overWrite>true</overWrite>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>commons-codec</groupId>
                                    <artifactId>commons-codec</artifactId>
                                    <version>1.8</version>
                                    <type>jar</type>
                                    <overWrite>true</overWrite>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>commons-fileupload</groupId>
                                    <artifactId>commons-fileupload</artifactId>
                                    <version>1.3</version>
                                    <type>jar</type>
                                    <overWrite>true</overWrite>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>commons-io</groupId>
                                    <artifactId>commons-io</artifactId>
                                    <version>2.4</version>
                                    <type>jar</type>
                                    <overWrite>true</overWrite>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>com.google.gwt</groupId>
                                    <artifactId>gwt-servlet</artifactId>
                                    <type>jar</type>
                                    <overWrite>true</overWrite>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>com.google.gwt</groupId>
                                    <artifactId>gwt-user</artifactId>
                                    <type>jar</type>
                                    <overWrite>true</overWrite>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.javassist</groupId>
                                    <artifactId>javassist</artifactId>
                                    <type>jar</type>
                                    <overWrite>true</overWrite>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.projectlombok</groupId>
                                    <artifactId>lombok</artifactId>
                                    <type>jar</type>
                                    <overWrite>true</overWrite>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>com.google.guava</groupId>
                                    <artifactId>guava</artifactId>
                                    <type>jar</type>
                                    <overWrite>true</overWrite>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>com.google.code.findbugs</groupId>
                                    <artifactId>jsr305</artifactId>
                                    <type>jar</type>
                                    <overWrite>true</overWrite>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.codehaus.groovy</groupId>
                                    <artifactId>groovy-all</artifactId>
                                    <type>jar</type>
                                    <overWrite>true</overWrite>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.apache.shiro</groupId>
                                    <artifactId>shiro-core</artifactId>
                                    <type>jar</type>
                                    <overWrite>true</overWrite>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.apache.shiro</groupId>
                                    <artifactId>shiro-web</artifactId>
                                    <type>jar</type>
                                    <overWrite>true</overWrite>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.slf4j</groupId>
                                    <artifactId>slf4j-api</artifactId>
                                    <type>jar</type>
                                    <overWrite>true</overWrite>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.slf4j</groupId>
                                    <artifactId>slf4j-jdk14</artifactId>
                                    <type>jar</type>
                                    <overWrite>true</overWrite>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.apache.tapestry</groupId>
                                    <artifactId>tapestry-core</artifactId>
                                    <type>jar</type>
                                    <overWrite>true</overWrite>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.apache.tapestry</groupId>
                                    <artifactId>plastic</artifactId>
                                    <type>jar</type>
                                    <overWrite>true</overWrite>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.apache.tapestry</groupId>
                                    <artifactId>tapestry-func</artifactId>
                                    <type>jar</type>
                                    <overWrite>true</overWrite>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.apache.tapestry</groupId>
                                    <artifactId>tapestry-ioc</artifactId>
                                    <type>jar</type>
                                    <overWrite>true</overWrite>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.apache.tapestry</groupId>
                                    <artifactId>tapestry5-annotations</artifactId>
                                    <version>${tap.version}</version>
                                    <type>jar</type>
                                    <overWrite>true</overWrite>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.apache.tapestry</groupId>
                                    <artifactId>tapestry-json</artifactId>
                                    <type>jar</type>
                                    <overWrite>true</overWrite>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.apache.tapestry</groupId>
                                    <artifactId>tapestry-jmx</artifactId>
                                    <type>jar</type>
                                    <overWrite>true</overWrite>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.apache.tapestry</groupId>
                                    <artifactId>tapestry-beanvalidator</artifactId>
                                    <type>jar</type>
                                    <overWrite>true</overWrite>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.apache.tapestry</groupId>
                                    <artifactId>tapestry-upload</artifactId>
                                    <type>jar</type>
                                    <overWrite>true</overWrite>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.tynamo</groupId>
                                    <artifactId>tapestry-exceptionpage</artifactId>
                                    <type>jar</type>
                                    <overWrite>true</overWrite>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.tynamo</groupId>
                                    <artifactId>tapestry-security</artifactId>
                                    <type>jar</type>
                                    <overWrite>true</overWrite>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.tynamo</groupId>
                                    <artifactId>tynamo-common</artifactId>
                                    <version>0.0.3</version>
                                    <type>jar</type>
                                    <overWrite>true</overWrite>
                                </artifactItem>
                            </artifactItems>
                            <outputDirectory>${project.build.directory}/deps</outputDirectory>
                            <overWriteReleases>false</overWriteReleases>
                            <overWriteSnapshots>true</overWriteSnapshots>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.15</version>
                <configuration>
                    <includes>
                        <include>**/test/**</include>                     
                    </includes>
                </configuration>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>buildnumber-maven-plugin</artifactId>
                    <version>1.2</version>
                    <executions>
                        <execution>
                            <id>buildid</id>
                            <phase>generate-resources</phase>
                            <goals>
                                <goal>hgchangeset</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.gmaven</groupId>
                    <artifactId>gmaven-plugin</artifactId>
                    <version>1.5</version>
                    <executions>
                        <execution>
                            <id>compile</id>
                            <goals>
                                <goal>generateStubs</goal>
                                <goal>compile</goal>
                            </goals>
                            <configuration>
                                <sources>
                                    <fileset>
                                        <directory>${pom.basedir}/src/main/groovy</directory>
                                        <includes>
                                            <include>**/*.groovy</include>
                                        </includes>
                                    </fileset>
                                </sources>
                            </configuration>
                        </execution>
                        <execution>
                            <id>test-compile</id>
                            <goals>
                                <goal>generateTestStubs</goal>
                                <goal>testCompile</goal>
                            </goals>
                            <configuration>
                                <sources>
                                    <fileset>
                                        <directory>${pom.basedir}/src/test/groovy</directory>
                                        <includes>
                                            <include>**/*.groovy</include>
                                        </includes>
                                    </fileset>
                                </sources>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>    
</project>
