<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.ta4j</groupId>
    <artifactId>ta4j-parent</artifactId>
    <version>0.18</version>
    <packaging>pom</packaging>

    <name>Ta4j Parent</name>
    <description>ta4j is a Java library providing a simple API for technical analysis.</description>
    <url>https://github.com/ta4j/ta4j</url>
    <inceptionYear>2014</inceptionYear>

    <developers>
        <developer>
            <id>mdeverdelhan</id>
            <name>Marc de Verdelhan</name>
        </developer>
        <developer>
            <id>team172011</id>
            <name>Simon-Justus Wimmer</name>
        </developer>
    </developers>

    <licenses>
        <license>
            <name>MIT License</name>
            <comments>All source code is under the MIT license.</comments>
        </license>
    </licenses>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/ta4j/ta4j/issues</url>
    </issueManagement>

    <distributionManagement>
        <snapshotRepository>
            <id>sonatype-nexus-snapshots</id>
            <name>Sonatype Nexus snapshot repository</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>sonatype-nexus-staging</id>
            <name>Sonatype Nexus release repository</name>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <ciManagement>
        <url>https://travis-ci.org/ta4j/ta4j</url>
    </ciManagement>

    <scm>
        <connection>scm:git:git://github.com/ta4j/ta4j.git</connection>
        <developerConnection>scm:git:git@github.com:ta4j/ta4j.git</developerConnection>
        <url>https://github.com/ta4j/ta4j</url>
        <tag>0.18</tag>
    </scm>

    <modules>
        <module>ta4j-core</module>
        <module>ta4j-examples</module>
    </modules>

    <properties>
        <!-- Encoding -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
         <junit-jupiter.version>5.11.3</junit-jupiter.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-classic</artifactId>
                <version>1.5.6</version>
            </dependency>

            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter</artifactId>
                <version>${junit-jupiter.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.junit.vintage</groupId>
                <artifactId>junit-vintage-engine</artifactId>
                <version>${junit-jupiter.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.assertj</groupId>
                <artifactId>assertj-core</artifactId>
                <version>3.26.3</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <profiles>

        <!-- Only when performing a release (i.e. not for snapshots) -->
        <profile>
            <id>sonatype-oss-release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.7.0</version>
                        <extensions>true</extensions>
                        <configuration>
                            <!-- The Base URL of Nexus instance where we want to stage -->
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <!-- The server "id" element from settings to use authentication from -->
                            <serverId>sonatype-nexus-staging</serverId>
                        </configuration>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>3.8.0</version>
                        <configuration>
                            <doclint>none</doclint>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <!-- Artifact signing -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.2.6</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

    </profiles>

    <build>
        <plugins>

            <!-- Build source and target -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.13.0</version>
                <configuration>
                    <release>21</release>
                    <source>21</source>
                    <target>21</target>
                    <showDeprecation>true</showDeprecation>
                    <showWarnings>true</showWarnings>
                </configuration>
            </plugin>
            <!-- Package sources -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.3.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- License headers -->
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>4.5</version>
                <configuration>
                    <licenseSets>
                        <licenseSet>
                            <header>LICENSE</header>
                            <includes>
                                <include>**/*.java</include>
                            </includes>
                        </licenseSet>
                    </licenseSets>
                </configuration>
            </plugin>

            <!-- Source formatter -->
            <plugin>
                <groupId>net.revelc.code.formatter</groupId>
                <artifactId>formatter-maven-plugin</artifactId>
                <version>2.24.1</version>
                <configuration>
                    <configFile>${project.basedir}/code-formatter.xml</configFile>
                </configuration>
            </plugin>

            <!-- Releases -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>3.1.1</version>
                <configuration>
                    <tagNameFormat>@{project.version}</tagNameFormat>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.maven.shared</groupId>
                        <artifactId>maven-invoker</artifactId>
                        <version>3.3.0</version>
                    </dependency>
                </dependencies>
            </plugin>

        </plugins>
    </build>

</project>
