<?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>
  
  <groupId>org.jogamp.java3d</groupId>
  <artifactId>java3d-utils-and</artifactId>
  <version>1.7.2</version>
  
  <name>Java 3D Utils for Android</name>
  <description>Extension of the Utility functions for the Java 3D Graphics API</description>
  <url>https://jogamp.org</url>

	<licenses>
		<license>
			<name>Simplified BSD License</name>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<developers>
		<developer>
			<id>philjord</id>
			<name>Philip Jordan</name>
			<email>p.j.nz@outlook.com</email>
			<url>https://github.com/philjord</url>
			<organization>JogAmp</organization>
			<organizationUrl>http://jogamp.org/</organizationUrl>
			<roles>
				<role>maintainer</role>
			</roles>
			<timezone>+12</timezone>
		</developer>		
	</developers>
	
	<scm>
		<connection>scm:git:https://github.com/philjord/java3d-utils-and</connection>
		<developerConnection></developerConnection>
		<tag>HEAD</tag>
		<url>https://github.com/philjord/java3d-utils-and</url>
	</scm>
	
	<properties>
		<jogamp.version>2.6.0</jogamp.version>

		<!-- NB: Avoid platform encoding warning when copying resources. -->
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>				
	</properties>	
	<dependencies>
	    <dependency>
			<groupId>${project.groupId}</groupId>
			<artifactId>java3d-core-and</artifactId>
			<version>${project.version}</version>				
		</dependency>	
		<dependency>
			<groupId>${project.groupId}</groupId>
			<artifactId>java3d-utils</artifactId>
			<version>${project.version}</version>
			<optional>true</optional> <!-- otherwise dependent project will pull this in, but we actually merge it into the output -->			
		</dependency>	
		<dependency> <!-- because we exclude java3d-util as optional we need to put back in the joal as mandatory from that project -->	
			<groupId>org.jogamp.joal</groupId>
			<artifactId>joal</artifactId>
			<version>${jogamp.version}</version>
		</dependency>		
	</dependencies>
	
  <build>
  	<defaultGoal>install</defaultGoal>

	<sourceDirectory>${basedir}/src/classes/share</sourceDirectory>
    <resources>
      <resource>
        <directory>${project.basedir}/src/classes/share</directory>
        <excludes>
          <exclude>**/*.java</exclude>
          <exclude>**/package.html</exclude>
        </excludes>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.8.0</version>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
        </configuration>
      </plugin>
      <!-- This project overrides a few of the classes in it's parent, there is no good javadoc merger, shade doesn't do it' -->
	  <plugin>
			<artifactId>maven-javadoc-plugin</artifactId>
			<version>3.1.1</version>
			<configuration>
				<additionalJOption>-Xdoclint:none</additionalJOption>
				<quiet>true</quiet>
			</configuration>
			<executions>
				<execution>
					<id>attach-javadocs</id>
					<goals>
						<goal>jar</goal>
					</goals>
				</execution>
			</executions>				
		</plugin>		
	  <plugin>
		<groupId>org.apache.maven.plugins</groupId>
		<artifactId>maven-source-plugin</artifactId>
		<version>3.4.0</version>
		<executions>
			<execution>
				<id>attach-sources</id>
				<goals>
					<goal>jar</goal>
				</goals>
			</execution>
		</executions>
	</plugin>
      <!-- This project overrides a few of the classes in it's parent, but must publish the merged jar as an artifact -->      
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-shade-plugin</artifactId>
        <version>3.2.1</version>
        <executions>
          <execution>
            <goals>
              <goal>shade</goal>
            </goals>         
            <configuration>
		        <artifactSet>
                	<includes>
               			<include>${project.groupId}:java3d-utils-and:jar:</include>
          				<include>${project.groupId}:java3d-utils:jar:</include>  
                	</includes>
            	</artifactSet>   
            	<createDependencyReducedPom>false</createDependencyReducedPom>                      
            </configuration>
          </execution>
          <execution>
	        <id>source-jar</id>
	        <goals>
	          <goal>shade</goal>
	        </goals>
	        <configuration>
	          <createSourcesJar>true</createSourcesJar>
	          <artifactSet>
	            <includes>
	              <include>${project.groupId}:java3d-utils-and:jar:</include>
	              <include>${project.groupId}:java3d-utils:jar:</include>
	            </includes>
	          </artifactSet>
	          <createDependencyReducedPom>false</createDependencyReducedPom>
	        </configuration>
	      </execution>
        </executions>
      </plugin>
      <plugin>
		<groupId>org.apache.maven.plugins</groupId>
		<artifactId>maven-gpg-plugin</artifactId>
		<version>3.2.8</version>
		<executions>
			<execution>
				<id>sign-artifacts</id>
				<phase>verify</phase>
				<goals>
					<goal>sign</goal>
				</goals>
			</execution>
		</executions>
	</plugin>
    </plugins>
  </build>
</project>