<?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">
    <name>elasticsearch-image</name>
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.github.kzwang</groupId>
    <artifactId>elasticsearch-image</artifactId>
    <version>1.0.0</version>
    <packaging>jar</packaging>
    <description>Image Plugin for ElasticSearch</description>
    <url>http://github.com/kzwang/elasticsearch-image</url>


    <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>
    <scm>
        <connection>scm:git:git@github.com:kzwang/elasticsearch-image.git</connection>
        <developerConnection>scm:git:git@github.com:kzwang/elasticsearch-image.git</developerConnection>
        <url>http://github.com/kzwang/elasticsearch-image</url>
    </scm>

    <developers>
        <developer>
            <id>kzwang</id>
            <name>Kevin Wang</name>
            <email>kevin807359@gmail.com</email>
        </developer>
    </developers>

    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>7</version>
    </parent>

    <properties>
        <elasticsearch.version>1.0.1</elasticsearch.version>
        <lucene.version>4.6.1</lucene.version>
        <tests.jvms>1</tests.jvms>
        <tests.shuffle>true</tests.shuffle>
        <tests.output>onerror</tests.output>
        <es.logger.level>INFO</es.logger.level>
    </properties>

    <dependencies>
        <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>
            <scope>compile</scope>
        </dependency>


        <dependency>
            <groupId>com.github.kzwang</groupId>  <!-- Modified to deploy on maven -->
            <artifactId>lire</artifactId>
            <version>0.9.4-kzwang-beta1</version>
        </dependency>

        <dependency>
            <groupId>com.twelvemonkeys.imageio</groupId> <!-- Some jpg images failed to parse by standard Java ImageIO, this plugin will fix that -->
            <artifactId>imageio-jpeg</artifactId>
            <version>3.0-rc5</version>
        </dependency>

        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.17</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.elasticsearch</groupId>
            <artifactId>elasticsearch</artifactId>
            <version>${elasticsearch.version}</version>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-all</artifactId>
            <version>1.3</version>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.carrotsearch.randomizedtesting</groupId>
                <artifactId>junit4-maven-plugin</artifactId>
                <version>2.0.15</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>${tests.jvms}</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>
                            <jvmArgs>
                                <param>-Xmx512m</param>
                                <param>-XX:MaxDirectMemorySize=512m</param>
                                <param>-Des.logger.prefix=</param>
                            </jvmArgs>
                            <shuffleOnSlave>${tests.shuffle}</shuffleOnSlave>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <!-- we skip surefire to work with randomized testing above -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.15</version>
                <configuration>
                    <skipTests>true</skipTests>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.1.2</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <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/plugin.xml</descriptor>
                    </descriptors>
                </configuration>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.7</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
