<?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.zuora.sdk</groupId>
    <artifactId>zuora-sdk-java-root</artifactId>
    <version>2.0.15</version>
    <modules>
        <module>sdk-java-core</module>
        <module>sdk-java</module>
    </modules>

    <packaging>pom</packaging>

    <name>zuora-sdk-java</name>
    <description>The SDK of JAVA language for Zuora pricing system</description>
    <url>https://zuora.github.io/donut-api-documentation/</url>

    <licenses>
        <license>
            <name>MIT License</name>
            <url>http://www.opensource.org/licenses/mit-license.php</url>
        </license>
    </licenses>

    <scm>
        <!--        <connection>scm:git:git@git.zias.io:sdk/sdk-java.git</connection>-->
        <!--        <developerConnection>scm:git:ssh://git.zias.io/sdk/sdk-java.git</developerConnection>-->
        <url>https://github.com/zuora/sdk-java</url>
    </scm>

    <developers>
        <developer>
            <name>Tony Zhang</name>
            <email>tozhang@zuora.com</email>
            <organization>Zuora Inc.</organization>
            <organizationUrl>http://www.zuora.com</organizationUrl>
        </developer>
    </developers>

    <properties>
        <maven.compiler.source>8</maven.compiler.source>
        <maven.compiler.target>8</maven.compiler.target>
        <maven-deploy-plugin.version>2.7</maven-deploy-plugin.version>

        <maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
        <nexus-staging-maven-plugin.version>1.6.8</nexus-staging-maven-plugin.version>
        <maven-source-plugin.version>3.2.0</maven-source-plugin.version>
        <maven-compiler-plugin.version>3.8.0</maven-compiler-plugin.version>
        <maven-resources-plugin.version>3.1.0</maven-resources-plugin.version>
        <maven-javadoc-plugin.version>3.1.0</maven-javadoc-plugin.version>

        <dep.lombok.version>1.18.20</dep.lombok.version>
        <dep.mapstruct.version>1.4.2.Final</dep.mapstruct.version>

        <plugin.compiler.version>3.8.1</plugin.compiler.version>
    </properties>


    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>

        <!--        <repository>-->
        <!--            <id>zuora-nexus-releases</id>-->
        <!--            <url>https://nexus.zias.io/nexus/content/repositories/releases/</url>-->
        <!--        </repository>-->
        <!--        <snapshotRepository>-->
        <!--            <id>zuora-nexus-snapshots</id>-->
        <!--            <url>https://nexus.zias.io/nexus/content/repositories/snapshots/</url>-->
        <!--        </snapshotRepository>-->
    </distributionManagement>

    <dependencyManagement>
<!--        <dependencies>-->
<!--            <dependency>-->
<!--                <groupId>io.github.cdimascio</groupId>-->
<!--                <artifactId>java-dotenv</artifactId>-->
<!--                <version>5.2.2</version>-->
<!--            </dependency>-->
<!--            <dependency>-->
<!--                <groupId>org.jetbrains.kotlin</groupId>-->
<!--                <artifactId>kotlin-stdlib</artifactId>-->
<!--                <version>1.4.21</version>-->
<!--            </dependency>-->
<!--        </dependencies>-->
    </dependencyManagement>

    <build>

    </build>

    <profiles>
        <profile>
            <id>release-ossrh</id>
            <distributionManagement>
                <snapshotRepository>
                    <id>ossrh</id>
                    <url>https://oss.sonatype.org/content/repositories/snapshots</url>
                </snapshotRepository>
                <repository>
                    <id>ossrh</id>
                    <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
                </repository>
            </distributionManagement>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>${maven-source-plugin.version}</version>
                        <configuration>
                            <excludes>
                                <exclude>com/zuora/sdk/core/internal/telemetry/**</exclude>
                            </excludes>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>${maven-javadoc-plugin.version}</version>
                        <configuration>
                            <encoding>UTF-8</encoding>
                            <doclint>none</doclint>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${maven-gpg-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>

<!--                                                                <configuration>-->
<!--                                                                    <keyname>${gpg.keyname}</keyname>-->
<!--                                                                    <passphraseServerId>${gpg.passphrase}</passphraseServerId>-->
<!--                                                                </configuration>-->

                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.owasp</groupId>
                        <artifactId>dependency-check-maven</artifactId>
                        <version>7.4.4</version>
                        <configuration>
                            <failBuildOnAnyVulnerability>true</failBuildOnAnyVulnerability>
                            <skip>false</skip>
                            <showSummary>true</showSummary>
                            <format>ALL</format>
                            <archiveAnalyzerEnabled>true</archiveAnalyzerEnabled>
                            <assemblyAnalyzerEnabled>false</assemblyAnalyzerEnabled>
                            <autoconfAnalyzerEnabled>false</autoconfAnalyzerEnabled>
                            <centralAnalyzerEnabled>true</centralAnalyzerEnabled>
                            <cmakeAnalyzerEnabled>false</cmakeAnalyzerEnabled>
                            <composerAnalyzerEnabled>false</composerAnalyzerEnabled>
                            <jarAnalyzerEnabled>true</jarAnalyzerEnabled>
                            <nexusAnalyzerEnabled>false</nexusAnalyzerEnabled>
                            <nodeAnalyzerEnabled>false</nodeAnalyzerEnabled>
                            <nuspecAnalyzerEnabled>false</nuspecAnalyzerEnabled>
                            <opensslAnalyzerEnabled>false</opensslAnalyzerEnabled>
                            <pyDistributionAnalyzerEnabled>false</pyDistributionAnalyzerEnabled>
                            <pyPackageAnalyzerEnabled>false</pyPackageAnalyzerEnabled>
                            <rubygemsAnalyzerEnabled>false</rubygemsAnalyzerEnabled>
                            <suppressionFiles>suppressed-cves.xml</suppressionFiles>
                        </configuration>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <!-- this is from zuora parent pom -->
                        <groupId>com.github.spotbugs</groupId>
                        <artifactId>spotbugs-maven-plugin</artifactId>
                        <version>4.2.3</version>
                        <executions>
                            <execution>
                                <phase>verify</phase>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                                <configuration>
                                    <effort>Max</effort>
                                    <skip>false</skip>
                                    <maxHeap>1024</maxHeap>
                                    <failOnError>false</failOnError>
                                </configuration>
                            </execution>
                        </executions>
                        <configuration>
                            <effort>Max</effort>
                            <skip>false</skip>
                            <maxHeap>1024</maxHeap>
                            <failOnError>false</failOnError>
                            <excludeFilterFile>spotbugs-exclude.xml</excludeFilterFile>
                        </configuration>
                    </plugin>
<!--                    <plugin>-->
<!--                        <groupId>org.sonatype.plugins</groupId>-->
<!--                        <artifactId>nexus-staging-maven-plugin</artifactId>-->
<!--                        <version>${nexus-staging-maven-plugin.version}</version>-->
<!--                        <extensions>true</extensions>-->
<!--                        <configuration>-->
<!--                            <serverId>ossrh</serverId>-->
<!--                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>-->
<!--                            <autoReleaseAfterClose>false</autoReleaseAfterClose>-->
<!--                        </configuration>-->
<!--                    </plugin>-->
                </plugins>
            </build>
        </profile>
    </profiles>
</project>