<?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>
    <artifactId>TLS-Scanner</artifactId>
    <groupId>de.rub.nds.tlsscanner</groupId>
    <version>4.2.3</version>
    <packaging>pom</packaging>
    <name>TLS-Scanner</name>
    <url>https://github.com/tls-attacker/TLS-Scanner</url>
    <description>TLS-Scanner is a tool created by the Chair for Network and Data Security from the Ruhr-University Bochum to assist pentesters and security researchers in the evaluation of TLS Server configurations.</description>

    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <distributionManagement>
        <snapshotRepository>
            <id>rub-nexus</id>
            <name>TLS-Attacker Internal Repository</name>
            <url>https://hydrogen.cloud.nds.rub.de/nexus/repository/maven-snapshots/</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <!-- Information to version control system -->
    <scm>
        <connection>scm:git:git://github.com/tls-attacker/TLS-Scanner.git</connection>
        <developerConnection>scm:git:ssh://github.com/tls-attacker/TLS-Scanner.git</developerConnection>
        <url>https://github.com/tls-attacker/TLS-Scanner/tree/master</url>
    </scm>

    <developers>
        <developer>
            <id>ic0ns</id>
            <name>Robert Merget</name>
            <email>robert.merget@rub.de</email>
            <url>http://www.nds.rub.de/</url>
            <organization>NDS</organization>
            <organizationUrl>http://www.nds.rub.de</organizationUrl>
            <roles>
                <role>Developer</role>
            </roles>
        </developer>
    </developers>

    <modules>
        <module>Scanner-Core</module>
        <module>TLS-Scanner-Core</module>
        <module>TLS-Server-Scanner</module>
        <module>TLS-Client-Scanner</module>
    </modules>
    <dependencies>
        <dependency>
            <groupId>de.rub.nds.tlsattacker</groupId>
            <artifactId>TLS-Core</artifactId>
            <version>3.8.1</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.13.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.googlecode.json-simple</groupId>
            <artifactId>json-simple</artifactId>
            <version>1.1.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-math3</artifactId>
            <version>3.6.1</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>2.13.2.1</version>
            <type>jar</type>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
            <version>2.13.2</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.dataformat</groupId>
            <artifactId>jackson-dataformat-yaml</artifactId>
            <version>2.13.2</version>
        </dependency>
        <dependency>
            <groupId>org.bouncycastle</groupId>
            <artifactId>bcpkix-jdk15on</artifactId>
            <version>1.64</version>
            <type>jar</type>
        </dependency>
        <dependency>
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
            <version>2.10.14</version>
        </dependency>
        <dependency>
            <groupId>com.github.wendykierp</groupId>
            <artifactId>JTransforms</artifactId>
            <version>3.1</version>
            <classifier>with-dependencies</classifier>
        </dependency>
    </dependencies>
    <profiles>
        <profile>
            <id>default</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <properties>
                <includegroups>de.rub.nds.tlsattacker.util.tests.SlowTests,de.rub.nds.tlsattacker.util.tests.IntegrationTests</includegroups>
            </properties>
        </profile>
        <profile>
            <id>docker-it</id>
            <activation>
                <property>
                    <name>env</name>
                    <value>dev</value>
                </property>
            </activation>
            <properties>
                <includegroups>de.rub.nds.tlsattacker.util.tests.SlowTests,de.rub.nds.tlsattacker.util.tests.IntegrationTests,de.rub.nds.tlsattacker.util.tests.DockerTests</includegroups>
            </properties>
        </profile>
    </profiles>
    <build>
        <finalName>TLS-Scanner</finalName>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>${project.artifactId}</artifactId>
                                    <version>${project.version}</version>
                                    <type>${project.packaging}</type>
                                    <destFileName>${project.build.finalName}.${project.packaging}</destFileName>
                                </artifactItem>
                            </artifactItems>
                            <outputDirectory>${maven.multiModuleProjectDirectory}/apps</outputDirectory>
                        </configuration>
                    </execution>
                    <execution>
                        <id>copy-dependencies</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${maven.multiModuleProjectDirectory}/apps/lib</outputDirectory>
                            <!--Ensures only runnable dependencies are included-->
                            <includeScope>compile</includeScope>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>4.1</version>
                <configuration>
                    <header>${main.basedir}/license_header_plain.txt</header>
                    <strictCheck>true</strictCheck>
                    <includes>
                        <include>src/**/*.java</include>
                    </includes>
                    <properties>
                        <startYear>2017</startYear>
                        <year>${buildYear}</year>
                        <description>A TLS configuration and analysis tool based on TLS-Attacker</description>
                        <owner>Ruhr University Bochum, Paderborn University, Hackmanit GmbH</owner>
                        <licenseName>Apache License, Version 2.0</licenseName>
                        <licenseURL>http://www.apache.org/licenses/LICENSE-2.0.txt</licenseURL>
                    </properties>
                    <mapping>
                        <java>JAVADOC_STYLE</java>
                    </mapping>
                </configuration>
                <executions>
                    <execution>
                        <phase>process-sources</phase>
                        <goals>
                            <goal>format</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>3.0.0-M5</version>
                <configuration>
                    <!-- By default, the Failsafe plugin excludes various files. We have to override that. -->
                    <includes>
                        <include>**/*.java</include>
                    </includes>
                    <!-- Integration tests and slow tests are started -->
                    <groups>${includegroups}</groups>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>integration-test</goal>
                            <goal>verify</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>3.0.0-M5</version>
                <configuration>
                    <argLine>-Dfile.encoding=${project.build.sourceEncoding}</argLine>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.maven.surefire</groupId>
                        <artifactId>surefire-junit47</artifactId>
                        <version>3.0.0-M5</version>
                    </dependency>
                </dependencies>
            </plugin>
            <!-- Format the Code -->
            <plugin>
                <groupId>net.revelc.code.formatter</groupId>
                <artifactId>formatter-maven-plugin</artifactId>
                <version>2.14.0</version>
                <configuration>
                    <configFile>${main.basedir}/maven-eclipse-codestyle.xml</configFile>
                </configuration>
                <executions>
                    <execution>
                        <phase>process-sources</phase>
                        <goals>
                            <goal>format</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <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>
            <!-- Following plugins handle the OSSRH distribution -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                    <javadocExecutable>
                        ${java.home}/bin/javadoc
                    </javadocExecutable>
                </configuration>
                <version>3.2.0</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <phase>deploy</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                            <doclint>none</doclint>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>1.6</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>deploy</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <skip>${skip.signature}</skip>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>1.6.8</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
                    <!-- deploy with the following command: mvn nexus-staging:release -->
                    <autoReleaseAfterClose>false</autoReleaseAfterClose>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>3.0.0-M1</version>
            </plugin>
        </plugins>
    </build>
    <properties>
        <maven.build.timestamp.format>yyyy</maven.build.timestamp.format>
        <buildYear>${maven.build.timestamp}</buildYear>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <maven.compiler.source>11</maven.compiler.source>
        <maven.compiler.target>11</maven.compiler.target>
        <licenseOwner>Ruhr University Bochum, Paderborn University, Hackmanit GmbH</licenseOwner>
        <main.basedir>${project.basedir}</main.basedir>
        <!-- We redefine the signature generation process, which is enabled by default,
        but cannot be performed by typical users. Enable it using -Dskip.signature=false -->
        <skip.signature>true</skip.signature>
    </properties>
</project>
