<?xml version="1.0" encoding="UTF-8"?>
<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.orbisgis</groupId>
    <artifactId>java-network-analyzer</artifactId>
    <version>0.5.0</version>
    <packaging>bundle</packaging>

    <!-- More Project Information -->
    <name>JNA</name>
    <description>Graph theory and social network analysis algorithms implemented on JGraphT graphs.</description>

    <organization>
        <name>Lab-STICC - CNRS UMR 6285</name>
        <url>http://www.labsticc.fr/</url>
    </organization>

    <url>https://github.com/orbisgis/java-network-analyzer</url>

    <licenses>
        <license>
            <name>GNU Lesser General Public License (LGPLV3+)</name>
            <url>http://www.gnu.org/licenses/lgpl-3.0.html</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Erwan Bocher</name>
            <organization>Lab-STICC - CNRS UMR 6285</organization>
        </developer>
        <developer>
            <name>Adam Gouge</name>
            <organization>IRSTV CNRS-FR-2488 (2012-2014)</organization>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:https://github.com/orbisgis/java-network-analyzer.git</connection>
        <developerConnection>scm:git:https://github.com/orbisgis/java-network-analyzer.git</developerConnection>
        <url>git@github.com:orbisgis/java-network-analyzer.git</url>
        <tag>v0.5.0</tag>
    </scm>

    <issueManagement>
        <system>Github</system>
        <url>https://github.com/orbisgis/java-network-analyzer/issues</url>
    </issueManagement>

    <!-- Properties -->
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven-version>3.5.0</maven-version>
        <java-version>11</java-version>
        <maven.compiler.target>${java-version}</maven.compiler.target>
        <maven.compiler.source>${java-version}</maven.compiler.source>

        <!-- Dependencies versions -->
        <jgrapht-version>1.0.1</jgrapht-version>
        <junit-version>5.8.2</junit-version>
        <slf4j-version>2.0.10</slf4j-version>

        <!-- Plugins versions -->
        <exec-maven-version>3.0.0</exec-maven-version>
        <maven-assembly-version>3.3.0</maven-assembly-version>
        <maven-bundle-version>5.1.2</maven-bundle-version>
        <maven-enforcer-version>3.0.0</maven-enforcer-version>
        <maven-gpg-plugin-version>3.0.1</maven-gpg-plugin-version>
        <maven-jar-version>3.2.0</maven-jar-version>
        <maven-javadoc-version>3.3.1</maven-javadoc-version>
        <maven-source-version>3.2.1</maven-source-version>
        <maven-release-version>3.0.0-M4</maven-release-version>
        <maven-surefire-version>3.0.0-M5</maven-surefire-version>
        <version-maven-version>2.8.1</version-maven-version>
    </properties>

    <!-- Dependencies -->
    <repositories>
        <repository>
            <id>oss-sonatype</id>
            <name>oss-sonatype-snapshot</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
        </repository>
        <repository>
            <id>orbisgis-release</id>
            <name>oss-sonatype-release</name>
            <url>https://oss.sonatype.org/content/repositories/releases/</url>
        </repository>
    </repositories>

    <dependencies>
        <!-- dependency version definition kept in this project until it has been updated to last version -->
        <dependency>
            <groupId>org.jgrapht</groupId>
            <artifactId>jgrapht-core</artifactId>
            <version>${jgrapht-version}</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j-version}</version>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>${junit-version}</version>
        </dependency>
    </dependencies>

    <!-- Build Settings -->
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Bundle-Vendor>Lab-STICC - CNRS UMR 6285</Bundle-Vendor>
                        <Export-Package>org.javanetworkanalyzer.*</Export-Package>
                        <Bundle-Category>Network Analysis</Bundle-Category>
                        <Bundle-Icon>icon.png;size=32</Bundle-Icon>
                        <Import-Package>org.slf4j;version="[1.7.0,2)",*</Import-Package>
                    </instructions>
                </configuration>
            </plugin>
            <!-- Javadoc generation -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${maven-javadoc-version}</version>
                <configuration>
                    <doclint>all,-missing</doclint>
                    <quiet>true</quiet>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>${maven-source-version}</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- Maven release generation -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>${maven-release-version}</version>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <tagNameFormat>v@{project.version}</tagNameFormat>
                </configuration>
            </plugin>
        </plugins>
    </build>
    
    <profiles>
        <profile>
            <id>deploy</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${maven-gpg-plugin-version}</version>
                        <configuration>
                            <gpgArguments>
                                <arg>--pinentry-mode</arg>
                                <arg>loopback</arg>
                            </gpgArguments>
                        </configuration>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <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>

</project>
