<?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>com.srcclr</groupId>
  <artifactId>srcclr-sdk-java</artifactId>
  <packaging>pom</packaging>
  <version>0.3.73</version>
  <name>SourceClear - Java SDK</name>
  <description>The SRC:CLR Java SDK contains tools for creating Java clients for the SRC:CLR platform.</description>
  <url>https://srcclr.com</url>
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <gradle.version>5.5.1</gradle.version>
    <jackson.version>2.13.4</jackson.version>
    <maven.version>3.6.3</maven.version>
    <maven.dependency.version>3.0.1</maven.dependency.version>
    <kotlin.version>1.6.21</kotlin.version>
  </properties>

  <dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>com.fasterxml.jackson</groupId>
            <artifactId>jackson-bom</artifactId>
            <version>${jackson.version}</version>
            <scope>import</scope>
            <type>pom</type>
        </dependency>
    </dependencies>
  </dependencyManagement>

  <developers>
    <developer>
      <name>SRC:CLR Engineering</name>
      <email>engineering@srcclr.com</email>
      <organization>SRC:CLR</organization>
      <organizationUrl>https://srcclr.com</organizationUrl>
    </developer>
  </developers>

  <licenses>
    <license>
      <name>SourceClear Proprietary</name>
      <url>https://srcclr.com</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <scm>
    <connection>scm:git:git@gitlab.laputa.veracode.io:sca/srcclr-sdk-java.git</connection>
    <developerConnection>scm:git:git@gitlab.laputa.veracode.io:sca/srcclr-sdk-java.git</developerConnection>
    <url>https://gitlab.laputa.veracode.io/sca/srcclr-sdk-java</url>
    <tag>srcclr-sdk-java-0.3.73</tag>
  </scm>

  <repositories>
    <repository>
      <id>laputaReleases</id>
      <url>https://maven.laputa.veracode.io/api/object/releases</url>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>
    <repository>
      <id>laputaSnapshots</id>
      <url>https://maven.laputa.veracode.io/api/object/snapshots</url>
      <releases>
        <enabled>false</enabled>
      </releases>
    </repository>
  </repositories>

  <modules>
    <module>srcclr-sdk-install-prerequisites</module>
    <module>srcclr-sdk-core</module>
  </modules>

  <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>
            <phase>package</phase>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.8.1</version>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.5.3</version>
        <executions>
          <execution>
            <goals>
              <goal>prepare</goal>
              <goal>perform</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>3.0.0-M3</version>
        <configuration>
          <rules><requireUpperBoundDeps /></rules>
          <fail>true</fail>
        </configuration>
        <executions>
          <execution>
            <id>enforce-upper-bound-deps</id>
            <phase>compile</phase>
            <goals>
              <goal>enforce</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.5.0</version>
        <executions>
          <execution>
            <!-->nexus-staging-maven-plugin executes 'attach-javadoc' but we
            want to ignore the kotlin references and not run all the goals
            except for the jar goal from maven-javadoc-plugin.</-->
            <id>attach-javadoc</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <!-->Exclude packages with Kotlin reference(s). Javadoc does not understand kotlin</-->
          <excludePackageNames>com.srcclr.sdk:com.srcclr.sdk.build</excludePackageNames>
        </configuration>
      </plugin>

      <!--> See https://www.simplify4u.org/sign-maven-plugin/.  </-->
      <plugin>
        <groupId>org.simplify4u.plugins</groupId>
        <artifactId>sign-maven-plugin</artifactId>
        <version>1.0.1</version>
        <executions>
          <execution>
            <goals>
              <goal>sign</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <!-->Used to publish publicly to oss.sonartype.org -> repo.maven.apache
        .org<!-->
        <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://oss.sonatype.org/</nexusUrl>
          <autoReleaseAfterClose>true</autoReleaseAfterClose>
        </configuration>
      </plugin>

    </plugins>
  </build>

  <distributionManagement>
    <snapshotRepository>
      <uniqueVersion>false</uniqueVersion>
      <id>laputaSnapshots</id>
      <name>Laputa Snapshots</name>
      <url>https://maven.laputa.veracode.io/api/object/snapshots</url>
      <layout>default</layout>
    </snapshotRepository>
    <!-->We publish srcclr-sdk-java releases to public repo that our
    customers can reach since srcclr agent downloads srcclr-sdk-java for
    maven/gradle builds.
    </-->
    <repository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
  </distributionManagement>

</project>
