<!-- ~ Copyright 2010-2011 Ning, Inc. ~ ~ Ning licenses this file to you
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/xsd/maven-4.0.0.xsd">
    <parent>
        <groupId>com.ning</groupId>
        <artifactId>metrics.base-pom</artifactId>
        <version>0.1.12</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.ning</groupId>
    <artifactId>metrics.collector</artifactId>
    <packaging>jar</packaging>
    <version>2.0.16</version>
    <name>collector</name>
    <description>Event Collector core</description>
    <url>http://github.com/ning/collector</url>
    <scm>
        <connection>scm:git:git://github.com/ning/collector.git</connection>
        <developerConnection>scm:git:git@github.com:ning/collector.git</developerConnection>
        <url>http://github.com/ning/collector/tree/master</url>
        <tag>metrics.collector-2.0.16</tag>
    </scm>
    <repositories>
        <repository>
            <id>cloudera</id>
            <url>https://repository.cloudera.com/content/repositories/releases/</url>
        </repository>
        <repository>
            <id>file-based-repo-for-external-libs</id>
            <url>file://${basedir}/lib</url>
        </repository>
    </repositories>
    <dependencies>
        <dependency>
            <groupId>asm</groupId>
            <artifactId>asm</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.jaxrs</groupId>
            <artifactId>jackson-jaxrs-json-provider</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>javax.ws.rs</groupId>
                    <artifactId>jsr311-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.dataformat</groupId>
            <artifactId>jackson-dataformat-smile</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <!-- Marked as provided by goodwill-access -->
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>15.0</version>
        </dependency>
        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
            <version>1.3.9</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.inject</groupId>
            <artifactId>guice</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.inject.extensions</groupId>
            <artifactId>guice-multibindings</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.inject.extensions</groupId>
            <artifactId>guice-servlet</artifactId>
        </dependency>
        <dependency>
            <groupId>com.googlecode.jsendnsca</groupId>
            <artifactId>jsendnsca</artifactId>
            <version>2.1-RC1</version>
        </dependency>
        <dependency>
            <groupId>com.mogwee</groupId>
            <artifactId>mogwee-executors</artifactId>
        </dependency>
        <dependency>
            <groupId>com.ning</groupId>
            <artifactId>async-http-client</artifactId>
        </dependency>
        <dependency>
            <groupId>com.ning</groupId>
            <artifactId>compress-lzf</artifactId>
        </dependency>
        <dependency>
            <groupId>com.ning</groupId>
            <artifactId>metrics.goodwill-access</artifactId>
        </dependency>
        <dependency>
            <groupId>com.ning</groupId>
            <artifactId>metrics.serialization-common</artifactId>
        </dependency>
        <dependency>
            <groupId>com.ning</groupId>
            <artifactId>metrics.serialization-common</artifactId>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.ning</groupId>
            <artifactId>metrics.serialization-hadoop</artifactId>
            <exclusions>
                <!-- Hadoop ships with jackson 1.4.2 for its servlets - we don't need
                it -->
                <exclusion>
                    <groupId>org.codehaus.jackson</groupId>
                    <artifactId>jackson-core-asl</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.codehaus.jackson</groupId>
                    <artifactId>jackson-mapper-asl</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.ning</groupId>
            <artifactId>metrics.serialization-smile</artifactId>
        </dependency>
        <dependency>
            <groupId>com.ning</groupId>
            <artifactId>metrics.serialization-thrift</artifactId>
        </dependency>
        <dependency>
            <groupId>com.ning</groupId>
            <artifactId>metrics.serialization-writer</artifactId>
        </dependency>
        <dependency>
            <groupId>com.ning</groupId>
            <artifactId>metrics.serialization-writer</artifactId>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.ning</groupId>
            <artifactId>nagios</artifactId>
        </dependency>
        <dependency>
            <groupId>com.ning.arecibo</groupId>
            <artifactId>arecibo-jmx</artifactId>
        </dependency>
        <dependency>
            <groupId>com.ning.arecibo</groupId>
            <artifactId>arecibo-metrics</artifactId>
        </dependency>
        <dependency>
            <groupId>com.sun.jersey</groupId>
            <artifactId>jersey-core</artifactId>
        </dependency>
        <dependency>
            <!-- Required at compile time for PackagesResourceConf -->
            <groupId>com.sun.jersey</groupId>
            <artifactId>jersey-server</artifactId>
        </dependency>
        <dependency>
            <groupId>com.sun.jersey.contribs</groupId>
            <artifactId>jersey-guice</artifactId>
        </dependency>
        <dependency>
            <groupId>com.yammer.metrics</groupId>
            <artifactId>metrics-core</artifactId>
        </dependency>
        <dependency>
            <groupId>com.yammer.metrics</groupId>
            <artifactId>metrics-guice</artifactId>
        </dependency>
        <dependency>
            <groupId>com.yammer.metrics</groupId>
            <artifactId>metrics-servlet</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
        </dependency>
        <dependency>
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.activemq</groupId>
            <artifactId>activemq-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-math</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.specs</groupId>
            <artifactId>geronimo-jms_1.1_spec</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.hadoop</groupId>
            <artifactId>hadoop-core</artifactId>
            <exclusions>
                <exclusion>
                    <!-- Ignore transitive dependency on the older artifact, commons-beanutils:commons-beanutils-core
                    is pulled in -->
                    <groupId>commons-beanutils</groupId>
                    <artifactId>commons-beanutils</artifactId>
                </exclusion>
                <exclusion>
                    <!-- commons-beanutils:commons-beanutils-core bundles commons-collections
                    :( -->
                    <groupId>commons-collections</groupId>
                    <artifactId>commons-collections</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.shiro</groupId>
            <artifactId>shiro-web</artifactId>
            <exclusions>
                <exclusion>
                    <!-- Ignore transitive dependency on the older artifact, commons-beanutils:commons-beanutils-core
                    is pulled in -->
                    <groupId>commons-beanutils</groupId>
                    <artifactId>commons-beanutils</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.thrift</groupId>
            <artifactId>libfb303</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.thrift</groupId>
            <artifactId>libthrift</artifactId>
        </dependency>
        <dependency>
            <groupId>org.atmosphere</groupId>
            <artifactId>atmosphere-guice</artifactId>
        </dependency>
        <dependency>
            <groupId>org.atmosphere</groupId>
            <artifactId>atmosphere-jersey</artifactId>
        </dependency>
        <!-- Set the jackson version for transitive dependencies -->
        <dependency>
            <groupId>org.codehaus.jackson</groupId>
            <artifactId>jackson-core-asl</artifactId>
            <version>1.9.5</version>
        </dependency>
        <dependency>
            <groupId>org.codehaus.jackson</groupId>
            <artifactId>jackson-mapper-asl</artifactId>
            <version>1.9.5</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-jmx</artifactId>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-server</artifactId>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-servlet</artifactId>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-util</artifactId>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-websocket</artifactId>
        </dependency>
        <dependency>
            <groupId>org.skife.config</groupId>
            <artifactId>config-magic</artifactId>
            <version>0.17</version>
        </dependency>
        <dependency>
            <!-- For Hadoop and ActiveMQ -->
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <!-- For Jersey -->
            <groupId>org.slf4j</groupId>
            <artifactId>jul-to-slf4j</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
        </dependency>
        <dependency>
            <groupId>org.weakref</groupId>
            <artifactId>jmxutils</artifactId>
        </dependency>
        <!-- test -->
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <scope>test</scope>
        </dependency>
        <!-- f5 dependencies are in a file repository -->
        <!-- Make sure you have <mirrorOf>external:*</mirrorOf> in your ~/.m2/settings.xml,
        not <mirrorOf>*</mirrorOf> -->
        <dependency>
            <groupId>f5</groupId>
            <artifactId>icontrol</artifactId>
            <version>10.2</version>
        </dependency>
        <!-- A copy can be found under lib/f5/3rdparty (shipped in the distribution) -->
        <dependency>
            <groupId>org.apache.axis</groupId>
            <artifactId>axis</artifactId>
            <version>1.4</version>
        </dependency>
        <dependency>
            <groupId>org.jdbi</groupId>
            <artifactId>jdbi</artifactId>
            <version>2.48.2</version>
        </dependency>

        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>5.1.24</version>
        </dependency>

        <dependency>
            <groupId>com.mysql</groupId>
            <artifactId>management</artifactId>
            <version>5.0.11</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.mysql</groupId>
            <artifactId>management-dbfiles</artifactId>
            <version>5.0.11</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.ning.jetty</groupId>
            <artifactId>ning-service-skeleton-jdbi</artifactId>
            <version>0.1.7</version>
        </dependency>
        <dependency>
            <groupId>com.mchange</groupId>
            <artifactId>c3p0</artifactId>
            <version>0.9.2.1</version>
        </dependency>

        <dependency>
            <groupId>org.quartz-scheduler</groupId>
            <artifactId>quartz</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>c3p0</groupId>
                    <artifactId>c3p0</artifactId>
                </exclusion>
            </exclusions>
            <version>2.2.1</version>
        </dependency>
        <dependency>
            <groupId>org.quartz-scheduler</groupId>
            <artifactId>quartz-jobs</artifactId>
            <version>2.2.1</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.6.6</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.datatype</groupId>
            <artifactId>jackson-datatype-joda</artifactId>
            <version>2.0.0</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.datatype</groupId>
            <artifactId>jackson-datatype-guava</artifactId>
            <version>2.0.0</version>
        </dependency>
        <dependency>
            <groupId>axis</groupId>
            <artifactId>axis-jaxrpc</artifactId>
            <version>1.3</version>
        </dependency>
    </dependencies>
    <build>
        <resources>
            <resource>
                <directory>src/main/webapp</directory>
                <targetPath>webapp</targetPath>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
                <excludes>
                    <exclude>log4j.xml</exclude>
                    <exclude>shiro.ini</exclude>
                </excludes>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                    <additionalparam>-Xdoclint:none</additionalparam>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5</version>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <useReleaseProfile>false</useReleaseProfile>
                    <releaseProfiles>release</releaseProfiles>
                    <goals>deploy</goals>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <executions>
                    <execution>
                        <id>assemble-metrics-collector</id>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <phase>package</phase>
                        <configuration>
                            <transformers>
                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                    <mainClass>com.ning.metrics.collector.StandaloneCollectorServer</mainClass>
                                </transformer>
                            </transformers>
                            <createSourcesJar>true</createSourcesJar>
                            <shadedArtifactAttached>true</shadedArtifactAttached>
                            <shadedClassifierName>jar-with-dependencies</shadedClassifierName>
                            <filters>
                                <filter>
                                    <artifact>${project.groupId}:${project.artifactId}</artifact>
                                    <excludes>
                                        <exclude>log4j.xml</exclude>
                                    </excludes>
                                </filter>
                            </filters>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.rat</groupId>
                <artifactId>apache-rat-plugin</artifactId>
                <version>0.7</version>
                <executions>
                    <execution>
                        <phase>verify</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                        <configuration>
                            <excludes>
                                <!-- For some reason, useIdeaDefaultExcludes doesn't pick up .idea directory -->
                                <exclude>.idea/**</exclude>
                                <exclude>.git/**</exclude>
                                <exclude>.gitignore</exclude>
                                <exclude>README.*</exclude>
                                <exclude>API.txt</exclude>
                                <exclude>RELEASE.sh</exclude>
                                <exclude>deploy.sh</exclude>
                                <exclude>run.sh</exclude>
                                <exclude>run-local.sh</exclude>
                                <exclude>release-script</exclude>
                                <exclude>doc/**</exclude>
                                <exclude>src/site/**</exclude>
                                <exclude>**/*.log</exclude>
                                <!-- Exclude test data -->
                                <exclude>**/*.json</exclude>
                                <exclude>**/*.thrift</exclude>
                                <exclude>**/*.csv</exclude>
                                <exclude>**/*.txt</exclude>
                                <!-- We have some extra dependencies in there, see license on a per file basis -->
                                <exclude>src/utils/**</exclude>
                                <!-- This is a straight import from the upstream libraries -->
                                <exclude>lib/**</exclude>
                                <!-- rat doesn't parse MIT -->
                                <exclude>**/*.js</exclude>
                                <!-- Ignore temporary files from shade plugin - required for multi-modules builds -->
                                <exclude>**/dependency-reduced-pom.xml</exclude>
                                <!-- Ignore eventtracker default spool directory -->
                                <exclude>.diskspool/**</exclude>
                                <exclude>dev/**</exclude>
                                <exclude>.travis.yml</exclude>
                                <exclude>**/*.sql</exclude>
                                <exclude>**/*.properties</exclude>
                                <!-- Ignore Netbeans IDE files -->
                                <exclude>**/.netbeans_automatic_build</exclude>
                            </excludes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <issueManagement>
        <system>Github</system>
        <url>http://github.com/ning/collector/issues</url>
    </issueManagement>
</project>
