<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">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>us.dustinj.timezonemap</groupId>
        <artifactId>timezonemap-parent</artifactId>
        <version>1.0</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <artifactId>timezonemap-data</artifactId>
    <packaging>jar</packaging>

    <name>Time Zone Map Data</name>

    <properties>
        <jacoco.minimum.covered.ratio>0.30</jacoco.minimum.covered.ratio>
    </properties>

    <build>
        <plugins>
            <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>us.dustinj.timezonemap.builder.Main</mainClass>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <version>1.6.0</version>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <executable>java</executable>
                    <!-- optional -->
                    <workingDirectory>${project.basedir}/../builder/target</workingDirectory>
                    <arguments>
                        <argument>-jar</argument>
                        <argument>timezonemap-builder-${project.version}.jar</argument>
                        <argument>2018g</argument>
                        <argument>${project.build.directory}/classes/timezonemap.tar.zstd</argument>
                    </arguments>
                    <skip>${skipDataPackaging}</skip>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>us.dustinj.timezonemap</groupId>
            <artifactId>timezonemap-builder</artifactId>
            <version>${version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-compress</artifactId>
            <version>1.18</version>
        </dependency>
        <dependency>
            <groupId>com.github.luben</groupId>
            <artifactId>zstd-jni</artifactId>
            <version>1.3.7-3</version>
        </dependency>
    </dependencies>
</project>