<?xml version="1.0"?>
<!-- Licensed to David Pilato (the "Author") under one or more contributor 
	license agreements. See the NOTICE file distributed with this work for additional 
	information regarding copyright ownership. Author 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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>fr.pilato.elasticsearch.river</groupId>
    <artifactId>fsriver</artifactId>
    <packaging>jar</packaging>
    <version>1.3.1</version>
    <name>Elasticsearch File System River Plugin</name>
    <url>https://github.com/dadoonet/fsriver/</url>
    <description>FS River Plugin offers a simple way to index local files into elasticsearch.</description>

    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>7</version>
    </parent>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <properties>
        <elasticsearch.version>1.3.1</elasticsearch.version>
        <tika.version>1.5</tika.version>
        <poi.version>3.10.1</poi.version>
        <lucene.version>4.9.0</lucene.version>
        <tests.output>onerror</tests.output>
        <tests.shuffle>true</tests.shuffle>
        <tests.output>onerror</tests.output>
        <tests.client.ratio></tests.client.ratio>
        <tests.jvm.argline></tests.jvm.argline>
        <es.logger.level>INFO</es.logger.level>
        <es.config>${project.build.testOutputDirectory}/elasticsearch.yml</es.config>
    </properties>

    <developers>
        <developer>
            <id>dadoonet</id>
            <name>David Pilato</name>
            <email>david@pilato.fr</email>
            <url>http://dev.david.pilato.fr/</url>
            <timezone>+1</timezone>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git@github.com:dadoonet/fsriver.git</connection>
        <url>scm:git:git@github.com:dadoonet/fsriver.git</url>
        <developerConnection>scm:git:git@github.com:dadoonet/fsriver.git</developerConnection>
    </scm>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/dadoonet/fsriver/issues/</url>
    </issueManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.8</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.1.2</version>
            </plugin>
            <!-- Add/Edit items in META-INF/MANIFEST.MF -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.3.2</version>
            </plugin>
            <!-- Copy dependencies into lib folder -->
            <!-- To see full classpath use  mvn dependency:build-classpath -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>2.3</version>
                <executions>
                    <execution>
                        <id>copy-dependencies</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/lib</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.carrotsearch.randomizedtesting</groupId>
                <artifactId>junit4-maven-plugin</artifactId>
                <version>2.0.14</version>
                <executions>
                    <execution>
                        <id>tests</id>
                        <phase>test</phase>
                        <goals>
                            <goal>junit4</goal>
                        </goals>
                        <configuration>
                            <heartbeat>20</heartbeat>
                            <jvmOutputAction>pipe,warn</jvmOutputAction>
                            <leaveTemporary>true</leaveTemporary>
                            <listeners>
                                <report-ant-xml mavenExtensions="true"
                                                dir="${project.build.directory}/surefire-reports"/>
                                <report-text
                                        showThrowable="true"
                                        showStackTraces="true"
                                        showOutput="${tests.output}"
                                        showStatusOk="false"
                                        showStatusError="true"
                                        showStatusFailure="true"
                                        showStatusIgnored="true"
                                        showSuiteSummary="true"
                                        timestamps="false"/>
                                <report-execution-times file="${basedir}/.local-execution-hints.log"/>
                            </listeners>
                            <assertions>
                                <enable/>
                            </assertions>
                            <parallelism>1</parallelism>
                            <balancers>
                                <execution-times>
                                    <fileset dir="${basedir}" includes=".local-execution-hints.log"/>
                                </execution-times>
                            </balancers>
                            <includes>
                                <include>**/*Tests.class</include>
                                <include>**/*Test.class</include>
                            </includes>
                            <excludes>
                                <exclude>**/Abstract*.class</exclude>
                                <exclude>**/*StressTest.class</exclude>
                            </excludes>
                            <argLine>
                                ${tests.jvm.argline}
                            </argLine>
                            <jvmArgs>
                                <param>-Xmx512m</param>
                                <param>-Xss256k</param>
                                <param>-XX:MaxDirectMemorySize=512m</param>
                                <param>-Des.logger.prefix=</param>
                            </jvmArgs>
                            <shuffleOnSlave>${tests.shuffle}</shuffleOnSlave>
                            <sysouts>${tests.verbose}</sysouts>
                            <seed>${tests.seed}</seed>
                            <haltOnFailure>${tests.failfast}</haltOnFailure>
                            <systemProperties>
                                <!-- RandomizedTesting library system properties -->
                                <tests.jvm.argline>${tests.jvm.argline}</tests.jvm.argline>
                                <tests.iters>${tests.iters}</tests.iters>
                                <tests.maxfailures>${tests.maxfailures}</tests.maxfailures>
                                <tests.failfast>${tests.failfast}</tests.failfast>
                                <tests.class>${tests.class}</tests.class>
                                <tests.method>${tests.method}</tests.method>
                                <tests.nightly>${tests.nightly}</tests.nightly>
                                <tests.badapples>${tests.badapples}</tests.badapples>
                                <tests.weekly>${tests.weekly}</tests.weekly>
                                <tests.slow>${tests.slow}</tests.slow>
                                <tests.awaitsfix>${tests.awaitsfix}</tests.awaitsfix>
                                <tests.slow>${tests.slow}</tests.slow>
                                <tests.timeoutSuite>${tests.timeoutSuite}</tests.timeoutSuite>
                                <tests.showSuccess>${tests.showSuccess}</tests.showSuccess>
                                <tests.integration>${tests.integration}</tests.integration>
                                <tests.cluster_seed>${tests.cluster_seed}</tests.cluster_seed>
                                <tests.client.ratio>${tests.client.ratio}</tests.client.ratio>
                                <es.node.local>${env.ES_TEST_LOCAL}</es.node.local>
                                <es.node.mode>${es.node.mode}</es.node.mode>
                                <es.config>${es.config}</es.config>
                                <es.logger.level>${es.logger.level}</es.logger.level>
                                <java.awt.headless>true</java.awt.headless>
                            </systemProperties>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.13</version>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>

            <!-- Generate the release zip file (run during package step) -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>2.3</version>
                <configuration>
                    <appendAssemblyId>false</appendAssemblyId>
                    <outputDirectory>${project.build.directory}/releases/</outputDirectory>
                    <descriptors>
                        <descriptor>${basedir}/src/main/assemblies/esplugin.xml</descriptor>
                    </descriptors>
                </configuration>
                <executions>
                    <execution>
                        <id>generate-release-plugin</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>1.3.1</version>
                <executions>
                    <execution>
                        <id>enforce-versions</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireJavaVersion>
                                    <version>[1.7,)</version>
                                </requireJavaVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
                <includes>
                    <include>**/*.properties</include>
                </includes>
            </resource>
        </resources>
    </build>

    <dependencies>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-core</artifactId>
            <version>1.3</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-library</artifactId>
            <version>1.3</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.lucene</groupId>
            <artifactId>lucene-test-framework</artifactId>
            <version>${lucene.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.elasticsearch</groupId>
            <artifactId>elasticsearch</artifactId>
            <version>${elasticsearch.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi-ooxml</artifactId>
            <version>${poi.version}</version>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <groupId>stax</groupId>
                    <artifactId>stax-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>xml-apis</groupId>
                    <artifactId>xml-apis</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi-ooxml-schemas</artifactId>
            <version>${poi.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi-scratchpad</artifactId>
            <version>${poi.version}</version>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.tika</groupId>
            <artifactId>tika-core</artifactId>
            <version>${tika.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.tika</groupId>
            <artifactId>tika-parsers</artifactId>
            <version>${tika.version}</version>
        </dependency>
        <!--Dependency for parsing remote ssh directory [http://www.jcraft.com/jsch/]-->
        <dependency>
            <groupId>com.jcraft</groupId>
            <artifactId>jsch</artifactId>
            <version>0.1.51</version>
        </dependency>

        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.17</version>
        </dependency>
        <dependency>
            <groupId>org.elasticsearch</groupId>
            <artifactId>elasticsearch</artifactId>
            <version>${elasticsearch.version}</version>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>

    </dependencies>

</project>
