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

    <parent>
	<groupId>org.scijava</groupId>
	<artifactId>pom-scijava</artifactId>
	<version>22.3.0</version>
	<relativePath />
    </parent>
    
    <groupId>ch.epfl.leb</groupId>
    <artifactId>DEFCoN_</artifactId>
    <version>0.1.2</version>

    <name>DEFCoN-ImageJ</name>
    <description>ImageJ plugin for DEFCoN, a fluorescence spot counter using fully convolutional neural networks.</description>
    <url>https://github.com/LEB-EPFL/DEFCoN-ImageJ</url>
    <inceptionYear>2018</inceptionYear>

    <organization>
        <name>The Laboratory of Experimental Biophysics</name>
        <url>https://leb.epfl.ch</url>
    </organization>

        <licenses>
        <license>
            <name>GNU General Public License v3+</name>
            <url>https://www.gnu.org/licenses/gpl.html</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    
    <developers>
	<developer>
            <id>kmdouglass</id>
            <name>Kyle M. Douglass</name>
		<url>https://kmdouglass.github.io</url>
                <roles>
                        <role>lead</role>
                        <role>developer</role>
                        <role>debugger</role>
                        <role>reviewer</role>
                        <role>support</role>
                        <role>maintainer</role>
                </roles>
        </developer>
    </developers>
    
    <contributors>
        <contributor>
            <name>Baptiste Ottino</name>
            <url>https://github.com/bottino</url>
            <roles>
	        <role>founder</role>
                <role>developer</role>
            </roles>
        </contributor>
    </contributors>
    
    <mailingLists>
	<mailingList>
            <name>ImageJ Forum</name>
            <archive>http://forum.imagej.net/</archive>
	</mailingList>
    </mailingLists>

    <scm>
	<connection>scm:git:git://github.com/LEB-EPFL/DEFCoN-ImageJ</connection>
	<developerConnection>scm:git:git@github.com:LEB-EPFL/DEFCoN-ImageJ</developerConnection>
	<tag>HEAD</tag>
	<url>https://github.com/LEB-EPFL/DEFCoN-ImageJ</url>
    </scm>
        
    <issueManagement>
		<system>GitHub Issues</system>
		<url>https://github.com/LEB-EPFL/DEFCoN-ImageJ/issues</url>
    </issueManagement>
    
    <ciManagement>
	<system>https://travis-ci.org/LEB-EPFL/DEFCoN-ImageJ</system>
    </ciManagement>
    
    <properties>
        <license.licenseName>gpl_v3</license.licenseName>
        <license.copyrightOwners>The Laboratory of Experimental Biophysics, EPFL</license.copyrightOwners>

	<!-- Dependencies -->
	<tensorflow.version>1.6.0</tensorflow.version>

	<!-- Plugins -->
	<nexus-staging-maven-plugin.version>1.6.8</nexus-staging-maven-plugin.version>
	<maven-source-plugin.version>3.0.1</maven-source-plugin.version>
	<maven-javadoc-plugin.version>3.0.1</maven-javadoc-plugin.version>
	<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
	<maven-failsafe-plugin.version>2.21.0</maven-failsafe-plugin.version>
    </properties>

    <repositories>
	<repository>
	    <id>imagej.public</id>
	    <url>https://maven.imagej.net/content/groups/public</url>
	</repository>
    </repositories>
    
    <dependencies>

        <!--
        On Linux, the following dependencies can be used  instead of "tensorflow" to enable GPU acceleration

        <dependency>
          <groupId>org.tensorflow</groupId>
          <artifactId>libtensorflow</artifactId>
          <version>${tf.version}</version>
        </dependency>
        <dependency>
          <groupId>org.tensorflow</groupId>
          <artifactId>libtensorflow_jni_gpu</artifactId>
          <version>${tf.version}</version>
        </dependency>
        -->

        <dependency>
            <groupId>org.tensorflow</groupId>
            <artifactId>tensorflow</artifactId>
	    <version>${tensorflow.version}</version>
        </dependency>
        
        <dependency>
            <groupId>net.imglib2</groupId>
            <artifactId>imglib2-ij</artifactId>
        </dependency>

        <dependency>
            <groupId>net.imagej</groupId>
            <artifactId>ij</artifactId>
        </dependency>

        <dependency>
            <groupId>net.imagej</groupId>
            <artifactId>imagej-tensorflow</artifactId>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <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>

    <profiles>
      <profile>
	<id>Default</id>
  	<activation>
            <activeByDefault>true</activeByDefault>
        </activation>
        <build>
	  <plugins>
	    <!-- Runs the integration tests. -->
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-failsafe-plugin</artifactId>
              <version>${maven-failsafe-plugin.version}</version>
              <executions>
                <execution>
                  <id>integration-tests</id>
                  <goals>
                    <goal>integration-test</goal>
                    <goal>verify</goal>
                  </goals>
                </execution>
              </executions>
            </plugin>
	    
            <!-- Enable copying the artifacts and dependencies by setting
                 the 'imagej.app.directory' property to a valid directory. -->
            <plugin>
              <groupId>net.imagej</groupId>
              <artifactId>imagej-maven-plugin</artifactId>
              <executions>
                <execution>
                  <id>copy-jars</id>
                  <phase>install</phase>
                  <goals>
                    <goal>copy-jars</goal>
                  </goals>
                </execution>
              </executions>
            </plugin>
          </plugins>
	</build>
      </profile>
      
      <!-- Activate with the property: mvn clean install -Prelease -->
      <profile>
	<id>release</id>
	<activation>
	  <property>
	    <name>release</name>
	  </property>
	</activation>
	
	<build>
	  <plugins>
	    <!-- Deploy to Maven central -->
	    <plugin>
              <groupId>org.sonatype.plugins</groupId>
              <artifactId>nexus-staging-maven-plugin</artifactId>
              <version>${nexus-staging-maven-plugin.version}</version>
              <extensions>true</extensions>
              <configuration>
                <serverId>ossrh</serverId>
                <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                <autoReleaseAfterClose>true</autoReleaseAfterClose>
              </configuration>
            </plugin>

	    <!-- Creates the sources jar -->
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-source-plugin</artifactId>
              <version>${maven-source-plugin.version}</version>
              <executions>
		<execution>
		  <id>attach-sources</id>
		  <goals>
                    <goal>jar-no-fork</goal>
		  </goals>
		</execution>
              </executions>
            </plugin>

	    <!-- Builds the Javadoc -->
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-javadoc-plugin</artifactId>
              <version>${maven-javadoc-plugin.version}</version>
              <executions>
		<execution>
		  <id>attach-javadocs</id>
		  <goals>
                    <goal>jar</goal>
		  </goals>
		</execution>
              </executions>
            </plugin>

	    <!-- Signs the build -->
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-gpg-plugin</artifactId>
              <version>${maven-gpg-plugin.version}</version>
              <executions>
		<execution>
		  <id>sign-artifacts</id>
		  <phase>verify</phase>
		  <goals>
                    <goal>sign</goal>
		  </goals>
		</execution>
              </executions>
            </plugin>

	    <!-- Runs the integration tests. -->
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-failsafe-plugin</artifactId>
              <version>${maven-failsafe-plugin.version}</version>
              <executions>
                <execution>
                  <id>integration-tests</id>
                  <goals>
                    <goal>integration-test</goal>
                    <goal>verify</goal>
                  </goals>
                </execution>
              </executions>
            </plugin>
	    
            <!-- Enable copying the artifacts and dependencies by setting
                 the 'imagej.app.directory' property to a valid directory. -->
            <plugin>
              <groupId>net.imagej</groupId>
              <artifactId>imagej-maven-plugin</artifactId>
              <executions>
                <execution>
                  <id>copy-jars</id>
                  <phase>install</phase>
                  <goals>
                    <goal>copy-jars</goal>
                  </goals>
                </execution>
              </executions>
            </plugin>
          </plugins>
	</build>
      </profile>
    </profiles>

</project>
