<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">

    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>ch.mobileid.mid-java-client</groupId>
        <artifactId>mid-java-client-parent</artifactId>
        <version>1.2.0</version>
    </parent>

    <artifactId>mid-java-client-usage</artifactId>
    <version>1.2.0</version>
    <name>mid-java-client-usage</name>
    <description>MobileID Java Client - Usage samples</description>
    <packaging>jar</packaging>

    <properties>
        <maven.build.timestamp.format>MMM/dd/yyyy</maven.build.timestamp.format>
        <buildTimestamp>${maven.build.timestamp}</buildTimestamp>
    </properties>

    <dependencies>
        <!-- Internal dependencies -->
        <dependency>
            <groupId>ch.mobileid.mid-java-client</groupId>
            <artifactId>mid-java-client-rest</artifactId>
            <version>${project.version}</version>
            <!-- this automatically brings the mid-client-core dependency -->
        </dependency>
        <dependency>
            <groupId>ch.mobileid.mid-java-client</groupId>
            <artifactId>mid-java-client-soap</artifactId>
            <version>${project.version}</version>
            <!-- this automatically brings the mid-client-core dependency -->
        </dependency>
    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>false</filtering>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
                <includes>
                    <include>build.properties</include>
                </includes>
            </resource>
        </resources>
        <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
            <plugins>
                <!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
                <plugin>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>3.1.0</version>
                </plugin>
                <!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
                <plugin>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>3.0.2</version>
                </plugin>
                <plugin>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.8.0</version>
                </plugin>
                <plugin>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.22.1</version>
                </plugin>
                <plugin>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.0.2</version>
                </plugin>
                <plugin>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>2.5.2</version>
                </plugin>
                <plugin>
                    <artifactId>maven-project-info-reports-plugin</artifactId>
                    <version>3.0.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>3.1.2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>3.3.0</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>appassembler-maven-plugin</artifactId>
                    <version>2.1.0</version>
                </plugin>
                <plugin>
                    <groupId>pl.project13.maven</groupId>
                    <artifactId>git-commit-id-plugin</artifactId>
                    <version>4.0.3</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifest>
                            <mainClass>ch.swisscom.mid.client.cli.Cli</mainClass>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>appassembler-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>generate-app-assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>assemble</goal>
                        </goals>
                        <configuration>
                            <assembleDirectory>${project.build.directory}/release/mid-client-${project.version}</assembleDirectory>
                            <programs>
                                <program>
                                    <mainClass>ch.swisscom.mid.client.cli.Cli</mainClass>
                                    <id>mid-client</id>
                                </program>
                            </programs>
                            <binFileExtensions>
                                <unix>.sh</unix>
                            </binFileExtensions>
                            <generateRepository>true</generateRepository>
                            <repositoryLayout>flat</repositoryLayout>
                            <repositoryName>libs</repositoryName>
                            <useWildcardClassPath>true</useWildcardClassPath>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>pl.project13.maven</groupId>
                <artifactId>git-commit-id-plugin</artifactId>
                <configuration>
                    <dotGitDirectory>${project.basedir}/.git</dotGitDirectory>
                    <verbose>false</verbose>
                    <generateGitPropertiesFile>false</generateGitPropertiesFile>
                    <gitDescribe>
                        <skip>true</skip>
                        <always>false</always>
                        <dirty>-dirty</dirty>
                    </gitDescribe>
                    <includeOnlyProperties>
                        <includeOnlyProperty>git.commit.id.abbrev</includeOnlyProperty>
                    </includeOnlyProperties>
                    <failOnNoGitDirectory>false</failOnNoGitDirectory>
                </configuration>
                <executions>
                    <execution>
                        <id>generate-git-info</id>
                        <phase>initialize</phase>
                        <goals>
                            <goal>revision</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>