<?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.tinfour</groupId>
  <artifactId>Tinfour</artifactId>
  <version>2.0</version>
  
  <packaging>pom</packaging>
  <name>Tinfour</name>
  <description>Java library for Constrained Delaunay Triangulation, Voronoi Diagram,
  and related Triangular Irregular Network (TIN) applications</description>
  <url>http://www.tinfour.org</url>
  
  
	<licenses>
	  <license>
		<name>Apache License, Version 2.0</name>
		<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
		<distribution>repo</distribution>
		<comments>A business-friendly OSS license</comments>
	  </license>
	</licenses>

    <developers>
        <developer>
            <name>G.W. Lucas</name>
            <email>contact.tinfour@gmail.com</email>
            <organization>tinfour.org</organization>
            <organizationUrl>http://tinfour.org</organizationUrl>
			<timezone>America/New_York</timezone>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:https://github.com/gwlucastrig/Tinfour.git</connection>
        <developerConnection>scm:git:git@github.com:gwlucastrig/Tinfour.git</developerConnection>
        <url>https://github.com/gwlucastrig/Tinfour/tree/master</url>
    </scm>
 
  
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<maven.compiler.source>1.8</maven.compiler.source>
		<maven.compiler.target>1.8</maven.compiler.target>
	</properties>

	<modules>
		<module>core</module>
		<module>gis</module>
		<module>analysis</module>
		<module>demo</module>
	</modules>
  
  
  <dependencies>
  
  	<!-- laszip4j is required by TinfourGIS -->
	 <dependency>
		<groupId>com.github.mreutegg</groupId>
		<artifactId>laszip4j</artifactId>
		<version>0.5</version>
	</dependency>
	
	<!-- Apache Commons Math is required by TinfourAnalysis -->
	<dependency>
		<groupId>org.apache.commons</groupId>
		<artifactId>commons-math3</artifactId>
		<version>3.6.1</version>
	</dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.11</version>
      <scope>test</scope>  
    </dependency>
	
  </dependencies>

	<distributionManagement>
		<snapshotRepository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
	</distributionManagement>

  <build>
    <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
      <plugins>
        <!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
        <plugin>
          <artifactId>maven-clean-plugin</artifactId>
          <version>3.1.0</version>
        </plugin>
        <!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
        <plugin>
          <artifactId>maven-resources-plugin</artifactId>
          <version>3.0.2</version>
        </plugin>
        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.8.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.22.1</version>
        </plugin>
        <plugin>
          <artifactId>maven-jar-plugin</artifactId>
          <version>3.0.2</version>
        </plugin>
        <plugin>
          <artifactId>maven-install-plugin</artifactId>
          <version>2.5.2</version>
        </plugin>
        <plugin>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>2.8.2</version>
        </plugin>
        <!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
        <plugin>
          <artifactId>maven-site-plugin</artifactId>
          <version>3.7.1</version>
        </plugin>
        <plugin>
          <artifactId>maven-project-info-reports-plugin</artifactId>
          <version>3.0.0</version>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>
  

	<!-- The "release" profile is mainly used when preparing a release for 
	     Tinfour, but it can be applied any time you are running a maven package phase.
		 It's main purpose is to enable to construction of
		 the sources and javadoc jars required for deployment.  Normally,
		 most developers won't want to waste the time generating the javadoc
		 and sources while working on code.  But if they do, they can activate them
         by supplying the -P release option on the maven command line.

		 Note: this setup may change a bit in the near futre when digital signing is
		       added to the pom.
		 -->		 
	<profiles>
		<profile>
			<id>release</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<version>3.0.1</version>
						<executions>
						<execution>
							<id>attach-javadocs</id>
							<phase>package</phase>
							<goals>
								<goal>jar</goal>
							</goals>
							</execution>
						</executions>
					</plugin>

					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<version>3.0.1</version>
						<executions>
							<execution>
							<id>attach-sources</id>
							<phase>package</phase> 
							<goals>
								<goal>jar-no-fork</goal>
							</goals>
							</execution>
						</executions>
					</plugin>

					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>1.5</version>
						<executions>
							<execution>
							<id>sign-artifacts</id>
							<phase>verify</phase>
							<goals>
								<goal>sign</goal>
							</goals>
							</execution>
						</executions>
					</plugin>

					<plugin>
						<groupId>org.sonatype.plugins</groupId>
						<artifactId>nexus-staging-maven-plugin</artifactId>
						<version>1.6.7</version>
						<extensions>true</extensions>
						<configuration>
						<serverId>ossrh</serverId>
						<nexusUrl>https://oss.sonatype.org/</nexusUrl>
						<autoReleaseAfterClose>true</autoReleaseAfterClose>
						</configuration>
					</plugin>
					
				</plugins>
			</build>
		</profile>
	</profiles>
 
</project>
