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

    <parent>
        <artifactId>shamirs-lib</artifactId>
        <groupId>de.christofreichardt</groupId>
        <version>1.2.0</version>
    </parent>

    <artifactId>shamirs-keystore</artifactId>
    <packaging>jar</packaging>
    <name>${project.artifactId}</name>
    <description>JCA keystore implementation with secret sharing</description>
    <inceptionYear>2019</inceptionYear>

    <licenses>
        <license>
            <name>GNU General Public License 3</name>
            <url>http://www.gnu.org/licenses/gpl-3.0.html</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <developers>
        <developer>
            <name>Christof Reichardt</name>
            <email>projektstudien@christofreichardt.de</email>
            <organizationUrl>http://www.christofreichardt.de/index.html</organizationUrl>
        </developer>
    </developers>
    <scm>
        <url>https://github.com/chr78rm/shamirs-keystore</url>
    </scm>
    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>


    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.0</version>
                <configuration>
                    <source>11</source>
                    <target>11</target>
                    <compilerArgument>-Xlint:all</compilerArgument>
                    <useIncrementalCompilation>true</useIncrementalCompilation>
                    <forceJavacCompilerUse>false</forceJavacCompilerUse>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>3.0.0-M5</version>
                <configuration>
                    <includes>
                        <include>de/christofreichardt/jca/shamir/ShamirsKeystoreUnit.java</include>
                    </includes>
                    <argLine>-Dfile.encoding=${project.build.sourceEncoding}</argLine>
                    <systemPropertyVariables>
                        <de.christofreichardt.junit5.traceConfig>de/christofreichardt/jca/trace-config.xml</de.christofreichardt.junit5.traceConfig>
                        <de.christofreichardt.junit5.summary>../reports/shamirs-keystore-summary.txt</de.christofreichardt.junit5.summary>
                    </systemPropertyVariables>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>development</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <!-- mvn javadoc:javadoc -->
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>3.3.0</version>
                        <configuration>
                            <javadocExecutable>${java.home}/bin/javadoc</javadocExecutable>
                            <header>shamirs-keystore ${project.version} API</header>
                            <bottom>Copyright &#x00A9; 2017, 2021, Christof Reichardt - Paul-Ehrlich-Weg 1 - D-63110 Rodgau</bottom>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.2.1</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>3.3.0</version>
                        <configuration>
                            <javadocExecutable>${java.home}/bin/javadoc</javadocExecutable>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <dependencies>
        <dependency>
            <groupId>de.christofreichardt</groupId>
            <artifactId>tracelogger</artifactId>
            <version>1.9.0</version>
        </dependency>
        <dependency>
            <groupId>de.christofreichardt</groupId>
            <artifactId>shamirs-secret-sharing</artifactId>
            <version>${project.version}</version>
            <type>jar</type>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>5.8.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>5.8.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.platform</groupId>
            <artifactId>junit-platform-launcher</artifactId>
            <version>1.8.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <version>3.22.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>de.christofreichardt</groupId>
            <artifactId>junit5-ext</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.bouncycastle</groupId>
            <artifactId>bcpkix-jdk15on</artifactId>
            <version>1.70</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>