<?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>

    <groupId>security.whisper</groupId>
    <artifactId>stix2.1</artifactId>
    <version>1.3.2</version>
    <packaging>jar</packaging>

    <name>Whisper STIX 2.1</name>
    <description>A professional Java implementation of the STIX 2.1 specification for cyber threat intelligence sharing</description>
    <url>https://github.com/whisper-security/STIX</url>
    <licenses>
        <license>
            <name>BSD 2-Clause License</name>
            <url>https://opensource.org/licenses/BSD-2-Clause</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <scm>
        <url>https://github.com/whisper-security/STIX</url>
        <connection>scm:git:https://github.com/whisper-security/STIX.git</connection>
        <developerConnection>scm:git:ssh://git@github.com:whisper-security/STIX.git</developerConnection>
    </scm>
    <developers>
        <developer>
            <id>XiVGkLP4</id>
            <name>Kaveh Ranjbar</name>
            <email>kaveh@whisper.security</email>
            <organization>Whisper Security</organization>
            <organizationUrl>https://whisper.security</organizationUrl>
            <roles>
                <role>architect</role>
                <role>developer</role>
            </roles>
            <timezone>America/New_York</timezone>
        </developer>
    </developers>

    <organization>
        <name>Whisper Security</name>
        <url>https://whisper.security</url>
    </organization>

    <issueManagement>
        <system>GitHub Issues</system>
        <url>https://github.com/whisper-security/STIX/issues</url>
    </issueManagement>
    <properties>
        <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>
        <java.version>11</java.version>
        <maven.compiler.release>11</maven.compiler.release>
        <jackson.version>2.18.3</jackson.version>
        <antlr4.version>4.13.1</antlr4.version>
        <slf4j.version>2.0.9</slf4j.version>
        <maven.compiler.showWarnings>false</maven.compiler.showWarnings>
        <maven.compiler.showDeprecation>false</maven.compiler.showDeprecation>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>${jackson.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.module</groupId>
            <artifactId>jackson-module-parameter-names</artifactId>
            <version>${jackson.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.datatype</groupId>
            <artifactId>jackson-datatype-jdk8</artifactId>
            <version>${jackson.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.datatype</groupId>
            <artifactId>jackson-datatype-jsr310</artifactId>
            <version>${jackson.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.datatype</groupId>
            <artifactId>jackson-datatype-guava</artifactId>
            <version>${jackson.version}</version>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>com.jayway.jsonpath</groupId>
            <artifactId>json-path</artifactId>
            <version>2.4.0</version>
            <scope>compile</scope>
        </dependency>

        <!-- Hibernate Validator (Jakarta EE compatible version - includes jakarta.validation-api) -->
        <dependency>
            <groupId>org.hibernate.validator</groupId>
            <artifactId>hibernate-validator</artifactId>
            <version>8.0.1.Final</version>
            <scope>compile</scope>
        </dependency>

        <!-- Jakarta Expression Language -->
        <dependency>
            <groupId>org.glassfish.expressly</groupId>
            <artifactId>expressly</artifactId>
            <version>5.0.0</version>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>3.8.1</version>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-expression</artifactId>
            <version>5.3.39</version>
            <scope>compile</scope>
        </dependency>

        <!-- ANTLR4 Runtime for Pattern Parser -->
        <dependency>
            <groupId>org.antlr</groupId>
            <artifactId>antlr4-runtime</artifactId>
            <version>${antlr4.version}</version>
            <scope>compile</scope>
        </dependency>

        <!-- SLF4J for Logging -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j.version}</version>
            <scope>compile</scope>
        </dependency>

        <!-- JGraphT for Graph Algorithms -->
        <dependency>
            <groupId>org.jgrapht</groupId>
            <artifactId>jgrapht-core</artifactId>
            <version>1.5.2</version>
            <scope>compile</scope>
        </dependency>


        <dependency>
            <groupId>org.immutables</groupId>
            <artifactId>value</artifactId>
            <version>2.7.3</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.immutables</groupId>
            <artifactId>annotate</artifactId>
            <version>2.7.3</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.immutables</groupId>
            <artifactId>serial</artifactId>
            <version>2.7.3</version>
            <scope>provided</scope>
        </dependency>

        <!-- SLF4J Implementation for Tests -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <version>${slf4j.version}</version>
            <scope>test</scope>
        </dependency>

        <!--Dependencies for Unit Test with Spock Framework:-->
        <!-- Mandatory dependencies for using Spock -->
        <dependency>
            <groupId>org.spockframework</groupId>
            <artifactId>spock-core</artifactId>
            <version>2.4-M5-groovy-4.0</version>
            <scope>test</scope>
        </dependency>
        <!-- Optional dependencies for using Spock -->
        <dependency> <!-- use a specific Groovy version rather than the one specified by spock-core -->
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-all</artifactId>
            <version>2.4.15</version>
            <scope>test</scope>
        </dependency>
        <dependency> <!-- enables mocking of classes (in addition to interfaces) -->
            <groupId>net.bytebuddy</groupId>
            <artifactId>byte-buddy</artifactId>
            <version>1.8.21</version>
            <scope>test</scope>
        </dependency>
        <dependency> <!-- enables mocking of classes without default constructor (together with CGLIB) -->
            <groupId>org.objenesis</groupId>
            <artifactId>objenesis</artifactId>
            <version>2.6</version>
            <scope>test</scope>
        </dependency>
        <dependency> <!-- only required if Hamcrest matchers are used -->
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-core</artifactId>
            <version>1.3</version>
            <scope>test</scope>
        </dependency>

        <!--Mock Data Generator https://www.mockneat.com-->
        <dependency>
            <groupId>net.andreinc</groupId>
            <artifactId>mockneat</artifactId>
            <version>0.4.8</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.skyscreamer</groupId>
            <artifactId>jsonassert</artifactId>
            <version>1.5.0</version>
            <scope>test</scope>
        </dependency>

        <!-- JUnit 5 dependencies for new tests -->
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>5.9.3</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>5.9.3</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-params</artifactId>
            <version>5.9.3</version>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <!-- ANTLR4 Plugin for generating parser from grammar -->
            <plugin>
                <groupId>org.antlr</groupId>
                <artifactId>antlr4-maven-plugin</artifactId>
                <version>${antlr4.version}</version>
                <configuration>
                    <sourceDirectory>${basedir}/src/main/antlr4</sourceDirectory>
                    <outputDirectory>${project.build.directory}/generated-sources/antlr4</outputDirectory>
                    <visitor>true</visitor>
                    <listener>true</listener>
                </configuration>
                <executions>
                    <execution>
                        <id>antlr</id>
                        <goals>
                            <goal>antlr4</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
<!--            <plugin>-->
<!--                &lt;!&ndash; The gmavenplus plugin is used to compile Groovy code. To learn more about this plugin,-->
<!--                visit https://github.com/groovy/GMavenPlus/wiki &ndash;&gt;-->
<!--                <groupId>org.codehaus.gmavenplus</groupId>-->
<!--                <artifactId>gmavenplus-plugin</artifactId>-->
<!--                <version>1.6</version>-->

<!--                <executions>-->
<!--                    <execution>-->
<!--                        <goals>-->
<!--                            &lt;!&ndash;<goal>compile</goal>&ndash;&gt;-->
<!--                            <goal>compileTests</goal>-->
<!--                        </goals>-->
<!--                    </execution>-->
<!--                </executions>-->
<!--            </plugin>-->
            <!-- Optional plugins for using Spock -->
            <!-- Only required if names of spec classes don't match default Surefire patterns (`*Test` etc.) -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.13.0</version>
                <configuration>
                    <release>11</release>
                    <compilerArgs>
                        <arg>-parameters</arg>
                    </compilerArgs>
                    <annotationProcessorPaths>
                        <path>
                            <groupId>org.immutables</groupId>
                            <artifactId>value</artifactId>
                            <version>2.7.3</version>
                        </path>
                    </annotationProcessorPaths>
                    <showWarnings>false</showWarnings>
                    <showDeprecation>false</showDeprecation>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>3.0.0-M7</version>
                <configuration>
                    <useFile>false</useFile>
                    <includes>
                        <include>**/*Test.java</include>
                        <include>**/*Spec.java</include>
                    </includes>
                </configuration>
            </plugin>
<!--            <plugin>-->
<!--                <groupId>org.apache.maven.plugins</groupId>-->
<!--                <artifactId>maven-checkstyle-plugin</artifactId>-->
<!--                <version>3.1.2</version>-->
<!--                <executions>-->
<!--                    <execution>-->
<!--                        <phase>verify</phase>-->
<!--                        <goals>-->
<!--                            <goal>check</goal>-->
<!--                        </goals>-->
<!--                    </execution>-->
<!--                </executions>-->
<!--            </plugin>-->
            <plugin>
                    <groupId>org.sonatype.central</groupId>
                    <artifactId>central-publishing-maven-plugin</artifactId>
                    <version>0.9.0</version>
                    <extensions>true</extensions>
                    <configuration>
                        <publishingServerId>central</publishingServerId>
                        <autoPublish>false</autoPublish>
                        <waitUntil>validated</waitUntil>
                    </configuration>
                </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.11.2</version>
                <configuration>
                    <failOnError>false</failOnError>
                    <failOnWarnings>false</failOnWarnings>
                    <additionalJOption>-Xdoclint:none</additionalJOption>
                    <additionalJOptions>
                        <additionalJOption>-Xdoclint:none</additionalJOption>
                        <additionalJOption>--allow-script-in-comments</additionalJOption>
                    </additionalJOptions>
                    <excludePackageNames>
                        *.generated.*:
                        security.whisper.javastix.generated.*
                    </excludePackageNames>
                    <sourceFileExcludes>
                        <sourceFileExclude>**/generated-sources/**</sourceFileExclude>
                    </sourceFileExcludes>
                    <quiet>true</quiet>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- Maven Source Plugin -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.3.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
<!--                <plugin>-->
<!--                    <groupId>org.sonatype.plugins</groupId>-->
<!--                    <artifactId>nexus-staging-maven-plugin</artifactId>-->
<!--                    <version>1.7.0</version>-->
<!--                    <extensions>true</extensions>-->
<!--                    <configuration>-->
<!--                        <serverId>ossrh</serverId>-->
<!--                        <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>-->
<!--                        <autoReleaseAfterClose>true</autoReleaseAfterClose>-->
<!--                    </configuration>-->
<!--                </plugin>-->
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <!-- GPG signing is only needed for release profile -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <gpgArguments>
                                        <arg>--pinentry-mode</arg>
                                        <arg>loopback</arg>
                                    </gpgArguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <distributionManagement>
        <repository>
            <id>central</id>
            <url>https://central.sonatype.com/api/v1/publisher/upload</url>
        </repository>
        <snapshotRepository>
            <id>central</id>
            <url>https://central.sonatype.com/api/v1/publisher/upload</url>
        </snapshotRepository>
    </distributionManagement>
</project>
