<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>4.5</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

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

    <name>Time Zone Map Data</name>

    <properties>
        <jacoco.minimum.covered.ratio>1.00</jacoco.minimum.covered.ratio>
        <map.uncompressed.filename>timezonemap-${project.version}-${map.version}.tar</map.uncompressed.filename>
        <map.zstd.filename>timezonemap-${project.version}-${map.version}.tar.zstd</map.zstd.filename>
    </properties>

    <build>
        <plugins>
            <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>${map.version}</argument>
                        <argument>${map.archive.version}</argument>
                        <argument>uncompressed</argument>
                        <argument>${project.build.directory}/${map.uncompressed.filename}</argument>
                        <argument>zstd</argument>
                        <argument>${project.build.directory}/classes/${map.zstd.filename}</argument>
                    </arguments>
                    <!-- Set on the build command line to suppress packing the map a second time -->
                    <skip>${skipDataPackaging}</skip>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>templating-maven-plugin</artifactId>
                <version>1.0.0</version>
                <executions>
                    <execution>
                        <id>filter-src</id>
                        <goals>
                            <goal>filter-sources</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

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

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-compress</artifactId>
            <version>1.20</version>
        </dependency>
        <dependency>
            <groupId>com.github.luben</groupId>
            <artifactId>zstd-jni</artifactId>
            <version>${zstd.version}</version>
        </dependency>
    </dependencies>
</project>