<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>org.entur.ror</groupId>
    <artifactId>netex-tools-root</artifactId>
    <version>0.0.31</version>
    <packaging>pom</packaging>
    <name>NeTEx Tools Root</name>
    <description>NeTEX Utility Tools</description>
    <url>https://github.com/entur/netex-tools</url>
    <organization>
        <name>Entur AS</name>
        <url>https://www.entur.org/</url>
    </organization>
    <scm>
        <url>https://github.com/entur/netex-tools</url>
        <connection>scm:git:ssh://git@github.com/entur/netex-tools.git</connection>
        <developerConnection>scm:git:ssh://git@github.com/entur/netex-tools.git</developerConnection>
        <tag>HEAD</tag>
    </scm>
    <licenses>
        <license>
            <name>EUPL-1.2 with modifications</name>
            <url>https://joinup.ec.europa.eu/software/page/eupl</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <properties>
        <jreleaser-maven-plugin.version>1.18.0</jreleaser-maven-plugin.version>
    </properties>

    <modules>
        <module>lib</module>
        <module>cli</module>
        <module>parent</module>
        <module>pipeline</module>
    </modules>
    <developers>
        <developer>
            <name>Thomas Gran</name>
            <email>thomas.gran@entur.org</email>
            <organization>Entur</organization>
            <organizationUrl>http://www.entur.org</organizationUrl>
        </developer>
    </developers>
    <build>
        <plugins>
            <plugin>
                <groupId>org.jreleaser</groupId>
                <artifactId>jreleaser-maven-plugin</artifactId>
                <version>${jreleaser-maven-plugin.version}</version>
                <configuration>
                    <jreleaser>
                        <signing>
                            <active>ALWAYS</active>
                            <armored>true</armored>
                        </signing>
                        <deploy>
                            <maven>
                                <mavenCentral>
                                    <sonatype>
                                        <active>RELEASE</active>
                                        <url>https://central.sonatype.com/api/v1/publisher</url>
                                        <stagingRepositories>target/staging-deploy</stagingRepositories>
                                    </sonatype>
                                </mavenCentral>
                                <nexus2>
                                    <maven-central>
                                        <active>SNAPSHOT</active>
                                        <url>https://ossrh-staging-api.central.sonatype.com/service/local</url>
                                        <snapshotUrl>https://central.sonatype.com/repository/maven-snapshots</snapshotUrl>
                                        <applyMavenCentralRules>true</applyMavenCentralRules>
                                        <snapshotSupported>true</snapshotSupported>
                                        <closeRepository>true</closeRepository>
                                        <releaseRepository>true</releaseRepository>
                                        <stagingRepositories>target/staging-deploy</stagingRepositories>
                                    </maven-central>
                                </nexus2>
                            </maven>
                        </deploy>
                        <release>
                            <github>
                                <skipTag>false</skipTag>
                                <skipRelease>true</skipRelease>
                            </github>
                        </release>
                    </jreleaser>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>publication</id>
            <properties>
                <altDeploymentRepository>local::default::file:./target/staging-deploy</altDeploymentRepository>
            </properties>
            <build>
                <defaultGoal>deploy</defaultGoal>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                                <configuration>
                                    <attach>true</attach>
                                </configuration>
                            </execution>
                        </executions>
                        <version>3.10.1</version>
                    </plugin>
                    <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</goal>
                                </goals>
                                <configuration>
                                    <attach>true</attach>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
