<?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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.salesforce.maven</groupId>
    <artifactId>MavenBase</artifactId>
    <version>2.0.1</version>
    <packaging>pom</packaging>
    <name>${project.artifactId}</name>
    <description>Please don't use this parent pom, but instead use MavenParent.   This project exists to produce a site skin, a set of 
       static analysis checks, and MavenParent that can use the later as bundled jar files downloaded from maven central.</description>
    <modules>
        <module>MavenSiteSkin</module>
        <module>MavenAnalysisConf</module>
        <module>MavenParent</module>
    </modules>
    <properties>
        <!-- dependency.locations.enabled>false</dependency.locations.enabled -->
        <github.domain>github.com</github.domain>
        <github.owner>salesforce</github.owner>
        <github.project>MavenParent</github.project>
        <!-- github.site.host>${github.domain}</github.site.host -->
        <github.site.location>${project.version}/</github.site.location>
        <github.site.server>${github.domain}</github.site.server>
        <parameter.distribution.autorelease>true</parameter.distribution.autorelease>
        <parameter.distribution.nexus>oss.sonatype.org</parameter.distribution.nexus>
        <parameter.distribution.releases>https://oss.sonatype.org/service/local/staging/deploy/maven2/</parameter.distribution.releases>
        <parameter.distribution.skipstaging>false</parameter.distribution.skipstaging>
        <parameter.distribution.snapshots>https://oss.sonatype.org/content/repositories/snapshots/</parameter.distribution.snapshots>
        <parameter.github.site.deploy.skip>false</parameter.github.site.deploy.skip>
        <parameter.license>BSD-3</parameter.license>
        <parameter.sortpom.disabled>false</parameter.sortpom.disabled>
        <parameter.standard.site.deploy.skip>true</parameter.standard.site.deploy.skip>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <version.clean.maven.plugin>3.1.0</version.clean.maven.plugin>
        <version.gpg.maven.plugin>1.6</version.gpg.maven.plugin>
        <version.javadoc.maven.plugin>3.2.0</version.javadoc.maven.plugin>
        <version.nexus.staging.maven.plugin>1.6.8</version.nexus.staging.maven.plugin>
        <version.reports.maven.plugin>3.0.0</version.reports.maven.plugin>
        <version.site.maven.plugin>3.9.1</version.site.maven.plugin>
        <version.sortpom.maven.plugin>2.12.0</version.sortpom.maven.plugin>
        <version.sources.maven.plugin>3.2.1</version.sources.maven.plugin>
    </properties>
    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>com.github.ekryd.sortpom</groupId>
                    <artifactId>sortpom-maven-plugin</artifactId>
                    <version>${version.sortpom.maven.plugin}</version>
                    <configuration>
                        <skip>${parameter.sortpom.disabled}</skip>
                        <indentSize>4</indentSize>
                        <sortOrderFile>com/shankyank/pom_sort_order.xml</sortOrderFile>
                        <lineSeparator>\n</lineSeparator>
                        <encoding>${project.build.sourceEncoding}</encoding>
                        <sortProperties>true</sortProperties>
                        <keepBlankLines>true</keepBlankLines>
                        <sortDependencies>scope,groupId,artifactId</sortDependencies>
                        <sortPlugins>groupId,artifactId</sortPlugins>
                        <nrOfIndentSpace>4</nrOfIndentSpace>
                        <createBackupFile>false</createBackupFile>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>com.shankyank</groupId>
                            <artifactId>sortpom-config</artifactId>
                            <version>1.0</version>
                        </dependency>
                    </dependencies>
                    <executions>
                        <execution>
                            <goals>
                                <goal>verify</goal>
                            </goals>
                            <phase>verify</phase>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>com.github.github</groupId>
                    <artifactId>site-maven-plugin</artifactId>
                    <version>0.12</version>
                    <configuration>
                        <path>${github.site.location}</path>
                        <merge>true</merge>
                        <message>Updating maven generated documentation for ${project.version}</message>
                        <skip>${parameter.github.site.deploy.skip}</skip>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>site</goal>
                            </goals>
                            <phase>site-deploy</phase>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>${version.clean.maven.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>${version.gpg.maven.plugin}</version>
                    <executions>
                        <execution>
                            <id>sign-artifacts</id>
                            <goals>
                                <goal>sign</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>${version.javadoc.maven.plugin}</version>
                    <executions>
                        <execution>
                            <id>attach-javadocs</id>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>${version.site.maven.plugin}</version>
                    <configuration>
                        <relativizeDecorationLinks>false</relativizeDecorationLinks>
                        <attach>false</attach>
                        <skipDeploy>${parameter.standard.site.deploy.skip}</skipDeploy>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>${version.sources.maven.plugin}</version>
                    <executions>
                        <execution>
                            <id>attach-sources</id>
                            <goals>
                                <goal>jar-no-fork</goal>
                            </goals>
                            <phase>package</phase>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <!-- deploy artifacts if and only if all projects in a reactor build succeed. -->
                    <groupId>org.sonatype.plugins</groupId>
                    <artifactId>nexus-staging-maven-plugin</artifactId>
                    <version>${version.nexus.staging.maven.plugin}</version>
                    <extensions>true</extensions>
                    <configuration>
                        <skipStaging>${parameter.distribution.skipstaging}</skipStaging>
                        <nexusUrl>https://${parameter.distribution.nexus}</nexusUrl>
                        <serverId>${parameter.distribution.nexus}</serverId>
                        <autoReleaseAfterClose>${parameter.distribution.autorelease}</autoReleaseAfterClose>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>com.github.ekryd.sortpom</groupId>
                <artifactId>sortpom-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <!-- default to deploying to github site with github plugin. -->
                <groupId>com.github.github</groupId>
                <artifactId>site-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-site-descriptor</id>
                        <goals>
                            <goal>attach-descriptor</goal>
                        </goals>
                        <inherited>false</inherited>
                        <configuration>
                            <attach>true</attach>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-source-plugin</artifactId>
            </plugin>
            <plugin>
                <!-- deploy artifacts if and only if all projects in a reactor build succeed. -->
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>${version.reports.maven.plugin}</version>
                <configuration>
                    <linkOnly>true</linkOnly>
                </configuration>
            </plugin>
        </plugins>
    </reporting>
    <url>https://${github.domain}/${github.owner}/${github.project}/</url>
    <inceptionYear>2020</inceptionYear>
    <organization>
        <name>Salesforce OSS</name>
        <url>https://github.com/salesforce/</url>
    </organization>
    <licenses>
        <license>
            <name>${parameter.license}</name>
        </license>
    </licenses>
    <developers>
        <developer>
            <id>rexhoffman</id>
            <email>rex.hoffman@salesforce.com</email>
            <timezone>-8</timezone>
        </developer>
    </developers>
    <scm>
        <connection>scm:git:git:${github.domain}:${github.owner}/${github.project}.git</connection>
        <developerConnection>scm:git:git:${github.domain}:${github.owner}/${github.project}.git</developerConnection>
        <url>https://${github.domain}/${github.owner}/${github.project}/blob/master/</url>
    </scm>
    <issueManagement>
        <system>Github Issues</system>
        <url>https://${github.domain}/${github.owner}/${github.project}/issues</url>
    </issueManagement>
    <ciManagement>
        <notifiers>
            <notifier>
                <sendOnError>true</sendOnError>
                <sendOnFailure>true</sendOnFailure>
            </notifier>
        </notifiers>
    </ciManagement>
    <distributionManagement>
        <repository>
            <id>${parameter.distribution.nexus}</id>
            <name>Nexus Release Repository</name>
            <url>${parameter.distribution.releases}</url>
        </repository>
        <snapshotRepository>
            <id>${parameter.distribution.nexus}</id>
            <name>Sonatype Nexus Snapshots</name>
            <url>${parameter.distribution.snapshots}</url>
        </snapshotRepository>
        <site>
            <id>${github.domain}</id>
            <name>${github.domain}</name>
            <url>scm:git:ssh://git@${github.domain}/${github.owner}/${github.project}.git</url>
        </site>
    </distributionManagement>
</project>
