<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.opencv</groupId>
    <artifactId>opencv-natives</artifactId>
    <version>4.5.3</version>
    
    <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>http://www.jorigin.org</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>
      <maven.compiler.release>11</maven.compiler.release>
      <maven.compiler.source>11</maven.compiler.source>
      <maven.compiler.target>11</maven.compiler.target>
    
      <maven.plugin.compiler.version>3.8.1</maven.plugin.compiler.version>
      <maven.plugin.deploy.version>3.1.1</maven.plugin.deploy.version>
      <maven.plugin.javadoc.version>3.1.1</maven.plugin.javadoc.version>
      <maven.plugin.release.version>3.0.0-M1</maven.plugin.release.version>
      <maven.plugin.nexus.version>1.6.8</maven.plugin.nexus.version>
      <maven.plugin.source.version>3.2.0</maven.plugin.source.version>
      <maven.plugin.scm-provider-gitexe.version>1.11.12</maven.plugin.scm-provider-gitexe.version>
      
      <maven.plugin.surefire.version>3.0.0-M4</maven.plugin.surefire.version>
      
      <junit.version>5.7.1</junit.version>
    </properties>
    
      <profiles>

    <!-- GPG Signature on release -->
    <profile>
      <id>release-sign-artifacts</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
    
      <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>
  </profiles>
    
    <repositories>     
      <!-- local -->      
      <repository>
        <id>local-repo</id>
        <name>local-repo</name>
        <url>file://${basedir}/repository</url>
      </repository>
      
      <!-- JOrigin repository -->      
      <repository>
        <id>jorigin</id>
        <name>jorigin-maven</name>
        <url>https://maven.jorigin.org</url>
      </repository>
      
    </repositories>
    
    <dependencies>
      <dependency>
        <groupId>org.opencv</groupId>
        <artifactId>opencv</artifactId>
        <version>4.5.3</version>
      </dependency>
      
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-api</artifactId>
			<version>${junit.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-engine</artifactId>
			<version>${junit.version}</version>
			<scope>test</scope>
		</dependency>
    </dependencies>
    
    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <excludes>
                    <exclude>**/*.md</exclude>
                    <exclude>**/*.h</exclude>
                    <exclude>**/*.lib</exclude>
                </excludes>
            </resource>
        </resources>
        
        <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>
            
          <!-- Testing -->
		  <plugin>
		    <artifactId>maven-surefire-plugin</artifactId>
			<version>${maven.plugin.surefire.version}</version>
		  </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>'&lt;script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"&gt;&lt;/script&gt;'</header>
            </configuration>  
        
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
            
          <!-- Checksum computation -->
          <plugin>
            <groupId>net.nicoulaj.maven.plugins</groupId>
            <artifactId>checksum-maven-plugin</artifactId>
            <version>1.11</version>
            <executions>
              <execution>
                <goals>
                  <goal>artifacts</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <!-- put your configurations here -->
            </configuration>
          </plugin>
            
          <plugin>
            <artifactId>maven-install-plugin</artifactId>
            <version>3.0.0-M1</version>
            <configuration>
              <createChecksum>true</createChecksum>
            </configuration>
          </plugin>  
        </plugins>
    </build>
</project>
