<?xml version="1.0" ?>
<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>

	<parent>
		<groupId>org.sonatype.oss</groupId>
		<artifactId>oss-parent</artifactId>
		<version>7</version>
	</parent>

	<groupId>org.jpmml</groupId>
	<artifactId>jpmml-sparkml</artifactId>
	<version>1.2.2</version>

	<name>JPMML-SparkML</name>
	<description>Java library and command-line application for converting Spark ML pipelines to PMML</description>
	<url>https://github.com/jpmml/jpmml-sparkml</url>

	<licenses>
		<license>
			<name>GNU Affero General Public License (AGPL) version 3.0</name>
			<url>http://www.gnu.org/licenses/agpl-3.0.html</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<developers>
		<developer>
			<id>villu.ruusmann</id>
			<name>Villu Ruusmann</name>
		</developer>
	</developers>

	<scm>
		<connection>scm:git:git@github.com:jpmml/jpmml-sparkml.git</connection>
		<developerConnection>scm:git:git@github.com:jpmml/jpmml-sparkml.git</developerConnection>
		<url>git://github.com/jpmml/jpmml-sparkml.git</url>
		<tag>1.2.2</tag>
	</scm>
	<issueManagement>
		<system>GitHub</system>
		<url>https://github.com/jpmml/jpmml-sparkml/issues</url>
	</issueManagement>

	<dependencies>
		<dependency>
			<groupId>com.beust</groupId>
			<artifactId>jcommander</artifactId>
			<version>1.48</version>
		</dependency>

		<dependency>
			<groupId>org.apache.spark</groupId>
			<artifactId>spark-core_2.11</artifactId>
			<version>2.1.0</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.spark</groupId>
			<artifactId>spark-mllib_2.11</artifactId>
			<version>2.1.0</version>
			<scope>provided</scope>
			<exclusions>
				<exclusion>
					<groupId>org.jpmml</groupId>
					<artifactId>pmml-model</artifactId>
				</exclusion>
			</exclusions>
		</dependency>

		<dependency>
			<groupId>org.jpmml</groupId>
			<artifactId>jpmml-converter</artifactId>
			<version>1.2.3</version>
			<exclusions>
				<exclusion>
					<groupId>com.google.guava</groupId>
					<artifactId>guava</artifactId>
				</exclusion>
				<exclusion>
					<groupId>com.sun.xml.fastinfoset</groupId>
					<artifactId>FastInfoset</artifactId>
				</exclusion>
				<exclusion>
					<groupId>javax.xml.bind</groupId>
					<artifactId>jaxb-api</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.glassfish.jaxb</groupId>
					<artifactId>txw2</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.jvnet.staxex</groupId>
					<artifactId>stax-ex</artifactId>
				</exclusion>
			</exclusions>
		</dependency>

		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.12</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.jpmml</groupId>
			<artifactId>pmml-evaluator</artifactId>
			<version>1.3.5</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.jpmml</groupId>
			<artifactId>pmml-evaluator-test</artifactId>
			<version>1.3.5</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.5.1</version>
				<configuration>
					<source>1.7</source>
					<target>1.7</target>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-enforcer-plugin</artifactId>
				<version>1.4.1</version>
				<executions>
					<execution>
						<goals>
							<goal>enforce</goal>
						</goals>
						<configuration>
							<rules>
								<requireJavaVersion>
									<version>1.7</version>
								</requireJavaVersion>
							</rules>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>3.0.2</version>
				<configuration>
					<archive>
						<manifest>
							<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
						</manifest>
					</archive>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<version>2.5.3</version>
				<configuration>
					<localCheckout>true</localCheckout>
					<pushChanges>false</pushChanges>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-shade-plugin</artifactId>
				<version>2.4.3</version>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>shade</goal>
						</goals>
						<configuration>
							<finalName>converter-executable-${project.version}</finalName>
							<filters>
								<filter>
									<artifact>*:*</artifact>
									<excludes>
										<exclude>META-INF/*.SF</exclude>
										<exclude>META-INF/*.DSA</exclude>
										<exclude>META-INF/*.RSA</exclude>
									</excludes>
								</filter>
							</filters>
							<relocations>
								<relocation>
									<pattern>org.dmg.pmml</pattern>
									<shadedPattern>org.shaded.dmg.pmml</shadedPattern>
								</relocation>
								<relocation>
									<pattern>org.jpmml.agent</pattern>
									<shadedPattern>org.shaded.jpmml.agent</shadedPattern>
								</relocation>
								<relocation>
									<pattern>org.jpmml.model</pattern>
									<shadedPattern>org.shaded.jpmml.model</shadedPattern>
								</relocation>
								<relocation>
									<pattern>org.jpmml.schema</pattern>
									<shadedPattern>org.shaded.jpmml.schema</shadedPattern>
								</relocation>
							</relocations>
							<transformers>
								<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
									<mainClass>org.jpmml.sparkml.Main</mainClass>
								</transformer>
							</transformers>
						</configuration>
					</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>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.19.1</version>
				<configuration>
					<argLine>${jacoco.agent}</argLine>
					<trimStackTrace>false</trimStackTrace>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<version>0.7.9</version>
				<executions>
					<execution>
						<id>pre-unit-test</id>
						<goals>
							<goal>prepare-agent</goal>
						</goals>
						<configuration>
							<propertyName>jacoco.agent</propertyName>
						</configuration>
					</execution>
					<execution>
						<id>post-unit-test</id>
						<phase>prepare-package</phase>
						<goals>
							<goal>report</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
</project>
