<?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>

    <properties>
		<version>1.1.009</version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <groupId>org.nachc.cad.tools</groupId>
    <artifactId>curlew</artifactId>
    <version>${version}</version>

    <packaging>jar</packaging>

    <name>COSMOS -- Curlew edition: Starting with Value Set management</name>
	<description>
		This project contains the code for higher level functionality required for the NACHC/COSMOS project.  
		This includes our api for interacting with Databricks.  
	</description>
	<url>https://github.com/NACHC-CAD/curlew</url>

	<licenses>
	    <license>
	      <name>Apache License, Version 2.0</name>
	      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
	      <distribution>repo</distribution>
	    </license>
	</licenses>
  
    <developers>
	    <developer>
		    <name>John Gresh</name>
		    <email>johngresh@curlewconsulting.com</email>
		    <organization>NACHC</organization>
		    <organizationUrl>https.www.nachc.org</organizationUrl>
	    </developer>
    </developers>
  
	<scm>
		<connection>scm:git:git://github.com/NACHC-CAD/core</connection>
		<developerConnection>scm:git:ssh://github.com:NACHC-CAD/core.git</developerConnection>
		<url>http://github.com/NACHC-CAD/core/tree/master</url>
	</scm>  
  
	<distributionManagement>
		<snapshotRepository>
			<id>ossrh</id>
			<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>   
		</snapshotRepository>
		<repository>
			<id>ossrh</id>
			<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>		
	</distributionManagement>

	<!-- 
	*
	* dependencies
	*
	-->

	<dependencies>

		<!-- CORE NACHC FRAMEWORK STUFF -->
		<dependency>
			<groupId>org.nachc.cad.tools</groupId>
			<artifactId>core</artifactId>
			<version>1.1.009</version>
		</dependency>


		<!-- 
		*
		* Depedencies with scope limits
		*
		 -->

		<!-- Databricks JDBC Driver -->
		<dependency>
		    <groupId>com.databricks</groupId>
		    <artifactId>jdbc</artifactId>
		    <version>1.0</version>
		    <scope>system</scope>
		    <systemPath>${project.basedir}/lib/SimbaSparkJDBC42-2.6.16.1020/SparkJDBC42.jar</systemPath>
		</dependency>

		<!-- LOMBOK -->
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.18.8</version>
            <scope>provided</scope>
        </dependency>

		<!-- JUNIT https://mvnrepository.com/artifact/junit/junit -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.12</version>
			<scope>test</scope>
		</dependency>
		
		<!-- JUNIT-TOOLBOX https://mvnrepository.com/artifact/com.googlecode.junit-toolbox/junit-toolbox -->
		<dependency>
			<groupId>com.googlecode.junit-toolbox</groupId>
			<artifactId>junit-toolbox</artifactId>
			<version>2.4</version>
			<scope>test</scope>
		</dependency>

		<!-- 
		*
		* PROJECT SPECIFIC DEPENDENCIES
		*
		 -->

		<!-- MYSQL DRIVER https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
		<dependency>
		    <groupId>mysql</groupId>
		    <artifactId>mysql-connector-java</artifactId>
		    <version>8.0.19</version>
		</dependency>

	</dependencies>

	<!-- 
	*
	* build
	*
	-->

	<build>

		<!-- 
		* 
		* EXCLUDE AUTHENTICATION INFO FROM DEPLOYMENT BUILD 
		*
		-->
		
		<resources>
			<resource>
				<directory>src/main/resources</directory>
				<includes>
					<include>**/*</include>
				</includes>
				<excludes>
					<exclude>auth/**/*</exclude>
				</excludes>
			</resource>
		</resources>

		<plugins>

			<!-- compiler -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.8.0</version>
				<configuration>
					<release>11</release>
				</configuration>
			</plugin>		

			<!-- test -->
			<plugin>
				  <groupId>org.apache.maven.plugins</groupId>
				  <artifactId>maven-surefire-plugin</artifactId>
				  <version>3.0.0-M5</version>
				  <configuration>
				    <skipTests>true</skipTests>
				  </configuration>
			</plugin>

			<!-- jar -->
			<plugin>
			    <groupId>org.apache.maven.plugins</groupId>
			    <artifactId>maven-jar-plugin</artifactId>
			    <version>2.3.2</version>
			    <configuration>
			        <finalName>nachc-cad-curlew-${build.version}</finalName>                   
			    </configuration>
			</plugin>      

			<!-- 
			*
			* Generate sources and java docs (required for mvn distribution) 
			*
			* -->
			
			<!-- source -->
			<plugin>
			  <groupId>org.apache.maven.plugins</groupId>
			  <artifactId>maven-source-plugin</artifactId>
			  <version>2.2.1</version>
			  <executions>
			    <execution>
			      <id>attach-sources</id>
			      <goals>
			        <goal>jar-no-fork</goal>
			      </goals>
			    </execution>
			  </executions>
			</plugin>
			<!-- javadoc -->
			<plugin>
			  <groupId>org.apache.maven.plugins</groupId>
			  <artifactId>maven-javadoc-plugin</artifactId>
			  <version>2.9.1</version>
			  <executions>
			    <execution>
			      <id>attach-javadocs</id>
			      <goals>
			        <goal>jar</goal>
			      </goals>
			    </execution>
			  </executions>
			</plugin>
	
			<!-- 
			*
			* MVN Distribution
			* (see https://central.sonatype.org/publish/publish-maven/ for details)
			*
			* -->
	
			<!-- staging -->
		    <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://s01.oss.sonatype.org/</nexusUrl>
		        <autoReleaseAfterClose>true</autoReleaseAfterClose>
		      </configuration>
		    </plugin>

			<!-- certificate signing -->
			<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://s01.oss.sonatype.org/</nexusUrl>
			     <autoReleaseAfterClose>true</autoReleaseAfterClose>
			  </configuration>
			</plugin>

			<plugin>
			  <groupId>org.apache.maven.plugins</groupId>
			  <artifactId>maven-release-plugin</artifactId>
			  <version>2.5.3</version>
			  <configuration>
			    <autoVersionSubmodules>true</autoVersionSubmodules>
			    <useReleaseProfile>false</useReleaseProfile>
			    <releaseProfiles>release</releaseProfiles>
			    <goals>deploy</goals>
			  </configuration>
			</plugin>

		</plugins>
	</build>
    
</project>
