<?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.jpmml</groupId>
		<artifactId>jpmml-model</artifactId>
		<version>1.4.11</version>
	</parent>

	<groupId>org.jpmml</groupId>
	<artifactId>pmml-model</artifactId>
	<packaging>jar</packaging>

	<name>JPMML class model</name>
	<description>JPMML class model</description>

	<licenses>
		<license>
			<name>BSD 3-Clause License</name>
			<url>http://opensource.org/licenses/BSD-3-Clause</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<dependencies>
		<dependency>
			<groupId>org.jpmml</groupId>
			<artifactId>pmml-agent</artifactId>
			<exclusions>
				<exclusion>
					<groupId>org.javassist</groupId>
					<artifactId>javassist</artifactId>
				</exclusion>
			</exclusions>
		</dependency>

		<dependency>
			<groupId>com.fasterxml.jackson.core</groupId>
			<artifactId>jackson-annotations</artifactId>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.eclipse.persistence</groupId>
			<artifactId>org.eclipse.persistence.moxy</artifactId>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.glassfish.jaxb</groupId>
			<artifactId>jaxb-runtime</artifactId>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
		</dependency>
	</dependencies>

	<build>
		<testResources>
			<testResource>
				<directory>src/test/resources</directory>
				<filtering>true</filtering>
			</testResource>
		</testResources>

		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>3.1.1</version>
				<executions>
					<execution>
						<goals>
							<goal>test-jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-resources-plugin</artifactId>
				<version>3.1.0</version>
				<executions>
					<execution>
						<phase>process-sources</phase>
						<goals>
							<goal>copy-resources</goal>
						</goals>
						<configuration>
							<outputDirectory>${project.build.outputDirectory}</outputDirectory>
							<resources>
								<resource>
									<directory>target/transformed-schema</directory>
									<includes>
										<include>pmml.xsd</include>
									</includes>
								</resource>
							</resources>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<configuration>
					<argLine>-javaagent:${basedir}/../pmml-agent/target/agent-${project.version}.jar=public=true ${jacoco.agent}</argLine>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>xml-maven-plugin</artifactId>
				<version>1.0.2</version>
				<executions>
					<execution>
						<phase>generate-sources</phase>
						<goals>
							<goal>transform</goal>
						</goals>
						<configuration>
							<transformationSets>
								<transformationSet>
									<dir>src/main/schema</dir>
									<includes>pmml.*</includes>
									<outputDir>target/transformed-schema</outputDir>
									<stylesheet>src/main/xsl/pmml.xsl</stylesheet>
								</transformationSet>
								<transformationSet>
									<dir>target/transformed-schema</dir>
									<includes>pmml.*</includes>
									<outputDir>target/transformed-jaxb-schema</outputDir>
									<stylesheet>src/main/xsl/pmml-jaxb.xsl</stylesheet>
								</transformationSet>
							</transformationSets>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<version>0.8.3</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>
			<plugin>
				<groupId>org.jvnet.jaxb2.maven2</groupId>
				<artifactId>maven-jaxb22-plugin</artifactId>
				<version>0.14.0</version>
				<executions>
					<execution>
						<goals>
							<goal>generate</goal>
						</goals>
						<configuration>
							<args>
								<arg>-no-header</arg>
								<arg>-npa</arg>
								<arg>-Xannotate</arg>
								<arg>-XcopyConstructor</arg>
								<arg>-Xinheritance</arg>
								<arg>-Xjackson</arg>
								<arg>-Xno-javadoc</arg>
								<arg>-Xpmml</arg>
								<arg>-XvalueConstructor</arg>
								<arg>-Xvisitor</arg>
								<arg>-Xwildcard</arg>
							</args>
							<episode>false</episode>
							<extension>true</extension>
							<schemaDirectory>target/transformed-jaxb-schema</schemaDirectory>
							<specVersion>2.2</specVersion>
						</configuration>
					</execution>
				</executions>
				<dependencies>
					<dependency>
						<groupId>org.jpmml</groupId>
						<artifactId>pmml-xjc</artifactId>
						<version>${project.parent.version}</version>
					</dependency>
				</dependencies>
			</plugin>
		</plugins>
	</build>
</project>
