<?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.gephi</groupId>
    <artifactId>gephi-toolkit</artifactId>
    <version>0.11.3</version>
    <packaging>jar</packaging>

    <name>gephi-toolkit</name>
    
    <!-- Project Metadata -->
    <url>https://github.com/gephi/gephi-toolkit</url>
    <description>Gephi - All Gephi in one JAR library</description>
    <organization>
        <url>https://gephi.org/toolkit/</url>
    </organization>
    <inceptionYear>2007</inceptionYear>
    
    <!-- Licenses -->
    <licenses>
        <license>
            <name>CDDL 1.0</name>
            <url>https://opensource.org/license/CDDL-1.0</url>
            <comments>CDDL License 1.0</comments>
        </license>
        <license>
            <name>GPL v3</name>
            <url>https://www.opensource.org/licenses/GPL-3.0</url>
            <comments>GPL v3 License</comments>
        </license>
    </licenses>
    
    <!-- SCM -->
    <scm>
        <connection>scm:git:git://github.com/gephi/gephi-toolkit.git</connection>
        <developerConnection>scm:git:git@github.com:gephi/gephi-toolkit.git</developerConnection>
        <url>https://github.com/gephi/gephi-toolkit</url>
    </scm>

    <!-- Developers -->
    <developers>
        <developer>
            <id>mbastian</id>
            <name>Mathieu Bastian</name>
            <email>mathieu.bastian@gephi.org</email>
        </developer>
        <developer>
            <id>eduramiba</id>
            <name>Eduardo Ramos</name>
            <email>eduardo.ramos@gephi.org</email>
        </developer>
    </developers>
    
    <!-- Properties -->
    <properties>        
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <gephi.maven.requiredVersion>[3.6.3,)</gephi.maven.requiredVersion>
        <netbeans.run.params.ide/>
        <netbeans.run.params>${netbeans.run.params.ide}</netbeans.run.params>
        
        <!-- Netbeans Platform version -->
        <netbeans.version>RELEASE290</netbeans.version>
        
        <!-- Gephi version -->
        <gephi.version>${project.version}</gephi.version>

        <!-- Java compilation settings -->
        <gephi.javac.release>17</gephi.javac.release>
        <gephi.javac.xlint>-Xlint:all</gephi.javac.xlint>
        <gephi.javac.showDeprecation>true</gephi.javac.showDeprecation>
        <gephi.javac.showWarnings>true</gephi.javac.showWarnings>
        <gephi.javac.fork>true</gephi.javac.fork>

        <!-- Testing settings -->
        <gephi.test.maxMemory>768M</gephi.test.maxMemory>
        <gephi.test.reportsDirectory>${project.build.directory}/surefire-reports/plain</gephi.test.reportsDirectory>

        <!-- SCM -->
        <gephi.scm>git</gephi.scm>
        
        <!-- Disable doclint for now as Javadoc is much more strict in 1.8 -->
        <additionalparam>-Xdoclint:none</additionalparam>
        
        <!--==== Plugin Versions ==================================================================================-->

        <gephi.maven-assembly-plugin.version>3.8.0</gephi.maven-assembly-plugin.version>

        <gephi.maven-compiler-plugin.version>3.13.0</gephi.maven-compiler-plugin.version>

        <gephi.maven-gpg-plugin.version>3.2.8</gephi.maven-gpg-plugin.version>

        <gephi.maven-javadoc-plugin.version>3.12.0</gephi.maven-javadoc-plugin.version>

        <gephi.maven-surefire-plugin.version>3.6.0</gephi.maven-surefire-plugin.version>
        
        <gephi.maven-site-plugin.version>3.12.1</gephi.maven-site-plugin.version>

        <gephi.license-maven-plugin.version>4.1</gephi.license-maven-plugin.version>

        <gephi.maven-enforcer-plugin.version>3.5.0</gephi.maven-enforcer-plugin.version>

        <gephi.central-publishing-maven-plugin.version>0.10.0</gephi.central-publishing-maven-plugin.version>

        <gephi.maven-source-plugin.version>3.3.1</gephi.maven-source-plugin.version>
    </properties>
 
    <!-- Repositories -->
    <repositories>
        <repository>
            <id>gephi-thirdparty</id>
            <url>https://raw.github.com/gephi/gephi/mvn-thirdparty-repo/</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <name>Central Portal Snapshots</name>
            <id>central-portal-snapshots</id>
            <url>https://central.sonatype.com/repository/maven-snapshots/</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>
    
    <!-- Dependencies -->
    <dependencies>
        <!-- Netbeans Platform dependencies -->
        <dependency>
            <groupId>org.netbeans.modules</groupId>
            <artifactId>org-netbeans-modules-masterfs</artifactId>
            <version>${netbeans.version}</version>
        </dependency>
        <dependency>
            <!-- Necessary because of bug https://netbeans.org/bugzilla/show_bug.cgi?id=84501 See http://wiki.netbeans.org/UsingFileSystemsMasterfs -->
            <groupId>org.netbeans.modules</groupId>
            <artifactId>org-netbeans-core-startup-base</artifactId>
            <version>${netbeans.version}</version>
        </dependency>
        <dependency>
            <!-- Necessary for netbeans property editors -->
            <groupId>org.netbeans.modules</groupId>
            <artifactId>org-netbeans-core</artifactId>
            <version>${netbeans.version}</version>
        </dependency>
        <!-- Gephi dependencies -->
        <dependency>
            <groupId>org.gephi</groupId>
            <artifactId>utils-longtask</artifactId>
            <version>${gephi.version}</version>
        </dependency>
        <dependency>
            <groupId>org.gephi</groupId>
            <artifactId>project-api</artifactId>
            <version>${gephi.version}</version>
        </dependency>
        <dependency>
            <groupId>org.gephi</groupId>
            <artifactId>io-exporter-api</artifactId>
            <version>${gephi.version}</version>
        </dependency>
        <dependency>
            <groupId>org.gephi</groupId>
            <artifactId>graph-api</artifactId>
            <version>${gephi.version}</version>
        </dependency>
        <dependency>
            <groupId>org.gephi</groupId>
            <artifactId>preview-api</artifactId>
            <version>${gephi.version}</version>
        </dependency>
        <dependency>
            <groupId>org.gephi</groupId>
            <artifactId>io-exporter-preview</artifactId>
            <version>${gephi.version}</version>
        </dependency>
        <dependency>
            <groupId>org.gephi</groupId>
            <artifactId>utils</artifactId>
            <version>${gephi.version}</version>
        </dependency>
        <dependency>
            <groupId>org.gephi</groupId>
            <artifactId>datalab-api</artifactId>
            <version>${gephi.version}</version>
        </dependency>
        <dependency>
            <groupId>org.gephi</groupId>
            <artifactId>visualization-api</artifactId>
            <version>${gephi.version}</version>
        </dependency>
        <dependency>
            <groupId>org.gephi</groupId>
            <artifactId>preview-plugin</artifactId>
            <version>${gephi.version}</version>
        </dependency>
        <dependency>
            <groupId>org.gephi</groupId>
            <artifactId>db-drivers</artifactId>
            <version>${gephi.version}</version>
        </dependency>
        <dependency>
            <groupId>org.gephi</groupId>
            <artifactId>io-importer-api</artifactId>
            <version>${gephi.version}</version>
        </dependency>
        <dependency>
            <groupId>org.gephi</groupId>
            <artifactId>appearance-api</artifactId>
            <version>${gephi.version}</version>
        </dependency>
        <dependency>
            <groupId>org.gephi</groupId>
            <artifactId>statistics-api</artifactId>
            <version>${gephi.version}</version>
        </dependency>
        <dependency>
            <groupId>org.gephi</groupId>
            <artifactId>statistics-plugin</artifactId>
            <version>${gephi.version}</version>
        </dependency>
        <dependency>
            <groupId>org.gephi</groupId>
            <artifactId>algorithms-plugin</artifactId>
            <version>${gephi.version}</version>
        </dependency>
        <dependency>
            <groupId>org.gephi</groupId>
            <artifactId>mostrecentfiles-api</artifactId>
            <version>${gephi.version}</version>
        </dependency>
        <dependency>
            <groupId>org.gephi</groupId>
            <artifactId>layout-api</artifactId>
            <version>${gephi.version}</version>
        </dependency>
        <dependency>
            <groupId>org.gephi</groupId>
            <artifactId>io-generator-api</artifactId>
            <version>${gephi.version}</version>
        </dependency>
        <dependency>
            <groupId>org.gephi</groupId>
            <artifactId>io-generator-plugin</artifactId>
            <version>${gephi.version}</version>
        </dependency>
        <dependency>
            <groupId>org.gephi</groupId>
            <artifactId>io-exporter-plugin</artifactId>
            <version>${gephi.version}</version>
        </dependency>
        <dependency>
            <groupId>org.gephi</groupId>
            <artifactId>filters-api</artifactId>
            <version>${gephi.version}</version>
        </dependency>
        <dependency>
            <groupId>org.gephi</groupId>
            <artifactId>layout-plugin</artifactId>
            <version>${gephi.version}</version>
        </dependency>
        <dependency>
            <groupId>org.gephi</groupId>
            <artifactId>io-importer-plugin</artifactId>
            <version>${gephi.version}</version>
        </dependency>
        <dependency>
            <groupId>org.gephi</groupId>
            <artifactId>filters-plugin</artifactId>
            <version>${gephi.version}</version>
        </dependency>
        <dependency>
            <groupId>org.gephi</groupId>
            <artifactId>filters-impl</artifactId>
            <version>${gephi.version}</version>
        </dependency>
        <dependency>
            <groupId>org.gephi</groupId>
            <artifactId>appearance-plugin</artifactId>
            <version>${gephi.version}</version>
        </dependency>
        <dependency>
            <groupId>org.gephi</groupId>
            <artifactId>core-library-wrapper</artifactId>
            <version>${gephi.version}</version>
        </dependency>
        <!-- Test dependencies -->
        <dependency>
            <groupId>org.netbeans.api</groupId>
            <artifactId>org-netbeans-modules-nbjunit</artifactId>
            <version>${netbeans.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>graph-api</artifactId>
            <version>${gephi.version}</version>
            <scope>test</scope>
            <type>test-jar</type>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>project-api</artifactId>
            <version>${gephi.version}</version>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <!-- Plugins installed with versions -->
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${gephi.maven-compiler-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>${gephi.maven-gpg-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${gephi.maven-surefire-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>${gephi.maven-javadoc-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>${gephi.maven-assembly-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>${gephi.maven-source-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>com.mycila</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                    <version>${gephi.license-maven-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>${gephi.maven-enforcer-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.sonatype.central</groupId>
                    <artifactId>central-publishing-maven-plugin</artifactId>
                    <version>${gephi.central-publishing-maven-plugin.version}</version>
                    <extensions>true</extensions>
                </plugin>
            </plugins>
        </pluginManagement>
        
        <!-- Plugins configuration ===============================================================-->
        
        <plugins>

            <!-- Compiler -->
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <release>${gephi.javac.release}</release>
                    <showDeprecation>${gephi.javac.showDeprecation}</showDeprecation>
                    <showWarnings>${gephi.javac.showWarnings}</showWarnings>
                    <fork>${gephi.javac.fork}</fork>
                    <compilerArgument>
                        ${gephi.javac.xlint}
                    </compilerArgument>
                </configuration>
            </plugin>
            
            <!-- Assembler to produce final uberjar -->
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <executions>
                    <execution>
                        <id>assembly-jar</id>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <phase>package</phase>
                    </execution>
                </executions>
                <configuration>
                    <tarLongFileMode>gnu</tarLongFileMode>
                    <appendAssemblyId>true</appendAssemblyId>
                    <descriptors>
                        <descriptor>src/main/assembly/jar.xml</descriptor>
                    </descriptors>
                </configuration>
            </plugin>
            

            <!-- Sources JAR (required by Maven Central) -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- Javadoc settings -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                    <show>public</show>
                    <nohelp>true</nohelp>
                    <detectLinks>false</detectLinks>
                    <detectOfflineLinks>true</detectOfflineLinks>
                    <quiet>false</quiet>
                    <doclint>none</doclint>
                    <source>17</source>
                    <doctitle>Gephi Toolkit ${project.version} API Index</doctitle>
                </configuration>
                <executions>
                    <execution>
                        <id>javadoc-jar</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                            <includeDependencySources>true</includeDependencySources>
                            <dependencySourceIncludes>
                                <dependencySourceInclude>org.gephi:*:*</dependencySourceInclude>
                            </dependencySourceIncludes>
                            <dependencySourceExcludes>
                                <dependencySourceExclude>org.gephi:core-library-wrapper:*</dependencySourceExclude>
                            </dependencySourceExcludes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            
            <!-- GPG Signed Components -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>deploy</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- Maven central -->
            <plugin>
                <groupId>org.sonatype.central</groupId>
                <artifactId>central-publishing-maven-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <publishingServerId>central</publishingServerId>
                    <autoPublish>true</autoPublish>
                </configuration>
            </plugin>

            <!-- License plugin, automatically adds the header to Java source files -->
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>check-license</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>update-licence</id>
                        <phase>package</phase>
                        <goals>
                            <goal>format</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <licenseSets>
                        <licenseSet>
                            <header>org/gephi/license-header.txt</header>
                            <includes>
                                <include>**/*.java</include>
                            </includes>
                        </licenseSet>
                    </licenseSets>
                </configuration>
            </plugin>

            <!-- Enforce Maven version -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <executions>
                    <execution>
                        <id>enforce-maven</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireMavenVersion>
                                    <version>${gephi.maven.requiredVersion}</version>
                                </requireMavenVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
