<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright © 2010-2023 OddSource Code (license@oddsource.io)

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->
<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>io.oddsource.java</groupId>
    <artifactId>oss-grandparent</artifactId>
    <version>2.4.0</version>
    <packaging>pom</packaging>

    <name>OddSource OSS Grandparent</name>
    <description>
        Grandparent POM for all OddSource Java Code projects and the build resources project.
    </description>

    <modules>
        <module>oss-build-resources</module>
        <module>oss-parent</module>
    </modules>

    <licenses>
        <license>
            <name>Apache-2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo,maven,manual</distribution>
        </license>
    </licenses>

    <url>http://oddsource.io/</url>
    <scm>
        <url>https://github.com/OddSource/java-oss-parent</url>
        <connection>scm:git:https://github.com/OddSource/java-oss-parent.git</connection>
        <developerConnection>scm:git:git@github.com:OddSource/java-oss-parent.git</developerConnection>
    </scm>
    <issueManagement>
        <system>GitHub Issues</system>
        <url>https://github.com/OddSource/java-oss-parent/issues</url>
    </issueManagement>
    <inceptionYear>2010</inceptionYear>

    <organization>
        <name>OddSource Code</name>
        <url>http://oddsource.io/</url>
    </organization>

    <developers>
        <developer>
            <id>nicholas.williams</id>
            <name>Nick Williams</name>
            <email>nicholas@nicholaswilliams.net</email>
            <url>http://www.nicholaswilliams.net</url>
            <timezone>America/Chicago</timezone>
        </developer>
    </developers>

    <contributors>

    </contributors>

    <properties>
        <gpg.keyname>1AD267184ADD933C9C6D48E4FE2E2E95AC572F8F</gpg.keyname>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <distribution.repo.url.sonatype.base>https://oss.sonatype.org/</distribution.repo.url.sonatype.base>
        <distribution.repo.url.sonatype.snapshot>${distribution.repo.url.sonatype.base}content/repositories/snapshots</distribution.repo.url.sonatype.snapshot>
        <distribution.repo.url.sonatype.staging>${distribution.repo.url.sonatype.base}service/local/staging/deploy/maven2</distribution.repo.url.sonatype.staging>
        <version.plugin.checksum>1.8</version.plugin.checksum>
        <version.plugin.compiler>3.11.0</version.plugin.compiler>
        <version.plugin.deploy>3.1.1</version.plugin.deploy>
        <version.plugin.enforcer>3.3.0</version.plugin.enforcer>
        <version.plugin.gpg>3.1.0</version.plugin.gpg>
        <version.plugin.install>3.1.1</version.plugin.install>
        <version.plugin.jar>3.3.0</version.plugin.jar>
        <version.plugin.javadoc>3.6.0</version.plugin.javadoc>
        <version.plugin.license>4.2</version.plugin.license>
        <version.plugin.source>3.3.0</version.plugin.source>
        <version.plugin.spotbugs>4.7.3.6</version.plugin.spotbugs>
        <maven.plugin.validation>VERBOSE</maven.plugin.validation>
    </properties>

    <repositories>
        <repository>
            <id>sonatype-nexus-snapshots</id>
            <name>Sonatype Nexus Snapshots</name>
            <url>${distribution.repo.url.sonatype.snapshot}</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>

    <distributionManagement>
        <snapshotRepository>
            <id>sonatype-nexus-snapshots</id>
            <name>Sonatype Nexus Snapshot Repository</name>
            <url>${distribution.repo.url.sonatype.snapshot}</url>
        </snapshotRepository>
        <repository>
            <id>sonatype-nexus-staging</id>
            <name>Sonatype Nexus Release-Staging Repository</name>
            <url>${distribution.repo.url.sonatype.staging}</url>
        </repository>
    </distributionManagement>

    <build>
        <sourceDirectory>source/production/java</sourceDirectory>
        <resources>
            <resource>
                <directory>source/production/resources</directory>
            </resource>
        </resources>

        <testSourceDirectory>source/test/java</testSourceDirectory>
        <testResources>
            <testResource>
                <directory>source/test/resources</directory>
            </testResource>
        </testResources>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>com.github.spotbugs</groupId>
                    <artifactId>spotbugs-maven-plugin</artifactId>
                    <version>${version.plugin.spotbugs}</version>
                    <inherited>true</inherited>
                    <configuration>
                        <effort>Max</effort>
                        <excludeFilterFile>build/spotbugs-exclude.xml</excludeFilterFile>
                        <threshold>Low</threshold>
                        <xmlOutput>true</xmlOutput>
                    </configuration>
                    <executions>
                        <execution>
                            <id>spotbugs-verify-check</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>${version.plugin.enforcer}</version>
                    <inherited>true</inherited>
                    <executions>
                        <execution>
                            <id>enforce-maven</id>
                            <goals>
                                <goal>display-info</goal>
                                <goal>enforce</goal>
                            </goals>
                            <configuration>
                                <rules>
                                    <requireMavenVersion>
                                        <version>[3.0.5,4.0)</version>
                                    </requireMavenVersion>
                                    <requireJavaVersion>
                                        <version>[1.8,1.9),[11.0,12),[17.0,18),[21.0,22)</version>
                                    </requireJavaVersion>
                                </rules>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>com.mycila</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                    <version>${version.plugin.license}</version>
                    <inherited>true</inherited>
                    <configuration>
                        <licenseSets>
                            <licenseSet>
                                <excludes>
                                    <exclude>**/*.dylib</exclude>
                                    <exclude>**/*.enc</exclude>
                                    <exclude>**/*.key</exclude>
                                    <exclude>**/*.lib</exclude>
                                    <exclude>**/*.rst</exclude>
                                    <exclude>**/*.txt</exclude>
                                    <exclude>**/.gitkeep</exclude>
                                    <exclude>**/.gitignore</exclude>
                                    <exclude>**/*.properties</exclude><!-- Plugin has a hard time with these -->
                                    <exclude>**/io_oddsource_java*.h</exclude><!-- Auto-generated JNI headers -->
                                    <exclude>replace_version.sh</exclude><!-- Plugin can't handle the shebang -->
                                </excludes>
                                <header>com/mycila/maven/plugin/license/templates/APACHE-2.txt</header>
                                <properties>
                                    <owner>OddSource Code</owner>
                                    <email>license@oddsource.io</email>
                                    <year>2010-2023</year>
                                </properties>
                            </licenseSet>
                        </licenseSets>
                        <mapping>
                            <c>SLASHSTAR_STYLE</c>
                            <cpp>SLASHSTAR_STYLE</cpp>
                            <Dockerfile-jdk8>SCRIPT_STYLE</Dockerfile-jdk8>
                            <Dockerfile-jdk11>SCRIPT_STYLE</Dockerfile-jdk11>
                            <Dockerfile-jdk17>SCRIPT_STYLE</Dockerfile-jdk17>
                            <Dockerfile-jdk21>SCRIPT_STYLE</Dockerfile-jdk21>
                            <groovy>SLASHSTAR_STYLE</groovy>
                            <h>SLASHSTAR_STYLE</h>
                            <java>SLASHSTAR_STYLE</java>
                            <Makefile>SCRIPT_STYLE</Makefile>
                            <properties>SCRIPT_STYLE</properties>
                            <yaml>SCRIPT_STYLE</yaml>
                            <yml>SCRIPT_STYLE</yml>
                        </mapping>
                    </configuration>
                    <executions>
                        <execution>
                            <id>license-verify-check</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>${version.plugin.gpg}</version>
                    <inherited>true</inherited>
                    <configuration>
                        <keyname>${gpg.keyname}</keyname>
                        <passphraseServerId>${gpg.keyname}</passphraseServerId>
                    </configuration>
                    <executions>
                        <execution>
                            <id>sign-artifacts</id>
                            <phase>install</phase>
                            <goals>
                                <goal>sign</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>${version.plugin.install}</version>
                    <inherited>true</inherited>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>${version.plugin.deploy}</version>
                    <inherited>true</inherited>
                    <configuration>
                    </configuration>
                    <executions>
                        <execution>
                            <id>default-deploy</id>
                            <phase>deploy</phase>
                            <goals>
                                <goal>deploy</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>com.github.spotbugs</groupId>
                <artifactId>spotbugs-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-install-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <reporting>
        <plugins>

        </plugins>
    </reporting>

    <profiles>
        <profile>
            <id>sign</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
