<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>org.fuin</groupId>
    <artifactId>pom</artifactId>
    <packaging>pom</packaging>
    <version>2.0.2</version>
    <name>Base POM for fuin.org projects</name>
    <url>https://github.com/fuinorg/pom/</url>
    <description>Provides standard settings for http://www.fuin.org/ projects.</description>

    <licenses>
        <license>
            <name>LGPL</name>
            <url>http://www.fsf.org/licensing/licenses/lgpl.html</url>
            <distribution>repo</distribution>
            <comments>GNU Lesser General Public License</comments>
        </license>
    </licenses>

    <organization>
        <name>fuin.org (Germany)</name>
        <url>http://www.fuin.org/</url>
    </organization>

    <developers>
        <developer>
            <id>michael-schnell</id>
            <email>michael@fuin.org</email>
            <name>Michael Schnell</name>
            <url>https://github.com/michael-schnell</url>
        </developer>
    </developers>

    <scm>
        <url>https://github.com/fuinorg/pom/</url>
        <connection>scm:git:git://github.com/fuinorg/pom.git</connection>
        <developerConnection>scm:git:git@github.com:fuinorg/pom.git</developerConnection>
    </scm>

    <issueManagement>
        <system>GitHub Issues</system>
        <url>https://github.com/fuinorg/pom/issues</url>
    </issueManagement>

    <properties>
        <java.version>25</java.version>
        <java.release.version>17</java.release.version>
        <maven.compiler.release>${java.release.version}</maven.compiler.release>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <arguments/>
    </properties>

    <build>

        <pluginManagement>

            <plugins>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jdeps-plugin</artifactId>
                    <version>3.2.0</version>
                    <configuration>
                        <multiRelease>base</multiRelease>
                        <failOnWarning>true</failOnWarning>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>jdkinternals</goal>
                                <goal>test-jdkinternals</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.5.0</version>
                    <configuration>
                        <includes>
                            <include>**/*</include>
                        </includes>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.15.0</version>
                    <configuration>
                        <release>${java.release.version}</release>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>3.12.0</version>
                    <executions>
                        <execution>
                            <id>attach-javadocs</id>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>3.5.5</version>
                </plugin>

                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>0.8.14</version>
                    <executions>
                        <execution>
                            <id>prepare-agent</id>
                            <goals>
                                <goal>prepare-agent</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <version>6.0.2</version>
                    <extensions>true</extensions>
                    <executions>
                        <execution>
                            <id>create-manifest</id>
                            <phase>package</phase>
                            <goals>
                                <goal>bundle</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.4.0</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-release-plugin</artifactId>
                    <version>3.3.1</version>
                </plugin>

            </plugins>

        </pluginManagement>

        <plugins>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>3.6.2</version>
                <executions>
                    <execution>
                        <id>enforce-java-and-maven-version</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireJavaVersion>
                                    <version>${java.version}</version>
                                    <message>Java ${java.version} or later is required!</message>
                                </requireJavaVersion>
                                <requireMavenVersion>
                                    <version>3.6.0</version>
                                    <message>Please use at least Maven 3.6.0 as older versions may cause problems with Java 11+</message>
                                </requireMavenVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

        </plugins>

    </build>

    <reporting>

        <plugins>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>3.9.0</version>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>

        </plugins>

    </reporting>

    <profiles>

        <profile>
            <id>central-sonatype-release</id>

            <build>

                <plugins>

                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>properties-maven-plugin</artifactId>
                        <version>1.3.0</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>set-system-properties</goal>
                                </goals>
                                <configuration>
                                    <properties>
                                        <property>
                                            <name>gpg.passphrase</name>
                                            <value>${gpg.passphrase}</value>
                                        </property>
                                    </properties>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.2.8</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <gpgArguments>
                                        <arg>--pinentry-mode</arg>
                                        <arg>loopback</arg>
                                    </gpgArguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.sonatype.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                        <version>0.10.0</version>
                        <extensions>true</extensions>
                        <configuration>
                            <publishingServerId>central-sonatype</publishingServerId>
                        </configuration>
                    </plugin>

                </plugins>

            </build>

        </profile>


        <profile>
            <id>only-eclipse</id>
            <activation>
                <property>
                    <name>m2e.version</name>
                </property>
            </activation>
            <build>
                <pluginManagement>

                    <plugins>
                        <!--This plugin's configuration is used to store Eclipse m2e settings 
                    only. It has no influence on the Maven build itself. -->
                        <plugin>
                            <groupId>org.eclipse.m2e</groupId>
                            <artifactId>lifecycle-mapping</artifactId>
                            <version>1.0.0</version>
                            <configuration>
                                <lifecycleMappingMetadata>
                                    <pluginExecutions>
                                        <pluginExecution>
                                            <pluginExecutionFilter>
                                                <groupId>org.codehaus.mojo</groupId>
                                                <artifactId>properties-maven-plugin</artifactId>
                                                <versionRange>[1.1.0,)</versionRange>
                                                <goals>
                                                    <goal>set-system-properties</goal>
                                                </goals>
                                            </pluginExecutionFilter>
                                            <action>
                                                <ignore/>
                                            </action>
                                        </pluginExecution>
                                        <pluginExecution>
                                            <pluginExecutionFilter>
                                                <groupId>org.apache.maven.plugins</groupId>
                                                <artifactId>maven-jdeps-plugin</artifactId>
                                                <versionRange>[3.1.2,)</versionRange>
                                                <goals>
                                                    <goal>jdkinternals</goal>
                                                    <goal>test-jdkinternals</goal>
                                                </goals>
                                            </pluginExecutionFilter>
                                            <action>
                                                <ignore/>
                                            </action>
                                        </pluginExecution>
                                    </pluginExecutions>
                                </lifecycleMappingMetadata>
                            </configuration>
                        </plugin>

                    </plugins>
                </pluginManagement>
            </build>
        </profile>

    </profiles>

</project>