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

    Copyright (c) 2019, RTE (http://www.rte-france.com)
    This Source Code Form is subject to the terms of the Mozilla Public
    License, v. 2.0. If a copy of the MPL was not distributed with this
    file, You can obtain one at http://mozilla.org/MPL/2.0/.

-->
<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>com.powsybl</groupId>
    <artifactId>powsybl</artifactId>
    <version>9</version>
    <packaging>pom</packaging>

    <name>Powsybl</name>
    <description>Powsybl</description>
    <url>https://www.powsybl.org/</url>

    <licenses>
        <license>
            <name>Mozilla Public License, Version 2.0</name>
            <url>https://www.mozilla.org/en-US/MPL/2.0/</url>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:https://github.com/powsybl/powsybl-parent.git</connection>
        <developerConnection>scm:git:https://github.com/powsybl/powsybl-parent.git</developerConnection>
        <url>https://github.com/powsybl/powsybl-parent/tree/main/</url>
    </scm>

    <modules>
        <module>powsybl-build-tools</module>
        <module>powsybl-parent</module>
    </modules>

    <developers>
        <developer>
            <name>Mathieu BAGUE</name>
            <email>mathieu.bague@rte-france.com</email>
            <organization>RTE</organization>
            <organizationUrl>http://www.rte-france.com/</organizationUrl>
        </developer>
        <developer>
            <name>Jon HARPER</name>
            <email>jon.harper@rte-france.com</email>
            <organization>RTE</organization>
            <organizationUrl>http://www.rte-france.com/</organizationUrl>
        </developer>
        <developer>
            <name>Geoffroy JAMGOTCHIAN</name>
            <email>geoffroy.jamgotchian@rte-france.com</email>
            <organization>RTE</organization>
            <organizationUrl>http://www.rte-france.com/</organizationUrl>
        </developer>
        <developer>
            <name>Sylvain LECLERC</name>
            <email>sylvain.leclerc@rte-france.com</email>
            <organization>RTE</organization>
            <organizationUrl>http://www.rte-france.com/</organizationUrl>
        </developer>
        <developer>
            <name>Sébastien Murgey</name>
            <email>sebastien.murgey@rte-france.com</email>
            <organization>RTE</organization>
            <organizationUrl>http://www.rte-france.com/</organizationUrl>
        </developer>
        <developer>
            <name>Miora Ralambotiana</name>
            <email>miora.ralambotiana@rte-france.com</email>
            <organization>RTE</organization>
            <organizationUrl>http://www.rte-france.com/</organizationUrl>
        </developer>
        <developer>
            <name>Anne Tilloy</name>
            <email>anne.tilloy@rte-france.com</email>
            <organization>RTE</organization>
            <organizationUrl>http://www.rte-france.com/</organizationUrl>
        </developer>
        <developer>
            <name>Luma Zamarreño</name>
            <email>zamarrenolm@aia.es</email>
            <organization>Aplicaciones en Informatica Avanzada</organization>
            <organizationUrl>http://www.aia.es</organizationUrl>
        </developer>
    </developers>

    <properties>
        <maven.core.version>3.3.9</maven.core.version>

        <maven.antrun.version>3.0.0</maven.antrun.version>
        <maven.assembly.version>3.3.0</maven.assembly.version>
        <maven.buildhelper.version>3.2.0</maven.buildhelper.version>
        <maven.clean.version>3.1.0</maven.clean.version>
        <maven.compiler.version>3.10.1</maven.compiler.version>
        <maven.dependency.version>3.1.2</maven.dependency.version>
        <maven.deploy.version>2.8.2</maven.deploy.version>
        <maven.enforcer.version>3.0.0-M3</maven.enforcer.version>
        <maven.gpg.version>1.6</maven.gpg.version>
        <maven.install.version>2.5.2</maven.install.version>
        <maven.jar.version>3.2.0</maven.jar.version>
        <maven.projectinforeports.version>3.1.1</maven.projectinforeports.version>
        <maven.release.version>2.5.3</maven.release.version>
        <maven.resources.version>3.2.0</maven.resources.version>
        <maven.site.version>3.9.1</maven.site.version>
        <maven.surefire.version>2.22.2</maven.surefire.version>
        <maven.versions.version>2.8.1</maven.versions.version>

        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <version>${maven.antrun.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>${maven.assembly.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>${maven.clean.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${maven.compiler.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>${maven.dependency.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>${maven.deploy.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>${maven.enforcer.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>${maven.gpg.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>${maven.install.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>${maven.jar.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-project-info-reports-plugin</artifactId>
                    <version>${maven.projectinforeports.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>${maven.release.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>${maven.resources.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>${maven.site.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${maven.surefire.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>
                    <version>${maven.buildhelper.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>versions-maven-plugin</artifactId>
                    <version>${maven.versions.version}</version>
                    <configuration>
                        <generateBackupPoms>false</generateBackupPoms>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <profiles>
        <profile>
            <id>checks</id>
            <activation>
                <property>
                    <name>powsybl.checks.skip</name>
                    <value>!true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-enforcer-plugin</artifactId>
                        <executions>
                            <execution>
                                <phase>validate</phase>
                                <goals>
                                    <goal>enforce</goal>
                                </goals>
                                <configuration>
                                    <fail>false</fail>
                                    <rules>
                                        <requireMavenVersion>
                                            <version>${maven.core.version}</version>
                                        </requireMavenVersion>
                                    </rules>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <executions>
                            <execution>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </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>
