<?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.campagnelab.goby</groupId>
    <artifactId>goby-framework</artifactId>
    <version>3.3.1</version>
    <packaging>pom</packaging>

    <scm>
        <connection>scm:git@github.com:CampagneLaboratory/goby3.git</connection>
        <developerConnection>scm:git:git@github.com:CampagneLaboratory/goby3.git</developerConnection>
        <url>git@github.com:CampagneLaboratory/goby3.git</url>
        <tag>r3.3.1</tag>
    </scm>
    <modules>
        <module>goby-distribution</module>
        <module>goby-io</module>
        <module>goby-spi</module>
    </modules>
    <name>Goby Framework</name>
    <url>http://goby.campagnelab.org</url>
    <organization>
        <name>Campagne Laboratory</name>
        <url>http://campagnelab.org</url>
    </organization>
    <developers>
        <developer>
            <name>Fabien Campagne</name>
            <email>fac2003@campagnelab.org</email>
            <organization>Campagne Laboratory</organization>
            <organizationUrl>http://campagnelab.org</organizationUrl>
        </developer>
    </developers>
    <licenses>
        <license>
            <name>GNU GENERAL PUBLIC LICENSE, Version 3, 29 June 2007</name>
            <url>http://www.gnu.org/licenses/gpl-3.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <description>Goby is a data management framework designed to facilitate the implementation of efficient data
        analysis pipelines for high-throughput sequencing data.
    </description>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <java.version>1.8</java.version>
        <os-maven-plugin.version>1.5.0.Final</os-maven-plugin.version>
        <protobuf.version>3.0.0-beta-4</protobuf.version>
        <protobuf.python.version>3.3.0</protobuf.python.version>
        <build-helper-maven-plugin.version>1.9.1</build-helper-maven-plugin.version>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <version>1.4.0</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <executable>java</executable>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.5.1</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>1.6</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>deploy</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </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>false</autoReleaseAfterClose>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>2.6</version>
                <executions>
                    <execution>
                        <id>make-goby-models</id>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <descriptors>
                                <descriptor>formal-releases/assembly/assembly-models.xml</descriptor>
                            </descriptors>
                            <finalName>goby_${project.version}</finalName>
                        </configuration>
                    </execution>
                    <execution>
                        <id>make-goby-data</id>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <descriptors>
                                <descriptor>formal-releases/assembly/assembly-data.xml</descriptor>
                            </descriptors>
                            <finalName>goby_${project.version}</finalName>
                        </configuration>
                    </execution>
                    <execution>
                        <id>make-goby-deps</id>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <descriptors>
                                <descriptor>formal-releases/assembly/assembly-deps.xml</descriptor>
                            </descriptors>
                            <finalName>goby_${project.version}</finalName>
                        </configuration>
                    </execution>
                    <execution>
                        <id>make-goby-javadoc</id>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <descriptors>
                                <descriptor>formal-releases/assembly/assembly-javadoc.xml</descriptor>
                            </descriptors>
                            <finalName>goby_${project.version}</finalName>
                        </configuration>
                    </execution>
                    <execution>
                        <id>make-goby-src</id>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <descriptors>
                                <descriptor>formal-releases/assembly/assembly-src.xml</descriptor>
                            </descriptors>
                            <finalName>goby_${project.version}</finalName>
                        </configuration>
                    </execution>
                    <execution>
                        <id>make-goby-cpp</id>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <descriptors>
                                <descriptor>formal-releases/assembly/assembly-cpp.xml</descriptor>
                            </descriptors>
                            <finalName>goby_${project.version}</finalName>
                        </configuration>
                    </execution>
                    <execution>
                        <id>make-goby-bin</id>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <descriptors>
                                <descriptor>formal-releases/assembly/assembly-bin.xml</descriptor>
                            </descriptors>
                            <finalName>goby_${project.version}</finalName>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <execution>
                        <id>prepare-goby-release</id>
                        <configuration>
                            <tasks>
                                <exec dir="${project.basedir}/formal-releases"
                                      executable="${project.basedir}/formal-releases/_prepare-release.sh"
                                      failonerror="true">
                                      <arg line="${project.version}"/>
                                      <arg line="${project.basedir}"/>
                                      <arg line="${dl.version}"/>
                                </exec>
                            </tasks>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>push-goby-release</id>
                        <configuration>
                            <tasks>
                                <exec dir="${project.basedir}/formal-releases"
                                      executable="${project.basedir}/formal-releases/_push-release.sh"
                                      failonerror="true">
                                    <arg line="${project.version}"/>
                                    <arg line="${project.basedir}"/>
                                </exec>
                            </tasks>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>tag-goby-release</id>
                        <configuration>
                            <tasks>
                                <exec dir="${project.basedir}/formal-releases"
                                      executable="${project.basedir}/formal-releases/_tag-release.sh"
                                      failonerror="true">
                                    <arg line="${project.version}"/>
                                </exec>
                            </tasks>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>

    </build>

    <repositories>
        <repository>
            <id>sonatype-nexus-snapshots</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
        <!-- nexus staging can be used to test staged artifacts before their official release -->
        <!--repository>
            <id>nexus-staging</id>
            <name>Nexus Release Repository</name>
            <url>https://oss.sonatype.org/content/groups/staging</url>
        </repository-->
    </repositories>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <name>Sonatype Nexus snapshot repository</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <name>Nexus Release Repository</name>
            <url>http://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

</project>