<?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>3.1</version>
		<relativePath/>
        </parent>
	<properties>
	    <maven.compiler.target>1.8</maven.compiler.target>
	    <maven.compiler.source>1.8</maven.compiler.source>
	</properties>

	<groupId>com.elphel</groupId>
 	<artifactId>imagej-elphel</artifactId>
<!-- 	<artifactId>Aberration_Calibration</artifactId> -->

	<version>1.0.0-SNAPSHOT</version>

        <name>plugins/imagej_elphel.jar</name>
<!-- 	<name>plugins/Aberration_Calibration.jar</name> -->
        <description>A Maven project implementing imagej-elphel plugin</description>

        <dependencies>
			<!-- https://mvnrepository.com/artifact/com.google.code.gson/gson -->
			<dependency>
			    <groupId>com.google.code.gson</groupId>
			    <artifactId>gson</artifactId>
			    <version>2.9.1</version>
			</dependency>
			<!-- https://mvnrepository.com/artifact/com.googlecode.json-simple/json-simple -->
			<dependency>
			    <groupId>com.googlecode.json-simple</groupId>
			    <artifactId>json-simple</artifactId>
			    <version>1.1</version>
			</dependency>
			<!--  ssh support - see https://www.baeldung.com/java-ssh-connection -->
			<!-- https://mvnrepository.com/artifact/org.apache.sshd/sshd-core -->
			<dependency>
			    <groupId>org.apache.sshd</groupId>
			    <artifactId>sshd-core</artifactId>
			    <version>2.6.0</version>
			</dependency>
       
            <dependency>
                <groupId>net.imagej</groupId>
                <artifactId>ij</artifactId>
<!--                <version>1.52e</version> -->
<!--                <version>1.53j</version> -->
                <version>1.54f</version>
            </dependency>
            <dependency>
                <groupId>org.tensorflow</groupId>
                <artifactId>libtensorflow</artifactId>
                <version>1.10.0</version>
            </dependency>
            <dependency>
                <groupId>org.tensorflow</groupId>
                <artifactId>libtensorflow_jni_gpu</artifactId>
                <version>1.10.0</version>
            </dependency>
			<dependency>
			    <groupId>org.apache.ant</groupId>
			    <artifactId>ant-compress</artifactId>
			    <version>1.5</version>
			</dependency>
            <dependency>
                <groupId>commons-configuration</groupId>
                <artifactId>commons-configuration</artifactId>
                <version>1.8</version>
            </dependency>
            <!-- https://mvnrepository.com/artifact/gov.nist.math/jama -->
            <dependency>
                <groupId>gov.nist.math</groupId>
                <artifactId>jama</artifactId>
                <version>1.0.3</version>
            </dependency>
			<!--
			<dependency>
				<groupId>jama</groupId>
				<artifactId>jama</artifactId>
				<version>1.0.3</version>
			</dependency>
			-->
			<dependency>
				<groupId>commons-lang</groupId>
				<artifactId>commons-lang</artifactId>
				<version>2.6</version>
			</dependency>
			<!-- https://mvnrepository.com/artifact/ome/loci_tools -->
			<dependency>
				<groupId>ome</groupId>
				<artifactId>loci_tools</artifactId>
				<version>6.1.0</version>
				<exclusions>
					<exclusion>
						<groupId>ch.qos.logback</groupId>
						<artifactId>logback-classic</artifactId>
					</exclusion>
					<exclusion>
						<groupId>ch.qos.logback</groupId>
						<artifactId>logback-core</artifactId>
					</exclusion>
					<exclusion>
						<groupId>org.slf4j</groupId>
						<artifactId>slf4j-log4j12</artifactId>
					</exclusion>
					<exclusion>
						<groupId>log4j</groupId>
						<artifactId>log4j</artifactId>
					</exclusion>
				</exclusions>
			</dependency>
			<!-- https://mvnrepository.com/artifact/ome/pom-bio-formats -->
			<!-- Was source in attic for development -->
			<dependency>
			    <groupId>ome</groupId>
			    <artifactId>pom-bio-formats</artifactId>
			    <version>6.13.0</version>
			    <type>pom</type>
			</dependency>
			
<!-- 			
			<dependency>
			  <groupId>com.drewnoakes</groupId>
			  <artifactId>metadata-extractor</artifactId>
			  <version>2.11.0</version>
			  <type>java-source</type>
			</dependency> -->
