<?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>bcrypt-parent</artifactId>
        <groupId>at.favre.lib</groupId>
        <version>0.9.0</version>
        <relativePath>../../</relativePath>
    </parent>

    <artifactId>bcrypt</artifactId>
    <packaging>bundle</packaging>

    <name>BCrypt Password Hashing Function</name>
    <description>Bcrypt is a password hashing function designed by Niels Provos and David Mazières, based on the
        Blowfish cipher. The core of this implementation is based on jBcrypt, but heavily refactored, modernized and
        with a lot of updates and enhancements.
    </description>

    <properties>
        <maven.deploy.skip>false</maven.deploy.skip>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <version>4.2.0</version>
                <extensions>true</extensions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.0.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.0.1</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.owasp</groupId>
                <artifactId>dependency-check-maven</artifactId>
                <version>5.2.2</version>
                <configuration>
                    <failBuildOnAnyVulnerability>true</failBuildOnAnyVulnerability>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>net.nicoulaj.maven.plugins</groupId>
                <artifactId>checksum-maven-plugin</artifactId>
                <version>1.6</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>artifacts</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <algorithms>
                        <algorithm>SHA-256</algorithm>
                    </algorithms>
                    <shasumSummary>true</shasumSummary>
                    <shasumSummaryFile>checksum-sha256.txt</shasumSummaryFile>
                    <attachChecksums>false</attachChecksums>
                    <quiet>false</quiet>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.github.wvengen</groupId>
                <artifactId>proguard-maven-plugin</artifactId>
                <version>2.0.14</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>proguard</goal>
                        </goals>
                        <configuration>
                            <includeDependency>true</includeDependency>
                            <attachArtifactClassifier>optimized</attachArtifactClassifier>
                            <attach>true</attach>
                            <proguardVersion>6.0.3</proguardVersion>
                            <obfuscate>false</obfuscate>
                            <options>
                                <option>-include ${project.basedir}/proguard-rules.pro</option>
                            </options>
                            <libs>
                                <lib>${java.home}/lib/rt.jar</lib>
                            </libs>
                        </configuration>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>net.sf.proguard</groupId>
                        <artifactId>proguard-base</artifactId>
                        <version>6.0.3</version>
                        <scope>runtime</scope>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jarsigner-plugin</artifactId>
                <version>1.4</version>
                <executions>
                    <execution>
                        <id>sign</id>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <skip>${project.skipJarSign}</skip>
                    <keystore>${session.executionRootDirectory}/keystore.jks</keystore>
                    <alias>pfopensource</alias>
                    <storepass>${env.OPENSOURCE_PROJECTS_KS_PW}</storepass>
                    <keypass>${env.OPENSOURCE_PROJECTS_KEY_PW}</keypass>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>at.favre.lib</groupId>
            <artifactId>bytes</artifactId>
            <version>1.3.0</version>
        </dependency>

        <!-- test -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mindrot</groupId>
            <artifactId>jbcrypt</artifactId>
            <version>${project.jbcryptVersion}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.bouncycastle</groupId>
            <artifactId>bcprov-jdk15on</artifactId>
            <version>${project.bcVersion}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.github.fzakaria</groupId>
            <artifactId>ascii85</artifactId>
            <version>1.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-text</artifactId>
            <version>1.4</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>
