<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns="http://maven.apache.org/POM/4.0.0"
        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>com.foursoft.harness</groupId>
    <artifactId>harness-parent</artifactId>
    <version>5.2.0</version>
    <packaging>pom</packaging>
    <name>Harness Parent</name>
    <description>Parent POM of all 4Soft Harness Projects.</description>
    <url>https://github.com/4Soft-de/harness-model</url>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <java.version>17</java.version>

        <!-- Dependencies -->
        <jakarta.version>4.0.4</jakarta.version>
        <slf4j.version>2.0.9</slf4j.version>
        <logback-classic.version>1.4.11</logback-classic.version>
        <junit.jupiter.version>5.10.0</junit.jupiter.version>
        <assertj-core.version>3.24.2</assertj-core.version>
        <maven-core.version>3.9.2</maven-core.version>

        <!-- Plugins -->
        <maven-jar-plugin.version>3.3.0</maven-jar-plugin.version>
        <maven-source-plugin.version>3.3.0</maven-source-plugin.version>
        <license-maven-plugin.version>2.3.0</license-maven-plugin.version>
        <maven-javadoc-plugin.version>3.6.2</maven-javadoc-plugin.version>
        <gitflow-maven-plugin.version>1.20.0</gitflow-maven-plugin.version>
        <maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version>
        <jacoco-maven-plugin.version>0.8.11</jacoco-maven-plugin.version>
        <maven-surefire-plugin.version>3.2.2</maven-surefire-plugin.version>

        <!-- xjc-maven wrapper -->
        <hisrc-higherjaxb-maven-plugin.version>2.1.1</hisrc-higherjaxb-maven-plugin.version>
        <!-- it's plugins -->
        <hisrc-hyperjaxb-annox-plugin.version>2.1.1</hisrc-hyperjaxb-annox-plugin.version>
        <jaxb-visitor.version>3.1.0</jaxb-visitor.version>
        <cxf-xjc-javadoc.version>4.0.0</cxf-xjc-javadoc.version>

        <!-- Release Plugins -->
        <maven-gpg-plugin.version>3.1.0</maven-gpg-plugin.version>
        <nexus-staging-maven-plugin.version>1.6.13</nexus-staging-maven-plugin.version>

        <!-- build and release properties -->
        <sonar.moduleKey>${project.groupId}:${project.artifactId}</sonar.moduleKey>
        <sonar.organization>4soft-de</sonar.organization>
        <sonar.host.url>https://sonarcloud.io</sonar.host.url>
        <sonar.coverage.jacoco.xmlReportPaths>${project.build.directory}/site/jacoco/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>

        <!-- build and release properties -->
        <sonar.projectKey>4Soft-de_harness-model</sonar.projectKey>
    </properties>

    <inceptionYear>2022</inceptionYear>

    <organization>
        <name>4Soft GmbH</name>
        <url>https://www.4soft.de</url>
    </organization>

    <licenses>
        <license>
            <name>MIT License</name>
            <url>http://www.opensource.org/licenses/mit-license.php</url>
        </license>
    </licenses>

    <modules>
        <module>navext</module>
        <module>kbl</module>
        <module>vec</module>
        <module>compatibility</module>
    </modules>

    <scm>
        <connection>scm:git:https://github.com/4Soft-de/harness-model.git</connection>
        <developerConnection>scm:git:https://github.com/4Soft-de/harness-model.git</developerConnection>
        <url>https://github.com/4Soft-de/harness-model/tree/main</url>
    </scm>

    <developers>
        <developer>
            <name>Rainer Ganß</name>
            <email>ganss@4soft.de</email>
            <organization>4Soft GmbH</organization>
            <organizationUrl>https://www.4soft.de</organizationUrl>
        </developer>
        <developer>
            <name>Johannes Becker</name>
            <email>becker@4soft.de</email>
            <organization>4Soft GmbH</organization>
            <organizationUrl>https://www.4soft.de</organizationUrl>
        </developer>
    </developers>

    <dependencyManagement>
        <dependencies>
            <!-- JAXB -->
            <dependency>
                <groupId>org.glassfish.jaxb</groupId>
                <artifactId>jaxb-bom</artifactId>
                <type>pom</type>
                <scope>import</scope>
                <version>${jakarta.version}</version>
            </dependency>

            <!-- Logging -->
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j.version}</version>
            </dependency>

            <!-- Other -->
            <dependency>
                <groupId>net.bytebuddy</groupId>
                <artifactId>byte-buddy</artifactId>
                <version>1.14.9</version>
            </dependency>
            <dependency>
                <groupId>org.reflections</groupId>
                <artifactId>reflections</artifactId>
                <version>0.10.2</version>
            </dependency>
            <dependency>
                <groupId>jakarta.annotation</groupId>
                <artifactId>jakarta.annotation-api</artifactId>
                <version>2.1.1</version>
            </dependency>

            <!-- Test -->
            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-classic</artifactId>
                <version>${logback-classic.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.assertj</groupId>
                <artifactId>assertj-core</artifactId>
                <version>${assertj-core.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter</artifactId>
                <version>${junit.jupiter.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.patrodyne.jvnet</groupId>
                <artifactId>hisrc-higherjaxb-maven-plugin-testing</artifactId>
                <version>${hisrc-higherjaxb-maven-plugin.version}</version>
                <scope>test</scope>
                <exclusions>
                    <exclusion>
                        <groupId>org.junit.jupiter</groupId>
                        <artifactId>junit-jupiter-api</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <!--logging-->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>

        <!-- test -->
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jaxb</groupId>
            <artifactId>jaxb-runtime</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <defaultGoal>install</defaultGoal>
        <pluginManagement>
            <plugins>
                <!-- Default Plugins -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${maven-compiler-plugin.version}</version>
                    <configuration>
                        <source>${java.version}</source>
                        <target>${java.version}</target>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>com.amashchenko.maven.plugin</groupId>
                    <artifactId>gitflow-maven-plugin</artifactId>
                    <version>${gitflow-maven-plugin.version}</version>
                    <configuration>
                        <argLine>-DskipTests -P release -s .mvn/release.settings.xml</argLine>
                        <installProject>true</installProject>
                        <skipTestProject>true</skipTestProject>
                        <postReleaseGoals>deploy</postReleaseGoals>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>${maven-javadoc-plugin.version}</version>
                    <configuration>
                        <doclint>none</doclint>
                        <verbose>false</verbose>
                        <show>protected</show>
                        <sourceFileExcludes>
                            <sourceFileExclude>**/module-info.java</sourceFileExclude>
                        </sourceFileExcludes>
                    </configuration>
                    <executions>
                        <execution>
                            <id>attach-javadocs</id>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>${maven-jar-plugin.version}</version>
                    <configuration>
                        <archive>
                            <addMavenDescriptor>false</addMavenDescriptor>
                        </archive>
                    </configuration>
                </plugin>
                <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</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                    <version>${license-maven-plugin.version}</version>
                    <configuration>
                        <verbose>false</verbose>
                        <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
                        <processStartTag>========================LICENSE_START=================================
                        </processStartTag>
                        <processEndTag>=========================LICENSE_END==================================
                        </processEndTag>
                    </configuration>
                    <executions>
                        <execution>
                            <id>first</id>
                            <goals>
                                <goal>update-file-header</goal>
                            </goals>
                            <phase>process-sources</phase>
                            <configuration>
                                <licenseName>mit</licenseName>
                                <roots>
                                    <root>src/main/java</root>
                                    <root>src/test/java</root>
                                </roots>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.sonatype.plugins</groupId>
                    <artifactId>nexus-staging-maven-plugin</artifactId>
                    <version>${nexus-staging-maven-plugin.version}</version>
                    <extensions>true</extensions>
                    <configuration>
                        <serverId>ossrh</serverId>
                        <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                        <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        <stagingProgressTimeoutMinutes>15</stagingProgressTimeoutMinutes>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>${maven-gpg-plugin.version}</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.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${maven-surefire-plugin.version}</version>
                    <configuration>
                        <useModulePath>false</useModulePath>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>${jacoco-maven-plugin.version}</version>
                    <executions>
                        <execution>
                            <id>before-unit-test-execution</id>
                            <goals>
                                <goal>prepare-agent</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>report</id>
                            <goals>
                                <goal>report</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.patrodyne.jvnet</groupId>
                    <artifactId>hisrc-higherjaxb-maven-plugin</artifactId>
                    <version>${hisrc-higherjaxb-maven-plugin.version}</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>license-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
            <distributionManagement>
                <snapshotRepository>
                    <id>ossrh</id>
                    <url>https://oss.sonatype.org/content/repositories/snapshots</url>
                </snapshotRepository>
                <repository>
                    <id>ossrh</id>
                    <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
                </repository>
            </distributionManagement>
        </profile>
    </profiles>
</project>