<!-- https://mvnrepository.com/artifact/com.drewnoakes/metadata-extractor -->
			<dependency>
			    <groupId>com.drewnoakes</groupId>
			    <artifactId>metadata-extractor</artifactId>
			    <version>2.11.0</version>
			</dependency>
			
			<!-- https://mvnrepository.com/artifact/net.sf.ehcache/ehcache-core -->
			<dependency>
			    <groupId>net.sf.ehcache</groupId>
			    <artifactId>ehcache-core</artifactId>
			    <version>2.6.2</version>
			</dependency>
			<!-- https://mvnrepository.com/artifact/org.slf4j/jcl-over-slf4j -->
			<dependency>
			    <groupId>org.slf4j</groupId>
			    <artifactId>jcl-over-slf4j</artifactId>
			    <version>1.7.5</version>
			</dependency>
			<!-- SLF4J backend (single binding) -->
			<dependency>
				<groupId>ch.qos.logback</groupId>
				<artifactId>logback-classic</artifactId>
				<version>1.1.1</version>
			</dependency>
			
			<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-numbers-quaternion -->
			<!-- 
			<dependency>
				<groupId>org.apache.commons</groupId>
				<artifactId>commons-numbers-quaternion</artifactId>
				<version>1.0-beta1</version>
			</dependency>
			-->
			<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-math3 -->
			<dependency>
			    <groupId>org.apache.commons</groupId>
			    <artifactId>commons-math3</artifactId>
			    <version>3.6.1</version>
			</dependency>
	
	        <!-- https://mvnrepository.com/artifact/org.apache.ant/ant -->
			<dependency>
			    <groupId>org.apache.ant</groupId>
			    <artifactId>ant</artifactId>
			    <version>1.10.10</version>
			</dependency>
	
	        <!-- https://mvnrepository.com/artifact/org.apache.ant/ant-launcher -->
			<dependency>
			    <groupId>org.apache.ant</groupId>
			    <artifactId>ant-launcher</artifactId>
			    <version>1.10.10</version>
			</dependency>

			<!-- https://mvnrepository.com/artifact/javax.xml.bind/jaxb-api -->
			<dependency>
			    <groupId>javax.xml.bind</groupId>
			    <artifactId>jaxb-api</artifactId>
			    <version>2.3.1</version>
			</dependency>

		</dependencies>
		<!--TODO: improve profile activation. Currently 11.2.0 only for my old computer OS version, all others use 12.6.0-->
	    <profiles>
	        <profile>
            	<id>profileCuda11</id>
			    <activation>
			    	<os>
				    	<name>Linux</name>
				    	<version>5.15.0-139-generic</version>
			    	</os>
			    </activation>
				<dependencies>
		            <dependency>
		                <groupId>org.jcuda</groupId>
		                <artifactId>jcuda</artifactId>
		                <!-- <version>10.1.0</version> -->
		                <!--<version>11.2.0</version> -->
		                <version>11.2.0</version>
		            </dependency>
					<!-- jcuda-natives -->		            
		            <dependency>
		                <groupId>org.jcuda</groupId>
		                <artifactId>jcuda-natives</artifactId>
		                <!-- <version>10.1.0</version> -->
		                <!--<version>11.2.0</version> -->
		                <version>11.2.0</version>
		            </dependency>
		            <!--
		            	As of 2018/09/11 TF for GPU on Maven supports CUDA 9.0 (vs latest 9.2)
		            	Workaround:
		            	  ~$ sudo dpkg -i cuda-repo-ubuntu1604-9-0-local_9.0.176-1_amd64.deb
		            	  ~$ sudo apt install cuda-9.0
		            	  # install or link back to cuda-9.2:
		            	  ~$ sudo rm /usr/local/cuda; sudo ln -sf /usr/local/cuda-9.2 /usr/local/cuda
		            	  Then in Eclipse's Run configurations... add an environment variable:
		            	  LD_LIBRARY_PATH = /usr/local/cuda-9.0/lib64
		            -->
	           	</dependencies>
	        </profile>
	        <profile>
            	<id>profileCuda12</id>
            	
			    <activation>
			     <!-- <activeByDefault>true</activeByDefault>-->
			    	<os>
				    	<name>Linux</name>
				    	<version>!5.15.0-139-generic</version>
			    	</os>
			    </activation>
				<dependencies>
		            <dependency>
		                <groupId>org.jcuda</groupId>
		                <artifactId>jcuda</artifactId>
		                <!-- <version>10.1.0</version> -->
		                <!--<version>11.2.0</version> -->
		                <version>12.6.0</version>
		            </dependency>
					<!-- jcuda-natives -->		            
		            <dependency>
		                <groupId>org.jcuda</groupId>
		                <artifactId>jcuda-natives</artifactId>
		                <!-- <version>10.1.0</version> -->
		                <!--<version>11.2.0</version> -->
		                <version>12.6.0</version>
		            </dependency>
		            <!--
		            	As of 2018/09/11 TF for GPU on Maven supports CUDA 9.0 (vs latest 9.2)
		            	Workaround:
		            	  ~$ sudo dpkg -i cuda-repo-ubuntu1604-9-0-local_9.0.176-1_amd64.deb
		            	  ~$ sudo apt install cuda-9.0
		            	  # install or link back to cuda-9.2:
		            	  ~$ sudo rm /usr/local/cuda; sudo ln -sf /usr/local/cuda-9.2 /usr/local/cuda
		            	  Then in Eclipse's Run configurations... add an environment variable:
		            	  LD_LIBRARY_PATH = /usr/local/cuda-9.0/lib64
		            -->
	           	</dependencies>
	        </profile>
		</profiles>	

	<build>
		<resources>
			<resource>
				<directory>${basedir}/src/main/resources</directory>
			</resource>
			<resource>
				<directory>${project.build.sourceDirectory}</directory>
			</resource>
