<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ JFrog Crypto are utilities for encrypting data in JFrog products.
  ~ Copyright (C) 2016 JFrog Ltd.
  ~
  ~ JFrog Crypto is free software: you can redistribute it and/or modify
  ~ it under the terms of the GNU Lesser General Public License as published by
  ~ the Free Software Foundation, either version 3 of the License, or
  ~ (at your option) any later version.
  ~
  ~ JFrog Crypto is distributed in the hope that it will be useful,
  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  ~ GNU Lesser General Public License for more details.
  ~
  ~ You should have received a copy of the GNU Lesser General Public License
  ~ along with JFrog Crypto.  If not, see <http://www.gnu.org/licenses/>.
  --><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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.jfrog.common</groupId>
        <artifactId>jfrog-commons-parent</artifactId>
        <version>3.10.2</version>
    </parent>

    <groupId>org.jfrog.security</groupId>
    <artifactId>jfrog-crypto</artifactId>
    <packaging>jar</packaging>
    <name>JFrog Crypto Utilities</name>

    <description>
        JFrog Crypto Utilities provide simple tools to encrypt and decrypt data.
        Used for password, other sensitive information and trust contract between services.
    </description>

    <dependencyManagement>
        <dependencies>

            <dependency>
                <groupId>org.jfrog.common</groupId>
                <artifactId>jfrog-test-dependencies</artifactId>
                <version>3.10.2</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <dependency>
                <groupId>org.jfrog.common</groupId>
                <artifactId>jfrog-crypto-dependencies</artifactId>
                <version>3.10.2</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

        </dependencies>
    </dependencyManagement>
    <dependencies>

        <dependency>
            <groupId>org.jfrog.common</groupId>
            <artifactId>jfrog-utils</artifactId>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>

        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-core</artifactId>
        </dependency>

        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
        </dependency>

        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
        </dependency>

        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
        </dependency>

        <dependency>
            <groupId>commons-cli</groupId>
            <artifactId>commons-cli</artifactId>
        </dependency>

        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <!--<scope>test</scope>-->
        </dependency>

        <dependency>
            <groupId>org.iostreams</groupId>
            <artifactId>iostreams</artifactId>
            <version>0.2</version>
        </dependency>

        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.bouncycastle</groupId>
            <artifactId>bcprov-jdk15on</artifactId>
        </dependency>

        <dependency>
            <groupId>org.bouncycastle</groupId>
            <artifactId>bcpg-jdk15on</artifactId>
        </dependency>

        <dependency>
            <groupId>org.bouncycastle</groupId>
            <artifactId>bcpkix-jdk15on</artifactId>
        </dependency>

        <dependency>
            <groupId>com.nimbusds</groupId>
            <artifactId>nimbus-jose-jwt</artifactId>
        </dependency>

    </dependencies>


    <build>
        <plugins>
            <!-- copy all the cli dependencies to a directory which will be packaged later in standalone module -->
            <plugin>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <configuration>
                            <outputDirectory>${project.build.directory}/clilib</outputDirectory>
                            <includeScope>runtime</includeScope>
                            <silent>true</silent>
                        </configuration>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <descriptors>
                        <descriptor>src/assemble/assembly.xml</descriptor>
                    </descriptors>
                    <finalName>jfrog-crypto-${project.version}</finalName>
                    <appendAssemblyId>false</appendAssemblyId>
                    <archive>
                        <manifest>
                            <addClasspath>true</addClasspath>
                            <mainClass>org.jfrog.security.cli.JFrogCryptoMain</mainClass>
                        </manifest>
                    </archive>
                </configuration>
                <executions>
                    <execution>
                        <id>make-assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>
