<!-- Copyright (C) 2009-2013 Barchart, Inc. <http://www.barchart.com /> All 
	rights reserved. Licensed under the OSI BSD License. http://www.opensource.org/licenses/bsd-license.php -->
<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/maven-v4_0_0.xsd">

	<modelVersion>4.0.0</modelVersion>

	<parent>
		<groupId>com.barchart.udt</groupId>
		<artifactId>barchart-udt-archon</artifactId>
		<version>2.3.0</version>
		<relativePath>../barchart-udt-archon</relativePath>
	</parent>

	<artifactId>barchart-udt-core</artifactId>
	<packaging>jar</packaging>

	<url>https://github.com/barchart/barchart-udt</url>
	<description>Barchart UDT [ CORE ]</description>

	<scm>
		<url>https://github.com/barchart/barchart-udt</url>
	    <connection>scm:git:git@github.com:barchart/barchart-udt.git</connection>
    	<developerConnection>scm:git:git@github.com:barchart/barchart-udt.git</developerConnection>
		<tag>barchart-udt-2.3.0</tag>
	</scm>

	<properties>

		<!-- build results -->
		<target>${project.build.directory}</target>

		<!-- c++ source repository -->
		<moduleUDT>udt4</moduleUDT>
		<checkoutUDT>${target}/udt</checkoutUDT>
		<connectionUDT>scm:git:git://git.code.sf.net/p/udt/git</connectionUDT>

		<!-- c++ source layout convention -->
		<folderJNI>jni</folderJNI>
		<folderUDT>udt</folderUDT>
		<nativeSrc>${basedir}/src/main/c++</nativeSrc>
		<nativeSrcJNI>${nativeSrc}/${folderJNI}</nativeSrcJNI>
		<nativeSrcUDT>${nativeSrc}/${folderUDT}</nativeSrcUDT>

		<!-- note: ${label} and ${jdk} is set by jenkins matrix build -->

	</properties>

	<dependencies>

		<!-- MAIN -->

		<!-- required logging api -->
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<scope>compile</scope>
		</dependency>

		<!-- optional logging back end -->
		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-classic</artifactId>
			<scope>provided</scope>
		</dependency>

		<!-- TEST -->

		<!-- required testing framework -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
		</dependency>

		<!-- use yammer metrics for benchmarks -->
		<dependency>
			<groupId>com.yammer.metrics</groupId>
			<artifactId>metrics-core</artifactId>
			<version>2.2.0</version>
			<scope>test</scope>
		</dependency>

		<!-- native arch/os stats -->
		<!-- <dependency> -->
		<!-- <groupId>org.fusesource</groupId> -->
		<!-- <artifactId>sigar</artifactId> -->
		<!-- <version>1.6.4</version> -->
		<!-- <scope>test</scope> -->
		<!-- </dependency> -->
		<!-- <dependency> -->
		<!-- <groupId>org.fusesource</groupId> -->
		<!-- <artifactId>sigar</artifactId> -->
		<!-- <version>1.6.4</version> -->
		<!-- <classifier>native</classifier> -->
		<!-- <scope>test</scope> -->
		<!-- </dependency> -->
		<!-- <dependency> -->
		<!-- <groupId>org.fusesource</groupId> -->
		<!-- <artifactId>libsigar-x86-linux</artifactId> -->
		<!-- <version>1.6.4</version> -->
		<!-- <type>so</type> -->
		<!-- <scope>test</scope> -->
		<!-- </dependency> -->

		<!-- file util -->
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-io</artifactId>
			<version>1.3.2</version>
			<scope>test</scope>
		</dependency>

	</dependencies>

	<build>

		<resources>

			<!-- main resources with properties substitution -->
			<resource>
				<directory>${basedir}/src/main/resources</directory>
				<filtering>true</filtering>
				<includes>
					<include>**/*.xml</include>
					<include>**/*.txt</include>
					<include>**/*.properties</include>
				</includes>
			</resource>

		</resources>

		<testResources>

			<!-- test resources with properties substitution -->
			<testResource>
				<directory>${basedir}/src/test/resources</directory>
				<filtering>true</filtering>
				<includes>
					<include>**/*.xml</include>
					<include>**/*.txt</include>
					<include>**/*.properties</include>
				</includes>
			</testResource>

			<!-- NAR resources with properties substitution; used for both IDE testing 
				and NAR artifact packaging -->
			<testResource>
				<directory>${basedir}/src/nar/resources</directory>
				<filtering>true</filtering>
				<includes>
					<include>**/*.properties</include>
				</includes>
			</testResource>
			<!-- NAR resources w/o properties substitution; used for both IDE testing 
				and NAR artifact packaging -->
			<testResource>
				<directory>${basedir}/src/nar/resources</directory>
				<filtering>false</filtering>
				<includes>
					<include>**/*.so</include>
					<include>**/*.dylib</include>
					<include>**/*.jnilib</include>
					<include>**/*.dll</include>
					<include>**/*.map</include>
					<include>**/*.sym</include>
				</includes>
			</testResource>

		</testResources>

		<plugins>

			<!-- aol.properties used by both NAR plug-in and LIB loader; must be in 
				project root for NAR and on class path for LIB -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-antrun-plugin</artifactId>
				<executions>
					<execution>
						<id>copy-aol</id>
						<phase>process-resources</phase>
						<goals>
							<goal>run</goal>
						</goals>
						<configuration>
							<target>
								<copy todir="${basedir}/target/classes">
									<fileset dir="${basedir}" includes="aol.properties" />
								</copy>
							</target>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<!-- Always attach javadoc. -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<!-- Always attach test sources. -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<executions>
					<execution>
						<id>attach-test-sources</id>
						<goals>
							<goal>test-jar-no-fork</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<!-- Always attach tests jar. -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<executions>
					<execution>
						<goals>
							<goal>test-jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<!-- Disable DS plugin. -->
			<plugin>
				<groupId>com.carrotgarden.maven</groupId>
				<artifactId>carrot-maven-scr-plugin</artifactId>
				<configuration>
				</configuration>
				<executions>
					<execution>
						<id>clean</id>
						<phase>none</phase>
						<goals>
							<goal>clean</goal>
						</goals>
					</execution>
					<execution>
						<id>generate</id>
						<phase>none</phase>
						<goals>
							<goal>generate</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

		</plugins>

		<pluginManagement>
			<plugins>
				<!--This plugin's configuration is used to store Eclipse m2e settings 
					only. It has no influence on the Maven build itself. -->
				<plugin>
					<groupId>org.eclipse.m2e</groupId>
					<artifactId>lifecycle-mapping</artifactId>
					<version>1.0.0</version>
					<configuration>
						<lifecycleMappingMetadata>
							<pluginExecutions>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>org.apache.maven.plugins</groupId>
										<artifactId>maven-antrun-plugin</artifactId>
										<versionRange>[0,)</versionRange>
										<goals>
											<goal>run</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<execute />
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

	<profiles>

		<!-- Get updated c++ sources and apply patches. -->
		<profile>
			<id>checkout</id>
			<build>
				<plugins>

					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-scm-plugin</artifactId>
						<configuration>
							<connectionType>connection</connectionType>
							<connectionUrl>${connectionUDT}</connectionUrl>
							<checkoutDirectory>${checkoutUDT}</checkoutDirectory>
						</configuration>
						<executions>
							<execution>
								<id>checkout-udt-sources-from-git</id>
								<phase>generate-sources</phase>
								<goals>
									<goal>checkout</goal>
								</goals>
							</execution>
						</executions>
					</plugin>

					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-resources-plugin</artifactId>
						<executions>
							<execution>
								<id>copy-udt-sources-after-checkout</id>
								<phase>process-sources</phase>
								<goals>
									<goal>copy-resources</goal>
								</goals>
								<configuration>
									<overwrite>true</overwrite>
									<resources>
										<resource>
											<directory>${checkoutUDT}/${moduleUDT}</directory>
											<filtering>false</filtering>
										</resource>
									</resources>
									<outputDirectory>${nativeSrcUDT}</outputDirectory>
								</configuration>
							</execution>
						</executions>
					</plugin>

					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-patch-plugin</artifactId>
						<version>1.1.1</version>
						<executions>
							<execution>
								<id>apply-local-patches</id>
								<phase>process-sources-XXX</phase>
								<goals>
									<goal>apply</goal>
								</goals>
								<configuration>
									<naturalOrderProcessing>true</naturalOrderProcessing>
									<patchFile>${basedir}/src/main/patches/current.patch</patchFile>
									<patchTrackingFile>${target}/patches/patches-applied.txt</patchTrackingFile>
								</configuration>
							</execution>
						</executions>
					</plugin>

				</plugins>
			</build>
		</profile>

		<!-- Run integration test sequence. -->
		<profile>
			<id>int</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-invoker-plugin</artifactId>
						<configuration>
							<streamLogs>true</streamLogs>
							<projectsDirectory>${basedir}/../.</projectsDirectory>
							<cloneProjectsTo>${target}/int-work</cloneProjectsTo>
							<invokerPropertiesFile>invoker-${label}-${jdk}.properties</invokerPropertiesFile>
							<pomIncludes>
								<path>barchart-udt-it/pom.xml</path>
							</pomIncludes>
							<goals>
								<!-- goals for nested maven invocation -->
								<goal>clean</goal>
								<goal>install</goal>
							</goals>
						</configuration>
						<executions>
							<execution>
								<id>integration-test</id>
								<phase>integration-test</phase>
								<goals>
									<!-- goals for this maven invocation -->
									<goal>install</goal>
									<goal>run</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>

		<!-- Attach multi arch/os nar artifacts to this jar project. -->
		<profile>
			<id>release-attach</id>
			<properties>
				<!-- -->
				<attachGroupId>${project.groupId}</attachGroupId>
				<attachArtifactId>${project.artifactId}</attachArtifactId>
				<attachVersion>${snapshotVersion}</attachVersion>
				<!-- -->
				<attachFolder>${target}/nar-all</attachFolder>
				<attachPrefix>${project.groupId}-${project.version}</attachPrefix>
			</properties>
			<build>
				<plugins>

					<!-- collect nar artifacts -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-dependency-plugin</artifactId>
						<executions>
							<execution>
								<id>copy-nar-all</id>
								<phase>package</phase>
								<goals>
									<goal>copy</goal>
								</goals>
								<configuration>
									<artifactItems>
										<artifactItem>
											<groupId>${attachGroupId}</groupId>
											<artifactId>${attachArtifactId}</artifactId>
											<version>${attachVersion}</version>
											<classifier>noarch</classifier>
											<type>nar</type>
											<destFileName>${attachPrefix}-noarch.nar</destFileName>
										</artifactItem>
										<artifactItem>
											<groupId>${attachGroupId}</groupId>
											<artifactId>${attachArtifactId}</artifactId>
											<version>${attachVersion}</version>
											<classifier>${arm}</classifier>
											<type>nar</type>
											<destFileName>${attachPrefix}-${arm}.nar</destFileName>
										</artifactItem>
										<artifactItem>
											<groupId>${attachGroupId}</groupId>
											<artifactId>${attachArtifactId}</artifactId>
											<version>${attachVersion}</version>
											<classifier>${lin32}</classifier>
											<type>nar</type>
											<destFileName>${attachPrefix}-${lin32}.nar</destFileName>
										</artifactItem>
										<artifactItem>
											<groupId>${attachGroupId}</groupId>
											<artifactId>${attachArtifactId}</artifactId>
											<version>${attachVersion}</version>
											<classifier>${lin64}</classifier>
											<type>nar</type>
											<destFileName>${attachPrefix}-${lin64}.nar</destFileName>
										</artifactItem>
										<artifactItem>
											<groupId>${attachGroupId}</groupId>
											<artifactId>${attachArtifactId}</artifactId>
											<version>${attachVersion}</version>
											<classifier>${mac32}</classifier>
											<type>nar</type>
											<destFileName>${attachPrefix}-${mac32}.nar</destFileName>
										</artifactItem>
										<artifactItem>
											<groupId>${attachGroupId}</groupId>
											<artifactId>${attachArtifactId}</artifactId>
											<version>${attachVersion}</version>
											<classifier>${mac64}</classifier>
											<type>nar</type>
											<destFileName>${attachPrefix}-${mac64}.nar</destFileName>
										</artifactItem>
										<artifactItem>
											<groupId>${attachGroupId}</groupId>
											<artifactId>${attachArtifactId}</artifactId>
											<version>${attachVersion}</version>
											<classifier>${win32}</classifier>
											<type>nar</type>
											<destFileName>${attachPrefix}-${win32}.nar</destFileName>
										</artifactItem>
										<artifactItem>
											<groupId>${attachGroupId}</groupId>
											<artifactId>${attachArtifactId}</artifactId>
											<version>${attachVersion}</version>
											<classifier>${win64}</classifier>
											<type>nar</type>
											<destFileName>${attachPrefix}-${win64}.nar</destFileName>
										</artifactItem>
									</artifactItems>
									<outputDirectory>${attachFolder}</outputDirectory>
									<overWriteIfNewer>true</overWriteIfNewer>
									<overWriteReleases>true</overWriteReleases>
									<overWriteSnapshots>true</overWriteSnapshots>
								</configuration>
							</execution>
						</executions>
					</plugin>

					<!-- attach nar artifacts -->
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>build-helper-maven-plugin</artifactId>
						<executions>
							<execution>
								<id>attach-nar-all</id>
								<phase>package</phase>
								<goals>
									<goal>attach-artifact</goal>
								</goals>
								<configuration>
									<artifacts>
										<artifact>
											<file>${attachFolder}/${attachPrefix}-noarch.nar</file>
											<classifier>noarch</classifier>
											<type>nar</type>
										</artifact>
										<artifact>
											<file>${attachFolder}/${attachPrefix}-${arm}.nar</file>
											<classifier>${arm}</classifier>
											<type>nar</type>
										</artifact>
										<artifact>
											<file>${attachFolder}/${attachPrefix}-${lin32}.nar</file>
											<classifier>${lin32}</classifier>
											<type>nar</type>
										</artifact>
										<artifact>
											<file>${attachFolder}/${attachPrefix}-${lin64}.nar</file>
											<classifier>${lin64}</classifier>
											<type>nar</type>
										</artifact>
										<artifact>
											<file>${attachFolder}/${attachPrefix}-${mac32}.nar</file>
											<classifier>${mac32}</classifier>
											<type>nar</type>
										</artifact>
										<artifact>
											<file>${attachFolder}/${attachPrefix}-${mac64}.nar</file>
											<classifier>${mac64}</classifier>
											<type>nar</type>
										</artifact>
										<artifact>
											<file>${attachFolder}/${attachPrefix}-${win32}.nar</file>
											<classifier>${win32}</classifier>
											<type>nar</type>
										</artifact>
										<artifact>
											<file>${attachFolder}/${attachPrefix}-${win64}.nar</file>
											<classifier>${win64}</classifier>
											<type>nar</type>
										</artifact>
									</artifacts>
								</configuration>
							</execution>
						</executions>
					</plugin>

				</plugins>
			</build>
		</profile>

		<!-- Collect windows 32 dependencies. -->
		<profile>
			<id>nar_x86-Windows-gpp_dependencies</id>
			<activation>
				<os>
					<arch>x86</arch>
					<family>windows</family>
				</os>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-resources-plugin</artifactId>
						<executions>
							<execution>
								<id>copy-deps-libs_x86-Windows-gpp</id>
								<phase>generate-resources</phase>
								<goals>
									<goal>copy-resources</goal>
								</goals>
								<configuration>
									<overwrite>true</overwrite>
									<resources>
										<resource>
											<directory>c:/tdm-gcc/bin</directory>
											<filtering>false</filtering>
											<includes>
												<include>libgcc_s_sjlj-1.dll</include>
												<include>libstdc++-6.dll</include>
											</includes>
										</resource>
									</resources>
									<outputDirectory>${basedir}/src/nar/resources/aol/x86-Windows-gpp/lib</outputDirectory>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>

		<!-- Collect windows 64 dependencies. -->
		<profile>
			<id>nar_amd64-Windows-gpp_dependencies</id>
			<activation>
				<os>
					<arch>amd64</arch>
					<family>windows</family>
				</os>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-resources-plugin</artifactId>
						<executions>
							<execution>
								<id>copy-deps-libs_amd64-Windows-gpp</id>
								<phase>generate-resources</phase>
								<goals>
									<goal>copy-resources</goal>
								</goals>
								<configuration>
									<overwrite>true</overwrite>
									<resources>
										<resource>
											<directory>c:/tdm-gcc/bin</directory>
											<filtering>false</filtering>
											<includes>
												<include>libgcc_s_sjlj_64-1.dll</include>
												<include>libstdc++_64-6.dll</include>
											</includes>
										</resource>
									</resources>
									<outputDirectory>${basedir}/src/nar/resources/aol/amd64-Windows-gpp/lib</outputDirectory>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>

		<!-- Native build invocation. -->
		<profile>
			<id>nar</id>
			<build>
				<plugins>

					<!-- disable most nar "smart options processing" and use explicit aol.properties 
						instead -->
					<plugin>
						<groupId>${narPluginGroupId}</groupId>
						<artifactId>${narPluginArtifactId}</artifactId>
						<extensions>true</extensions>
						<configuration>
							<!-- place nar artifacts into test classpath for unit tests; will 
								also use for jar/nar packaging -->
							<targetDirectory>${target}/test-classes</targetDirectory>
							<libraries>
								<library>
									<type>jni</type>
									<linkCPP>false</linkCPP>
									<narSystemPackage>com.barchart.udt</narSystemPackage>
								</library>
							</libraries>
							<cpp>

								<debug>false</debug>
								<optimize>none</optimize>
								<exceptions>true</exceptions>
								<multiThreaded>true</multiThreaded>

								<clearDefaultOptions>false</clearDefaultOptions>
								<clearDefaultDefines>false</clearDefaultDefines>
								<clearDefaultUndefines>false</clearDefaultUndefines>
								<options>
									<!--these options are ignored by overriding profiles -->
								</options>

								<!-- source *.h and *.cpp root folder -->
								<sourceDirectory>${nativeSrc}</sourceDirectory>

								<!-- source *.cpp patterns -->
								<includes>
									<pattern>${folderJNI}/*.cpp</pattern>
									<pattern>${folderUDT}/src/*.cpp</pattern>
								</includes>

								<!-- source *.h folders -->
								<includePaths>
									<path>${nativeSrcJNI}</path>
									<path>${nativeSrcUDT}/src</path>
								</includePaths>

							</cpp>
							<java>
								<include>true</include>
							</java>
							<javah>
								<jniDirectory>${nativeSrcJNI}</jniDirectory>
							</javah>
							<linker>
								<map>false</map>
								<clearDefaultOptions>false</clearDefaultOptions>
								<options>
									<!--these options are ignored by overriding profiles -->
								</options>
							</linker>
						</configuration>
						<executions>
							<execution>
								<goals>
									<goal>nar-resources</goal>
									<goal>nar-javah</goal>
									<goal>nar-compile</goal>
									<goal>nar-package</goal>
								</goals>
							</execution>
						</executions>
					</plugin>

				</plugins>
			</build>
		</profile>

		<!-- TODO native build invocation for applications -->
		<profile>
			<id>nar-app</id>
			<build>
				<plugins>

					<plugin>
						<groupId>${narPluginGroupId}</groupId>
						<artifactId>${narPluginArtifactId}</artifactId>
						<extensions>true</extensions>
						<configuration>
							<targetDirectory>${target}/nar-app</targetDirectory>
							<libraries>
								<library>
									<type>executable</type>
								</library>
							</libraries>
							<cpp>
								<!-- use aol.properties -->
								<sourceDirectory>${nativeSrc}</sourceDirectory>
								<includePaths>
									<path>${nativeSrcUDT}/src</path>
									<path>${nativeSrcUDT}/app</path>
								</includePaths>
							</cpp>
							<linker>
								<!-- ignore aol.properties -->
								<clearDefaultOptions>true</clearDefaultOptions>
								<name>g++</name>
								<optionSet>-shared-libgcc -fPIC -fexceptions</optionSet>
								<sysLibSet>stdc++,pthread</sysLibSet>
							</linker>
						</configuration>
						<executions>
							<execution>
								<id>appserver</id>
								<phase>validate</phase>
								<goals>
									<goal>nar-compile</goal>
									<goal>nar-package</goal>
								</goals>
								<configuration>
									<output>appserver</output>
									<cpp>
										<includes>
											<pattern>${folderUDT}/src/*.cpp</pattern>
											<pattern>${folderUDT}/app/appserver.cpp</pattern>
										</includes>
									</cpp>
								</configuration>
							</execution>
						</executions>
					</plugin>

				</plugins>
			</build>
		</profile>

		<!-- Apply default source formatting. -->
		<profile>
			<id>format-source</id>
			<build>
				<plugins>
					<plugin>
						<groupId>com.googlecode.maven-java-formatter-plugin</groupId>
						<artifactId>maven-java-formatter-plugin</artifactId>
						<version>0.3.1</version>
						<executions>
							<execution>
								<id>format-java</id>
								<phase>process-sources</phase>
								<goals>
									<goal>format</goal>
								</goals>
								<configuration>
									<compilerSource>${projectJavaVersion}</compilerSource>
									<compilerCompliance>${projectJavaVersion}</compilerCompliance>
									<compilerTargetPlatform>${projectJavaVersion}</compilerTargetPlatform>
									<configFile>${basedir}/build/jdt/eclipse-format.xml</configFile>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>

		<!-- Publish maven site to github. -->
		<profile>
			<id>website</id>
			<build>
				<plugins>
					<plugin>
						<groupId>com.github.github</groupId>
						<artifactId>site-maven-plugin</artifactId>
						<version>0.7</version>
						<executions>
							<execution>
								<id>maven-site</id>
								<phase>site</phase>
								<goals>
									<goal>site</goal>
								</goals>
								<configuration>
									<merge>true</merge>
									<server>github</server>
									<path>site/${project.artifactId}</path>
									<message>site ${project.artifactId}-${project.version}</message>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>

		<!-- Produce diff between git repo and udt repo. -->
		<profile>
			<id>difference</id>
			<build>

				<plugins>

					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-scm-plugin</artifactId>
						<configuration>
							<connectionType>connection</connectionType>
							<connectionUrl>${connectionUDT}</connectionUrl>
							<checkoutDirectory>${checkoutUDT}</checkoutDirectory>
						</configuration>
						<executions>
							<execution>
								<id>checkout-udt-sources-from-csv</id>
								<phase>generate-sources</phase>
								<goals>
									<goal>checkout</goal>
								</goals>
							</execution>
						</executions>
					</plugin>

					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-antrun-plugin</artifactId>
						<executions>
							<execution>
								<id>produce-diff</id>
								<phase>generate-sources</phase>
								<configuration>
									<target>
										<exec executable="git" output="src/main/patches/${moduleUDT}/result.patch" error="target/result.patch.error">
											<arg value="diff" />
											<arg value="--no-index" />
											<arg value="--no-prefix" />
											<arg value="${checkoutUDT}/${moduleUDT}/src" />
											<arg value="${nativeSrcUDT}/src" />
										</exec>
									</target>
								</configuration>
								<goals>
									<goal>run</goal>
								</goals>
							</execution>
						</executions>
					</plugin>

				</plugins>
			</build>
		</profile>

	</profiles>

</project>