<!-- trying to copy deep classes to top for the imageJ to see as plugins-->
<!-- 
		    <resource>
		      <filtering>true</filtering>
		      <directory>${basedir}/target/classes/com/elphel/imagej/jp4</directory>
		      <targetPath>${basedir}/target/classes</targetPath>
		      <includes>
		        <include>JP46_Reader_camera.class</include>
		      </includes>
		    </resource>
 -->			
		</resources>
		<testResources>
			<testResource>
				<directory>${basedir}/src/test/resources</directory>
			</testResource>
			<testResource>
				<directory>${project.build.testSourceDirectory}</directory>
			</testResource>
		</testResources>
		<pluginManagement>
		    <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <configuration>
	                <source>1.8</source>
	                <target>1.8</target>
                </configuration>
            </plugin>
			   <plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>exec-maven-plugin</artifactId>
                    <version>1.3.2</version><!--$NO-MVN-MAN-VER$-->
				<executions>
					<execution>
                        <phase>package</phase>
						<goals>
							<goal>java</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
<!-- 				<mainClass>Aberration_Calibration</mainClass>  -->
					<mainClass>Eyesis_Correction</mainClass>
				</configuration>
			</plugin>
 			   <plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>buildnumber-maven-plugin</artifactId>
				<version>1.3</version>
				<executions>
                                    <execution>
                                    <phase>validate</phase>
                                    <goals>
                                        <goal>create</goal>
                                    </goals>
                                    </execution>
				</executions>
				<configuration>
                                    <doCheck>true</doCheck>
                                    <doUpdate>true</doUpdate>
                                    <format>Build {0,date,yyyy-MM-dd} {0,time,HH:MM:SS} on host {1}</format>
                                    <items>
                                        <item>timestamp</item>
                                    </items>
				</configuration>
              </plugin>

<!-- Trying sources/javadocs -->
		      <plugin>
		        <groupId>org.apache.maven.plugins</groupId>
		        <artifactId>maven-dependency-plugin</artifactId>
		        <version>3.1.2</version>
		        <executions>
		            <execution>
		                <goals>
		                    <goal>sources</goal>
		                    <goal>resolve</goal>
		                </goals>
		                <configuration>
		                    <classifier>javadoc</classifier>
		                </configuration>
		            </execution>
		        </executions>
		      </plugin>
<!-- End of Trying sources/javadocs -->


		    </plugins>




        </pluginManagement>

	</build>

	<developers>
		<developer>
			<id>AndreyFilippov</id>
			<name>Andrey Filippov</name>
			<email>andrey@elphel.com</email>
			<url>http://blog.elphel.com/andrey</url>
			<organization>Elphel, Inc.</organization>
			<organizationUrl>http://www3.elphel.com</organizationUrl>
			<roles>
				<role>architect</role>
				<role>developer</role>
			</roles>
			<timezone>-6</timezone>
		</developer>
	</developers>

	<repositories>
		<!-- NB: for project parent -->
		<repository>
			<id>imagej.public</id>
			<url>https://mvnrepository.com/artifact/net.imagej/ij</url>
			<!--<url>http://maven.imagej.net/content/groups/public</url>-->
		</repository>
		<!---->
		<repository>
			<id>elphel.imagej-elphel</id>
			<url>https://git.elphel.com/Elphel/imagej-elphel</url>
		</repository>
        <!---->		
		<repository>
			<id>other</id>
			<url>https://mirror.elphel.com/maven-dependencies</url>
		</repository>
		<repository>
			<id>ome.loci_tools.public</id>
			<url>https://mvnrepository.com/artifact/ome/loci_tools</url>
		</repository>
		<repository>
			<id>ome.pom-bio-formats.public</id>
			<url>https://mvnrepository.com/artifact</url>
		</repository>
	</repositories>

	<scm>
		<connection>scm:git:git://git.elphel.com/Elphel/imagej-elphel</connection>
		<developerConnection>scm:git:https://git.elphel.com/Elphel/imagej-elphel</developerConnection>
		<tag>HEAD</tag>
		<url>https://git.elphel.com/Elphel/imagej-elphel</url>
	</scm>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                 <!-- <version>2.14</version>-->
                 <version>3.6.1</version>
                <configuration>
                    <configLocation>config/sun_checks.xml</configLocation>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
        </plugins>
    </reporting>
</project>
