<?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>net.frogmouth.chronyjava</groupId>
    <artifactId>chrony-java-parent</artifactId>
    <version>0.7</version>
    <packaging>pom</packaging>
    <name>Chrony Java Parent</name>
    <description>Aggregator for Chrony Java project</description>
    <url>https://github.com/bradh/chrony-java-parent</url>
    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>
    <developers>
        <developer>
            <name>Brad Hards</name>
        </developer>
    </developers>
    <modules>
        <module>chrony-java</module>
        <module>chrony-java-cli</module>
    </modules>
    <scm>
        <connection>scm:git:git://github.com/bradh/chrony-java-parent.git</connection>
        <developerConnection>scm:git:https://github.com/bradh/chrony-java-parent.git</developerConnection>
        <tag>chrony-java-parent-0.7</tag>
        <url>https://github.com/bradh/chrony-java-parent.git</url>
    </scm>
    <distributionManagement>
        <repository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>
    <properties>
        <googleformatter.maven.plugin.version>1.7.5</googleformatter.maven.plugin.version>
        <jacoco.version>0.8.7</jacoco.version>
        <maven.compiler.source>11</maven.compiler.source>
        <maven.compiler.target>11</maven.compiler.target>
        <maven.javadoc.plugin.version>3.3.1</maven.javadoc.plugin.version>
        <maven.source.plugin.version>3.2.1</maven.source.plugin.version>
        <maven.versions.plugin.version>2.8.1</maven.versions.plugin.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <sortpom.version>3.0.0</sortpom.version>
    </properties>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.testng</groupId>
                <artifactId>testng</artifactId>
                <version>7.4.0</version>
                <type>jar</type>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>com.theoryinpractise</groupId>
                    <artifactId>googleformatter-maven-plugin</artifactId>
                    <version>${googleformatter.maven.plugin.version}</version>
                    <executions>
                        <execution>
                            <id>reformat-sources</id>
                            <goals>
                                <goal>format</goal>
                            </goals>
                            <phase>process-sources</phase>
                            <configuration>
                                <style>AOSP</style>
                                <fixImports>true</fixImports>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>com.github.spotbugs</groupId>
                    <artifactId>spotbugs-maven-plugin</artifactId>
                    <version>${spotbugs.maven.version}</version>
                    <dependencies>
                        <dependency>
                            <groupId>com.github.spotbugs</groupId>
                            <artifactId>spotbugs</artifactId>
                            <version>${spotbugs.version}</version>
                        </dependency>
                    </dependencies>
                    <executions>
                        <execution>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>${maven.checkstyle.plugin}</version>
                    <configuration>
                        <configLocation>checkstyle.xml</configLocation>
                        <encoding>UTF-8</encoding>
                        <consoleOutput>true</consoleOutput>
                        <failsOnError>true</failsOnError>
                        <linkXRef>false</linkXRef>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>com.puppycrawl.tools</groupId>
                            <artifactId>checkstyle</artifactId>
                            <version>${checkstyle.version}</version>
                        </dependency>
                    </dependencies>
                    <executions>
                        <execution>
                            <id>validate</id>
                            <goals>
                                <goal>check</goal>
                            </goals>
                            <phase>validate</phase>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.owasp</groupId>
                    <artifactId>dependency-check-maven</artifactId>
                    <version>${owasp.dependency-check.version}</version>
                    <configuration>
                        <failBuildOnAnyVulnerability>true</failBuildOnAnyVulnerability>
                        <assemblyAnalyzerEnabled>false</assemblyAnalyzerEnabled>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>${maven.source.plugin.version}</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <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>
                    <quiet>true</quiet>
                    <source>11</source>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <!-- jacoco plugin for test coverage report -->
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${jacoco.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>report</id>
                        <goals>
                            <goal>report</goal>
                        </goals>
                        <phase>prepare-package</phase>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.github.ekryd.sortpom</groupId>
                <artifactId>sortpom-maven-plugin</artifactId>
                <version>${sortpom.version}</version>
                <configuration>
                    <predefinedSortOrder>recommended_2008_06</predefinedSortOrder>
                    <lineSeparator>\n</lineSeparator>
                    <encoding>${project.build.sourceEncoding}</encoding>
                    <nrOfIndentSpace>4</nrOfIndentSpace>
                    <sortProperties>true</sortProperties>
                    <keepBlankLines>false</keepBlankLines>
                    <sortDependencies>scope</sortDependencies>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>sort</goal>
                        </goals>
                        <phase>verify</phase>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>versions-maven-plugin</artifactId>
                <version>${maven.versions.plugin.version}</version>
                <configuration>
                    <generateBackupPoms>false</generateBackupPoms>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>1.5</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                        <phase>verify</phase>
                        <configuration>
                            <keyname>A0619DFCD036BF847C211319232477E584D23B5C</keyname>
                            <passphraseServerId>A0619DFCD036BF847C211319232477E584D23B5C</passphraseServerId>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>1.6.7</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
