<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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  
  <groupId>com.agisoft</groupId>
  <artifactId>metashape</artifactId>
  <packaging>jar</packaging>
  <version>1.8.0</version>
  <name>Metashape-java</name>
  <url>http://maven.apache.org</url>
  
  <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.10.1</maven.plugin.compiler.version>
	<maven.plugin.javadoc.version>3.4.0</maven.plugin.javadoc.version>
	<maven.plugin.source.version>3.2.0</maven.plugin.source.version>
    <maven.plugin.deploy.version>3.1.1</maven.plugin.deploy.version>   
    <maven.plugin.release.version>3.0.0-M1</maven.plugin.release.version>
  </properties>
  
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.13.1</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  
  <distributionManagement>
    <repository>
      <id>github</id>
      <name>GitHub Agisoft Metachape(c) Java Wrapper Apache Maven Packages</name>
      <url>https://maven.pkg.github.com/jseinturier/maven</url>
    </repository>
 </distributionManagement>
  
  <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>
		
		<configuration>
          <excludes>
            <exclude>**/natives/**</exclude>
          </excludes>
        </configuration>
		
        <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>
    </plugins>
  </build>
</project>
