<?xml version="1.0" encoding="UTF-8"?>

<!-- Common Maven parent for p2 mirror operations. - R. Mischke, Oct 2015 -->

<project
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
	xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<modelVersion>4.0.0</modelVersion>

	<groupId>de.rcenvironment.thirdparty</groupId>
	<artifactId>p2-mirror-parent</artifactId>
	<version>1.0.0</version>
	<packaging>pom</packaging>

	<properties>
		<tycho.version>0.23.1</tycho.version>
	</properties>

	<build>
		<!-- Note: The target directory is intentionally not cleaned on every run 
			as mirroring puts non-trivial load on the remote server. In those cases where 
			you want to start from scratch, delete the mirror folder manually. - misc_ro -->
		<plugins>
			<plugin>
				<groupId>org.eclipse.tycho.extras</groupId>
				<artifactId>tycho-p2-extras-plugin</artifactId>
				<version>${tycho.version}</version>
				<configuration>
					<source>
						<repository>
							<url>${mirror.sourceUrl}</url>
						</repository>
					</source>
					<!-- <latestVersionOnly>true</latestVersionOnly> -->
					<includeOptional>false</includeOptional>
					<destination>${mirror.outputDir}</destination>
					<includePacked>false</includePacked>
				</configuration>
				<executions>
					<!-- starting with RCE 8.1.0, we only support 64 bit builds -->
					<execution>
						<id>mirror-linux-x64</id>
						<phase>process-resources</phase>
						<goals>
							<goal>mirror</goal>
						</goals>
						<configuration>
							<filter>
								<osgi.os>linux</osgi.os>
								<osgi.ws>gtk</osgi.ws>
								<osgi.arch>x86_64</osgi.arch>
							</filter>
						</configuration>
					</execution>
					<execution>
						<id>mirror-win32-x64</id>
						<phase>process-resources</phase>
						<goals>
							<goal>mirror</goal>
						</goals>
						<configuration>
							<filter>
								<osgi.os>win32</osgi.os>
								<osgi.ws>win32</osgi.ws>
								<osgi.arch>x86_64</osgi.arch>
							</filter>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

</project>
