<?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.jorigin</groupId>
		<artifactId>jvision</artifactId>
		<relativePath>../pom.xml</relativePath>
		<version>1.0.0-SNAPSHOT</version>
	</parent>

  <artifactId>jvision-api</artifactId>
  <packaging>jar</packaging>

  <name>JVision API</name>
  <description>A Computer Vision / Photogrammetry java library </description>
  <url>https://github.com/jseinturier/jvision</url>

  <licenses>
    <license>
      <name>The GNU Lesser General Public License, Version 3.0</name>
      <url>http://www.gnu.org/licenses/lgpl-3.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  
  <developers>
    <developer>
      <id>jseinturier</id>
      <name>Julien Seinturier</name>
      <email>seinturier@gmail.com</email>
      <url>http://www.seinturier.fr</url>
      <organization>JOrigin</organization>
      <organizationUrl>https://github.com/jorigin</organizationUrl>
      <roles>
        <role>architect</role>
        <role>developer</role>
      </roles>
      <timezone>France/Paris</timezone>
      <properties>
        <!-- <picUrl>http://www.example.com/jdoe/pic</picUrl> -->
      </properties>
    </developer>
  </developers>
  
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>
  
  <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>
  
  <scm>
    <connection>scm:git:git://github.com/jorigin/jvision.git</connection>
    <developerConnection>scm:git:git@github.com:jorigin/jvision.git</developerConnection>
    <url>https://github.com/jorigin/jvision</url>
    <tag>HEAD</tag>
  </scm>
  
  <profiles>

		<!-- GPG Signature on release -->
		<profile>
			<id>release-sign-artifacts</id>
			<activation>
				<activeByDefault>true</activeByDefault>
				<!--<property> <name>performRelease</name> <value>true</value> </property> -->
			</activation>

			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>${maven.plugin.gpg.version}</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
  </profiles>
  
  <dependencies>
  
    <dependency>
      <groupId>org.jorigin</groupId>
      <artifactId>jeometry-api</artifactId>
      <version>${jeometry.version}</version>
    </dependency>
  
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter</artifactId>
      <version>${junit.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  
  <build>
    <plugins>
    
    
      <!--  Compile sources -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${maven.plugin.compiler.version}</version>
        <configuration>
          <release>${maven.compiler.release}</release>
          <source>${maven.compiler.source}</source>
          <target>${maven.compiler.target}</target>
        </configuration>
      </plugin>
    
      <!-- Generate sources jar during package phase 
           equivalent to maven sources:jar -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
		<version>${maven.plugin.source.version}</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <!-- Generate apidoc jar during package phase 
           equivalent to maven javadoc:jar -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
		<version>${maven.plugin.javadoc.version}</version>
		
		<!-- Embedding Latex formulas within javadoc using MathJax-->
		<configuration>

          <additionalJOptions>
            <additionalJOption>--allow-script-in-comments</additionalJOption>
          </additionalJOptions>
          <header>&apos;&lt;script type=&quot;text/javascript&quot; src=&quot;http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML&quot;&gt;&lt;/script&gt;&apos;</header>
        </configuration>  
        
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      
      <!--  Distribution management -->
      <plugin>
        <artifactId>maven-deploy-plugin</artifactId>
        <version>${maven.plugin.deploy.version}</version>
        <executions>
          <execution>
            <id>default-deploy</id>
            <phase>deploy</phase>
            <goals>
              <goal>deploy</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      
      <!-- Release management -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>${maven.plugin.release.version}</version>
        
        <configuration>
          <localCheckout>true</localCheckout>
          <pushChanges>false</pushChanges>
          <mavenExecutorId>forked-path</mavenExecutorId>
          <arguments>-Dgpg.passphrase=${gpg.passphrase}</arguments>
        </configuration>
        
        <dependencies>
          <dependency>
            <groupId>org.apache.maven.scm</groupId>
            <artifactId>maven-scm-provider-gitexe</artifactId>
            <version>${maven.plugin.scm-provider-gitexe.version}</version>
          </dependency>
        </dependencies>
      </plugin>
      
      <!-- Sonatype nexus plugin -->
      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
        <version>${maven.plugin.nexus.version}</version>
        <extensions>true</extensions>
        
        <configuration>
          <serverId>ossrh</serverId>
          <nexusUrl>https://oss.sonatype.org/</nexusUrl>
          <autoReleaseAfterClose>true</autoReleaseAfterClose>
        </configuration>
      </plugin>
      
    </plugins>
  </build>
</project>
