<?xml version="1.0" encoding="UTF-8"?>
<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>

    <packaging>pom</packaging>
    <groupId>bio.singa</groupId>
    <artifactId>singa-all</artifactId>
    <version>0.7.0</version>
    <name>singa-all</name>
    <description>
        SiNGA (Simulation of Natural Systems using Graph Automata) is an open-source library containing tools especially
        for structural bioinformatics and systems biology.
    </description>

    <url>https://github.com/singa-bio/singa</url>

    <scm>
        <connection>scm:git:git://github.com/singa-bio/singa.git</connection>
        <developerConnection>scm:git:git@github.com:singa-bio/singa.git</developerConnection>
        <url>https://github.com/singa-bio/singa</url>
    </scm>

    <licenses>
        <license>
            <name>GNU GPL v3</name>
            <url>http://www.gnu.org/licenses/gpl-3.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>cl</id>
            <name>Christoph Leberecht</name>
            <email>cl@singa.bio</email>
            <organization>bigM</organization>
            <organizationUrl>singa.bio</organizationUrl>
        </developer>
        <developer>
            <id>fk</id>
            <name>Florian Kaiser</name>
            <email>fk@singa.bio</email>
            <organization>bigM</organization>
            <organizationUrl>singa.bio</organizationUrl>
        </developer>
        <developer>
            <id>sb</id>
            <name>Sebastian Bittrich</name>
            <email>sb@singa.bio</email>
            <organization>bigM</organization>
            <organizationUrl>singa.bio</organizationUrl>
        </developer>
    </developers>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.version>1.8</java.version>
        <junit.jupiter.version>5.3.1</junit.jupiter.version>
    </properties>

    <dependencies>
        <!-- unit testing -->
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>${junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>${junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <!-- logging -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.21</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>1.7.21</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

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

    <build>
        <plugins>
            <!-- add version to manifest -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.1.0</version>
                <configuration>
                    <archive>
                        <manifest>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                            <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>
            <!-- specify jdk source and target version -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.6.1</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                </configuration>
            </plugin>
            <!-- attach sources -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.0.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <!-- travis build timeout workaround -->
                    <argLine>-Xms1024m -Xmx2048m</argLine>
                </configuration>
                <!-- latest version (2.20.1) does not work well with JUnit5 -->
                <version>2.19.1</version>
                <dependencies>
                    <!-- required for JUnit5 -->
                    <dependency>
                        <groupId>org.junit.platform</groupId>
                        <artifactId>junit-platform-surefire-provider</artifactId>
                        <version>1.0.3</version>
                    </dependency>
                    <dependency>
                        <groupId>org.junit.jupiter</groupId>
                        <artifactId>junit-jupiter-engine</artifactId>
                        <version>5.0.3</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>1.6.7</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>sign</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>build-extras</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.1.0</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>3.1.1</version>
                        <configuration>
                            <javadocExecutable>${java.home}/bin/javadoc</javadocExecutable>
                            <source>8</source>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
<!--                    <plugin>-->
<!--                        <groupId>org.apache.maven.plugins</groupId>-->
<!--                        <artifactId>maven-shade-plugin</artifactId>-->
<!--                        <version>3.2.4</version>-->
<!--                        <executions>-->
<!--                            <execution>-->
<!--                                <phase>install</phase>-->
<!--                                <goals>-->
<!--                                    <goal>shade</goal>-->
<!--                                </goals>-->
<!--                                <configuration>-->
<!--                                    <filters>-->
<!--                                        <filter>-->
<!--                                            <artifact>*:*</artifact>-->
<!--                                            <excludes>-->
<!--                                                <exclude>log4j.properties</exclude>-->
<!--                                            </excludes>-->
<!--                                        </filter>-->
<!--                                    </filters>-->
<!--                                </configuration>-->
<!--                            </execution>-->
<!--                        </executions>-->
<!--                    </plugin>-->
                </plugins>
            </build>
        </profile>
    </profiles>

    <modules>
        <module>../singa-core</module>
        <module>../singa-mathematics</module>
        <module>../singa-features</module>
        <module>../singa-chemistry</module>
        <module>../singa-javafx</module>
        <module>../singa-simulation</module>
        <module>../singa-structure</module>
        <module>../singa-sequence</module>
    </modules>

</project>