<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>au.org.ala</groupId>
        <artifactId>ala-parent-pom</artifactId>
        <version>1.0</version>
    </parent>

    <groupId>au.org.ala</groupId>
    <artifactId>biocache-store</artifactId>
    <version>1.5</version>
    <url>http://biocache.ala.org.au</url>
    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/AtlasOfLivingAustralia/biocache-store/issues</url>
    </issueManagement>
    <ciManagement>
        <system>Travis</system>
        <url>http://travis-ci.org/AtlasOfLivingAustralia/biocache-store/</url>
    </ciManagement>
    <inceptionYear>2011</inceptionYear>
    <name>biocache-store</name>
    <properties>
        <scala.version>2.10.4</scala.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <org.springframework.version>3.0.6.RELEASE</org.springframework.version>
        <solr.version>4.4.0</solr.version>
        <jts.version>1.12</jts.version>
    </properties>
    <description>
        Scala implementation of biocache backend.
        This code base manages the loading, processing, sampling and indexing of occurrence records for the ALA.
        There are additional tools to support outlier detection, duplicate detection and extra-limital outliers.
    </description>
    <scm>
        <connection>scm:git:git@github.com:AtlasOfLivingAustralia/biocache-store.git</connection>
        <url>https://github.com/AtlasOfLivingAustralia/biocache-store</url>
        <developerConnection>scm:git:git@github.com:AtlasOfLivingAustralia/biocache-store.git</developerConnection>
        <tag>biocache-store-1.5</tag>
    </scm>
    <dependencies>
        <dependency>
            <groupId>postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <version>9.1-901.jdbc3</version>
        </dependency>
        <dependency>
            <groupId>com.typesafe.slick</groupId>
            <artifactId>slick_2.10</artifactId>
            <version>1.0.1</version>
        </dependency>
        <dependency>
            <groupId>com.github.tminglei</groupId>
            <artifactId>slick-pg_2.10.1</artifactId>
            <version>0.1.3</version>
        </dependency>
        <!-- layers store -->
        <dependency>
            <groupId>org.ala.layers</groupId>
            <artifactId>layers-store</artifactId>
            <version>1.0</version>
            <exclusions>
                <exclusion>
                    <artifactId>xercesImpl</artifactId>
                    <groupId>xerces</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>xercesImpl</artifactId>
                    <groupId>xerces</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.mockrunner</groupId>
            <artifactId>mockrunner</artifactId>
            <version>0.3.6</version>
        </dependency>
        <!-- Spring Framework - required by layers-store -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-core</artifactId>
            <version>${org.springframework.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <version>${org.springframework.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context-support</artifactId>
            <version>${org.springframework.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jdbc</artifactId>
            <version>${org.springframework.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-orm</artifactId>
            <version>${org.springframework.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-oxm</artifactId>
            <version>${org.springframework.version}</version>
        </dependency>
        <!-- LOG4J -->
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.16</version>
        </dependency>
        <!-- SL4J -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>1.7.5</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.5</version>
        </dependency>
        <!-- for cmd tool -->
        <dependency>
            <groupId>org.apache.ant</groupId>
            <artifactId>ant</artifactId>
            <version>1.8.2</version>
        </dependency>
        <!-- ALA SDS point generalising -->
        <dependency>
            <groupId>au.org.ala</groupId>
            <artifactId>sds</artifactId>
            <version>1.2</version>
            <exclusions>
                <exclusion>
                    <groupId>commons-lang</groupId>
                    <artifactId>commons-lang</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>jcl-over-slf4j</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-log4j12</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>au.org.ala</groupId>
                    <artifactId>ala-name-matching</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <!-- ALA Name matching -->
        <dependency>
            <groupId>au.org.ala</groupId>
            <artifactId>ala-name-matching</artifactId>
            <version>2.0</version>
            <exclusions>
                <exclusion>
                    <groupId>org.gbif</groupId>
                    <artifactId>dwc-archive</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>jaxen</groupId>
                    <artifactId>jaxen</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.lucene</groupId>
                    <artifactId>lucene-core</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.lucene</groupId>
                    <artifactId>lucene-analyzers</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.lucene</groupId>
                    <artifactId>lucene-analyzers-common</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.lucene</groupId>
                    <artifactId>lucene-queryparser</artifactId>
                </exclusion>
                <exclusion>
                    <artifactId>org.slf4j</artifactId>
                    <groupId>slf4j-api</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <!-- DWC-A -->
        <dependency>
            <groupId>org.gbif</groupId>
            <artifactId>dwca-reader</artifactId>
            <version>1.21</version>
            <exclusions>
                <exclusion>
                    <groupId>commons-io</groupId>
                    <artifactId>commons-io</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <!-- Google Commons -->
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>13.0.1</version>
        </dependency>
        <!-- Google Guice -->
        <dependency>
            <groupId>com.google.inject</groupId>
            <artifactId>guice</artifactId>
            <version>2.0</version>
        </dependency>
        <!-- Jackson (JSON serialisation) -->
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
            <version>2.4.1</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>2.4.1.1</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.module</groupId>
            <artifactId>jackson-module-scala_2.10</artifactId>
            <version>2.3.3</version>
        </dependency>
        <!-- SCALA -->
        <dependency>
            <groupId>org.scala-lang</groupId>
            <artifactId>scala-library</artifactId>
            <version>${scala.version}</version>
        </dependency>
        <dependency>
            <groupId>org.scala-lang</groupId>
            <artifactId>scala-actors</artifactId>
            <version>${scala.version}</version>
        </dependency>
        <dependency>
            <groupId>org.scala-lang</groupId>
            <artifactId>scala-reflect</artifactId>
            <version>${scala.version}</version>
        </dependency>
        <!-- SCALATEST -->
        <dependency>
            <groupId>org.scalatest</groupId>
            <artifactId>scalatest_2.10</artifactId>
            <version>1.9</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.8.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>net.lingala.zip4j</groupId>
            <artifactId>zip4j</artifactId>
            <version>1.3.2</version>
        </dependency>
        <!-- Pelops library for cassandra 0.7.x Note the name has been changed
            so that this library is pulled from the ALA repo copy -->
        <dependency>
            <groupId>org.scale7</groupId>
            <artifactId>scale7-pelops</artifactId>
            <version>1.3-1.0.x</version>
            <exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <!-- SFTP -->
        <dependency>
            <groupId>com.jcraft</groupId>
            <artifactId>jsch</artifactId>
            <version>0.1.42</version>
        </dependency>
        <dependency>
            <groupId>org.rev6</groupId>
            <artifactId>SecureChannelFacade</artifactId>
            <version>0.2</version>
            <exclusions>
                <exclusion>
                    <groupId>com.jcroft</groupId>
                    <artifactId>jsch</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <!-- SOLR -->
        <dependency>
            <artifactId>solr-core</artifactId>
            <groupId>org.apache.solr</groupId>
            <version>${solr.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>jcl-over-slf4j</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-jdk14</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.hadoop</groupId>
                    <artifactId>hadoop-annotations</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.hadoop</groupId>
                    <artifactId>hadoop-common</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.hadoop</groupId>
                    <artifactId>hadoop-hdfs</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.hadoop</groupId>
                    <artifactId>hadoop-annotations</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.hadoop</groupId>
                    <artifactId>hadoop-annotations</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <artifactId>solr-solrj</artifactId>
            <groupId>org.apache.solr</groupId>
            <version>${solr.version}</version>
        </dependency>
        <!--
           The following dependency is required for a SOLR embedded service only
           See http://lucene.472066.n3.nabble.com/EmbeddedSolrServer-java-lang-NoClassDefFoundError-javax-servlet-ServletRequest-td483937.html
         -->
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>2.5</version>
        </dependency>
        <dependency>
            <groupId>com.vividsolutions</groupId>
            <artifactId>jts</artifactId>
            <version>${jts.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>xerces</groupId>
                    <artifactId>xercesImpl</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <!-- COMMONS -->
        <dependency>
            <groupId>commons-httpclient</groupId>
            <artifactId>commons-httpclient</artifactId>
            <version>3.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>3.1</version>
        </dependency>
        <dependency>
            <groupId>com.jayway.jsonpath</groupId>
            <artifactId>json-path</artifactId>
            <version>0.9.1</version>
        </dependency>
        <!-- Contrib classes for http client project. These are available in the source
            but not distributed as part of the default jar. They were built into a separate
            jar and manually installed into the ala maven repository. -->
        <dependency>
            <groupId>commons-httpclient</groupId>
            <artifactId>commons-httpclient-contrib</artifactId>
            <version>3.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-compress</artifactId>
            <version>1.2</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-math3</artifactId>
            <version>3.0</version>
        </dependency>
        <!-- Added for cassandra test -->
        <dependency>
            <groupId>org.cliffc.high_scale_lib</groupId>
            <artifactId>high-scale-lib</artifactId>
            <version>1.0</version>
        </dependency>
        <dependency>
            <groupId>com.googlecode.concurrentlinkedhashmap</groupId>
            <artifactId>concurrentlinkedhashmap-lru</artifactId>
            <version>1.1</version>
        </dependency>
        <dependency>
            <groupId>metadata-extractor</groupId>
            <artifactId>metadata-extractor</artifactId>
            <version>2.5.0-RC3</version>
        </dependency>
        <dependency>
            <groupId>xmpcore</groupId>
            <artifactId>xmpcore</artifactId>
            <version>1.0</version>
        </dependency>
        <!-- Sun's Java Advance Imaging API -->
        <dependency>
            <groupId>javax.media</groupId>
            <artifactId>jai-core</artifactId>
            <version>1.1.3</version>
        </dependency>
        <dependency>
            <groupId>javax.media</groupId>
            <artifactId>jai-codec</artifactId>
            <version>1.1.3</version>
        </dependency>
        <dependency>
            <groupId>javax.media</groupId>
            <artifactId>jai-imageio</artifactId>
            <version>1.1</version>
        </dependency>
        <!-- geotools GML support. Other geotools libraries imported via the depenency on ala layers-store -->
        <dependency>
            <groupId>org.geotools.xsd</groupId>
            <artifactId>gt-xsd-gml3</artifactId>
            <version>2.7.5</version>
        </dependency>
        <dependency>
            <groupId>org.geotools</groupId>
            <artifactId>gt-epsg-hsql</artifactId>
            <version>2.7.5</version>
        </dependency>
        <!-- htmlunit to help with screen scraping -->
        <dependency>
            <groupId>net.sourceforge.htmlunit</groupId>
            <artifactId>htmlunit</artifactId>
            <version>2.5</version>
        </dependency>
    </dependencies>
    <organization>
        <name>Atlas of Living Australia</name>
        <url>http://www.ala.org.au</url>
    </organization>
    <build>
        <sourceDirectory>src/main/scala</sourceDirectory>
        <testSourceDirectory>src/test/scala</testSourceDirectory>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.1</version>
                </plugin>
                <plugin>
                    <groupId>com.github.koraktor</groupId>
                    <artifactId>mavanagaiata</artifactId>
                    <version>0.7.0</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
    <reporting>
        <plugins>
            <plugin>
                <groupId>org.scala-tools</groupId>
                <artifactId>maven-scala-plugin</artifactId>
            </plugin>
        </plugins>
    </reporting>
    <profiles>
        <profile>
            <id>default</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <build>
            <plugins>
                <plugin>
                    <groupId>com.github.koraktor</groupId>
                    <artifactId>mavanagaiata</artifactId>
                    <version>0.3.1</version>
                    <executions>
                        <execution>
                            <id>git-commit</id>
                            <phase>validate</phase>
                            <goals>
                                <goal>commit</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.scala-tools</groupId>
                    <artifactId>maven-scala-plugin</artifactId>
                    <version>2.15.2</version>
                    <executions>
                        <execution>
                            <id>scala-compile-first</id>
                            <phase>process-resources</phase>
                            <goals>
                                <goal>add-source</goal>
                                <goal>compile</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>scala-test-compile</id>
                            <phase>process-test-resources</phase>
                            <goals>
                                <goal>testCompile</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <checkMultipleScalaVersions>false</checkMultipleScalaVersions>
                        <scalaVersion>${scala.version}</scalaVersion>
                        <args>
                            <arg>-target:jvm-1.6</arg>
                            <arg>-deprecation</arg>
                            <arg>-nowarn</arg>
                        </args>
                        <jvmArgs>
                            <jvmArg>-Xmx2G</jvmArg>
                        </jvmArgs>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>copy-dependencies</id>
                            <phase>prepare-package</phase>
                            <goals>
                                <goal>copy-dependencies</goal>
                            </goals>
                            <configuration>
                                <outputDirectory>${project.build.directory}/lib</outputDirectory>
                                <overWriteReleases>false</overWriteReleases>
                                <overWriteSnapshots>false</overWriteSnapshots>
                                <overWriteIfNewer>true</overWriteIfNewer>
                            </configuration>
                        </execution>
                      </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>2.4</version>
                    <configuration>
                        <archive>
                            <manifest>
                                <addClasspath>true</addClasspath>
                                <classpathPrefix>lib/</classpathPrefix>
                                <mainClass>au.org.ala.biocache.cmd.CMD2</mainClass>
                            </manifest>
                            <manifestEntries>
                                <gitCommitID>${mavanagaiata.commit.id}</gitCommitID>
                                <gitCommitAuthor>${mavanagaiata.commit.author.name}</gitCommitAuthor>
                                <gitCommitAuthor>${mvngit.commit.author.name}</gitCommitAuthor>
                                <gitCommitAuthorEmail>${mvngit.commit.author.email}</gitCommitAuthorEmail>
                                <gitCommitter>${mavanagaiata.commit.committer.name}</gitCommitter>
                                <gitCommitterEmail>${mavanagaiata.commit.committer.email}</gitCommitterEmail>
                                <gitCommitSummary>${mavanagaiata.commit.abbrev}</gitCommitSummary>
                                <buildTimestamp>${maven.build.timestamp}</buildTimestamp>
                                <sha1>${mavanagaiata.commit.sha}</sha1>
                                <Implementation-Version>${mvngit.commit.id}</Implementation-Version>
                                <Implementation-Title>Biocache</Implementation-Title>
                                <Comment>Manages the loading, processing, sampling and indexing of occurrence records.</Comment>
                                <Implementation-Vendor>Atlas of Living Australia</Implementation-Vendor>
                                <Implementation-Vendor-Id>au.org.ala</Implementation-Vendor-Id>
                            </manifestEntries>
                        </archive>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <configuration>
                        <compilerArgument>-Xlint:all</compilerArgument>
                        <showWarnings>true</showWarnings>
                        <showDeprecation>true</showDeprecation>
                    </configuration>
                    <executions>
                        <execution>
                            <phase>compile</phase>
                            <goals>
                                <goal>compile</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>2.5</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <configuration>
                        <descriptors>
                            <descriptor>src/assembly/assembly.xml</descriptor>
                        </descriptors>
                        <archive>
                            <manifest>
                                <addClasspath>true</addClasspath>
                                <classpathPrefix>lib/</classpathPrefix>
                                <mainClass>au.org.ala.biocache.cmd.CMD2</mainClass>
                            </manifest>
                        </archive>
                    </configuration>
                    <executions>
                        <execution>
                            <phase>package</phase>
                            <goals>
                                <goal>single</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
        </plugins>
            </build>
        </profile>
        <profile>
            <!-- profile gets activated by travis and (crucially) skips the git-commit plugin -->
            <id>travis</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.scala-tools</groupId>
                        <artifactId>maven-scala-plugin</artifactId>
                        <version>2.15.2</version>
                        <executions>
                            <execution>
                                <id>scala-compile-first</id>
                                <phase>process-resources</phase>
                                <goals>
                                    <goal>add-source</goal>
                                    <goal>compile</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>scala-test-compile</id>
                                <phase>process-test-resources</phase>
                                <goals>
                                    <goal>testCompile</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <checkMultipleScalaVersions>false</checkMultipleScalaVersions>
                            <scalaVersion>${scala.version}</scalaVersion>
                            <args>
                                <arg>-target:jvm-1.6</arg>
                                <arg>-deprecation</arg>
                                <arg>-nowarn</arg>
                            </args>
                            <jvmArgs>
                                <jvmArg>-Xmx2G</jvmArg>
                            </jvmArgs>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-jar-plugin</artifactId>
                        <version>2.4</version>
                        <configuration>
                            <archive>
                                <manifest>
                                    <addClasspath>true</addClasspath>
                                    <classpathPrefix>lib/</classpathPrefix>
                                    <mainClass>au.org.ala.biocache.cmd.CMD2</mainClass>
                                </manifest>
                            </archive>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
