<?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>org.lembeck</groupId>
    <artifactId>simconnect-java-util</artifactId>
    <version>0.1</version>
    <packaging>jar</packaging>
    <url>https://github.com/chrlembeck/simconnect-java-util</url>
    <description>The simconnect-java-util project contains a java client for the simconnect interface of the microsoft flight simulator 2020.</description>

    <developers>
        <developer>
            <name>Christoph Lembeck</name>
            <timezone>Europe/Berlin</timezone>
        </developer>
    </developers>

    <licenses>
        <license>
            <name>GPL-3.0-only</name>
            <url>https://www.gnu.org/licenses/gpl-3.0.html</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:https://github.com/chrlembeck/simconnect-java-util.git</connection>
        <developerConnection>scm:git:https://github.com/chrlembeck/simconnect-java-util.git</developerConnection>
        <url>https://github.com/chrlembeck/simconnect-java-util</url>
    </scm>

    <properties>
        <minimum-maven-version>3.9.6</minimum-maven-version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.release>21</maven.compiler.release>
        <junit-jupiter.version>5.10.2</junit-jupiter.version>
        <maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
        <maven-surefire-plugin>3.2.5</maven-surefire-plugin>
        <maven-jar-plugin.version>3.3.0</maven-jar-plugin.version>
        <maven-source-plugin.version>3.3.0</maven-source-plugin.version>
        <maven-javadoc-plugin.version>3.6.3</maven-javadoc-plugin.version>
        <maven-gpg-plugin.version>3.2.2</maven-gpg-plugin.version>
        <maven-project-info-reports-plugin.version>3.5.0</maven-project-info-reports-plugin.version>
        <checksum-maven-plugin.version>1.11</checksum-maven-plugin.version>
        <maven-enforcer-plugin.version>3.4.1</maven-enforcer-plugin.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter-api</artifactId>
                <version>${junit-jupiter.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${maven-surefire-plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${maven-compiler-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>${maven-jar-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>${maven-source-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>${maven-javadoc-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>${maven-gpg-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-project-info-reports-plugin</artifactId>
                    <version>${maven-project-info-reports-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>net.nicoulaj.maven.plugins</groupId>
                    <artifactId>checksum-maven-plugin</artifactId>
                    <version>${checksum-maven-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>${maven-enforcer-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>3.3.1</version>
                    <dependencies>
                        <dependency>
                            <groupId>com.puppycrawl.tools</groupId>
                            <artifactId>checkstyle</artifactId>
                            <version>10.15.0</version>
                        </dependency>
                    </dependencies>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>21</source>
                    <target>21</target>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                            <locale>en_US</locale>
                            <show>protected</show>
                            <doclint>all,missing</doclint>
                            <quiet>false</quiet>
                            <verbose>true</verbose>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>net.nicoulaj.maven.plugins</groupId>
                <artifactId>checksum-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>artifacts</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <algorithms>
                        <algorithm>MD5</algorithm>
                        <algorithm>SHA-1</algorithm>
                    </algorithms>
                </configuration>
            </plugin>
            <!--            <plugin>
                            <groupId>net.nicoulaj.maven.plugins</groupId>
                            <artifactId>checksum-maven-plugin</artifactId>
                            <executions>
                                <execution>
                                    <goals>
                                        <goal>files</goal>
                                    </goals>
                                </execution>
                            </executions>
                            <configuration>
                                <algorithms>
                                    <algorithm>MD5</algorithm>
                                    <algorithm>SHA-1</algorithm>
                                </algorithms>
                                <fileSets>
                                    <fileSet>
                                        <directory>target</directory>
                                        <include>*.pom</include>
                                    </fileSet>
                                </fileSets>
                            </configuration>
                        </plugin>-->

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <executions>
                    <execution>
                        <id>enforce-maven</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireMavenVersion>
                                    <version>${minimum-maven-version}</version>
                                </requireMavenVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>distribute</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>javadoc</report>
                        </reports>
                    </reportSet>
                </reportSets>
                <configuration>
                    <locale>en_US</locale>
                    <show>protected</show>
                    <doclint>all,missing</doclint>
                    <quiet>true</quiet>
                    <verbose>false</verbose>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>checkstyle</report>
                        </reports>
                    </reportSet>
                </reportSets>
                <configuration>
                    <configLocation>build/checkstyle.xml</configLocation>
                </configuration>

            </plugin>
        </plugins>
    </reporting>
</project>