<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>
    <parent>
        <groupId>ch.ledcom</groupId>
        <artifactId>ledcom-parent-pom</artifactId>
        <version>1.8</version>
    </parent>
    <groupId>ch.ledcom.tomcat.valves</groupId>
    <artifactId>tomcat-valves</artifactId>
    <version>0.4</version>
    <name>Tomcat Valves</name>

    <description>
        A few valves to help debug special cases in Tomcat.
    </description>
    <url>http://gehel.github.com/tomcat-valves/</url>
    <inceptionYear>2013</inceptionYear>

    <dependencies>
        <dependency>
            <groupId>org.apache.tomcat</groupId>
            <artifactId>catalina</artifactId>
            <version>6.0.37</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>14.0.1</version>
        </dependency>
        <dependency>
            <groupId>com.google.code.java-allocation-instrumenter</groupId>
            <artifactId>java-allocation-instrumenter</artifactId>
            <version>2.1</version>
        </dependency>
        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
            <version>2.0.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.11</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>2.8</version>
                <executions>
                    <execution>
                        <id>copy-agent</id>
                        <phase>process-test-classes</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>com.google.code.java-allocation-instrumenter</groupId>
                                    <artifactId>java-allocation-instrumenter</artifactId>
                                    <version>2.1</version>
                                    <outputDirectory>${project.build.directory}/agents</outputDirectory>
                                    <destFileName>allocation.jar</destFileName>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.17</version>
                <configuration>
                    <argLine>-javaagent:${project.build.directory}/agents/allocation.jar</argLine>
                </configuration> <dependencies>
                <dependency>
                    <groupId>org.apache.maven.surefire</groupId>
                    <!-- Use the older JUnit 4 provider -->
                    <artifactId>surefire-junit4</artifactId>
                    <version>2.8</version>
                </dependency>
            </dependencies>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>2.1</version>
                <configuration>
                    <!-- put your configurations here -->
                </configuration>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <createDependencyReducedPom>false</createDependencyReducedPom>
                            <relocations>
                                <relocation>
                                    <pattern>com.google.common</pattern>
                                    <shadedPattern>ch.ledcom.tomcat.valves.guava</shadedPattern>
                                </relocation>
                            </relocations>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/gehel/tomcat-valves/issues</url>
    </issueManagement>

    <scm>
        <connection>scm:git:git://github.com/tomcat-valves/redirect.git</connection>
        <developerConnection>scm:git:ssh://git@github.com/gehel/tomcat-valves.git</developerConnection>
        <url>https://github.com/gehel/tomcat-valves</url>
    </scm>
</project>
