<?xml version="1.0" encoding="ISO-8859-1"?>

<!-- Copyright 2019, California Institute of Technology ("Caltech"). U.S. 
    Government sponsorship acknowledged. All rights reserved. Redistribution 
    and use in source and binary forms, with or without modification, are permitted 
    provided that the following conditions are met: - Redistributions of source 
    code must retain the above copyright notice, this list of conditions and 
    the following disclaimer. - Redistributions must reproduce the above copyright 
    notice, this list of conditions and the following disclaimer in the documentation 
    and/or other materials provided with the distribution. - Neither the name 
    of Caltech nor its operating division, the Jet Propulsion Laboratory, nor 
    the names of its contributors may be used to endorse or promote products 
    derived from this software without specific prior written permission. THIS 
    SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
    ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
    IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
    INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
    BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 
    USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
    EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -->

<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>

    <!-- Inherit release profile, reporting, SNAPSHOT repo, etc. from parent repo -->
    <parent>
        <groupId>gov.nasa</groupId>
        <artifactId>pds</artifactId>
        <version>1.3.0</version>
    </parent>

    <groupId>gov.nasa.pds</groupId>
    <artifactId>harvest</artifactId>
    <version>3.2.2</version>
    <packaging>jar</packaging>

    <name>Harvest Tool</name>
    <description>
    The Harvest Tool provides functionality for capturing and indexing product metadata. 
    The tool will run locally at the Discipline Node to crawl the local data repository in order to 
    discover products and index associated metadata with the Registry Service.
    </description>

    <url>https://nasa-pds-incubator.github.io/harvest/</url>

    <inceptionYear>2010</inceptionYear>

    <organization>
        <name>Jet Propulsion Laboratory, California Institute of Technology</name>
    </organization>

    <licenses>
        <license>
            <name>The Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>
    
    <scm>
        <url>https://github.com/NASA-PDS-Incubator/harvest/tree/master</url>
        <connection>scm:git:git://github.com/NASA-PDS-Incubator/harvest.git</connection>
        <developerConnection>scm:git:ssh://github.com:NASA-PDS-Incubator/harvest.git</developerConnection>
    </scm>

    <properties>
        <maven.compiler.target>1.8</maven.compiler.target>
        <maven.compiler.source>1.8</maven.compiler.source>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencies>
        <!-- Command line interface / parameters -->
        <dependency>
            <groupId>commons-cli</groupId>
            <artifactId>commons-cli</artifactId>
            <version>1.4</version>
        </dependency>
        <!-- File utils (Crawler) -->
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.6</version>
        </dependency>
        <!-- XML escaping, String utils -->
        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
            <version>2.6</version>
        </dependency>
        <!-- File type detection -->
        <dependency>
            <groupId>org.apache.tika</groupId>
            <artifactId>tika-core</artifactId>
            <version>1.23</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>        
            <!-- SpringBoot single JAR executable. -->
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <version>2.2.5.RELEASE</version>
                <configuration>
                    <mainClass>gov.nasa.pds.harvest.HarvestMain</mainClass>
                    <layout>JAR</layout>
                </configuration>
                <executions>
                    <execution>
                        <id>exec-jar</id>
                        <phase>package</phase>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>            
            <!-- Binary release (ZIP and tar.gz). -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <executions>
                    <execution>
                        <id>bin-release</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <descriptors>
                                <descriptor>src/main/assembly/tar-assembly.xml</descriptor>
                                <descriptor>src/main/assembly/zip-assembly.xml</descriptor>
                            </descriptors>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <!-- Disable Site for now -->
            <plugin>
                <artifactId>maven-site-plugin</artifactId>
                <configuration>
                    <skip>true</skip>
                    <skipDeploy>true</skipDeploy>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
