<?xml version="1.0" encoding="UTF-8"?>
<!--
 - Copyright (c) 2008, 2013 Sonatype Inc. and others.
 - All rights reserved. This program and the accompanying materials
 - are made available under the terms of the Eclipse Public License v1.0
 - which accompanies this distribution, and is available at
 - http://www.eclipse.org/legal/epl-v10.html
 -
 - Contributors:
 -    Sonatype Inc. - initial API and implementation
 -->

<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>

	<inceptionYear>2008</inceptionYear>
	<url>http://www.eclipse.org/tycho/</url>
	<ciManagement>
	  <system>hudson</system>
	  <url>https://hudson.eclipse.org/hudson</url>
	</ciManagement>
	<licenses>
	  <license>
	    <name>Eclipse Public License</name>
	    <url>http://www.eclipse.org/legal/epl-v10.html</url>
	    <distribution>repo</distribution>
	  </license>
	</licenses>
	<organization>
	  <name>Eclipse Foundation</name>
	  <url>http://www.eclipse.org/</url>
	</organization>
	<issueManagement>
	  <system>Bugzilla</system>
	  <url>https://bugs.eclipse.org/bugs/buglist.cgi?product=Tycho</url>
	</issueManagement>
	<scm>
	  <connection>scm:git:http://git.eclipse.org/gitroot/tycho/org.eclipse.tycho.git</connection>
	  <developerConnection>scm:git:ssh://git.eclipse.org/gitroot/tycho/org.eclipse.tycho.git</developerConnection>
	  <url>http://git.eclipse.org/c/tycho/org.eclipse.tycho.git</url>
	</scm>
	<developers>
		<developer>
			<name>Igor Fedorenko</name>
			<organization>Sonatype</organization>
			<organizationUrl>http://www.sonatype.com</organizationUrl>
		</developer>
		<developer>
			<name>Tobias Oberlies</name>
			<organization>SAP</organization>
			<organizationUrl>http://www.sap.com</organizationUrl>
		</developer>
		<developer>
			<name>Jan Sievers</name>
			<organization>SAP</organization>
			<organizationUrl>http://www.sap.com</organizationUrl>
		</developer>
	</developers>
	<prerequisites>
		<maven>3.0</maven>
	</prerequisites>

	<groupId>org.eclipse.tycho</groupId>
	<artifactId>tycho</artifactId>
	<version>0.20.0</version>
	<packaging>pom</packaging>

	<name>Tycho (Incubation)</name>
	<description>Tycho integrates Maven with Eclipse and OSGi</description>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

		<!-- copy&paste from maven/pom.xml file. I wish import scope worked in 3.0 -->
		<classWorldsVersion>2.2.3</classWorldsVersion>
		<commonsCliVersion>1.2</commonsCliVersion>
		<easyMockVersion>1.2_Java1.3</easyMockVersion>
		<junitVersion>3.8.2</junitVersion>
		<plexusVersion>1.5.5</plexusVersion>
		<plexusInterpolationVersion>1.14</plexusInterpolationVersion>
		<plexusUtilsVersion>3.0.7</plexusUtilsVersion>
		<wagonVersion>1.0-beta-6</wagonVersion>
		<securityDispatcherVersion>1.3</securityDispatcherVersion>
		<cipherVersion>1.7</cipherVersion>
		<modelloVersion>1.4</modelloVersion>
		<jxpathVersion>1.3</jxpathVersion>

		<maven-version>3.0</maven-version>

		<!-- 
            This is total pain in the neck, but I can't find a better/easier way to satisfy Maven Central guards, 
            so updating Tycho Eclipse dependencies is quite cumbersome.

            1. Unzip desired version of Eclipse SDK to /tmp, you should see equinox and jdt bundles under /tmp/eclipse/plugins folder.

            2. Update equinox and jdt/apt versions in 4 (FOUR!!!) places
            2a. EQUINOX_VERSION, JDT_VERSION, JDT_APT_VERSION shell copy&paste source below
            2b. <equinoxVersion/>, <jdtVersion/>, <jdtAptVersion/> pom properties below
            2c. src/dependencies/org.eclipse.osgi.pom (equinox version only)
            2d. src/dependencies/org.eclipse.jdt.core.pom (jdt version only)
            2e. src/dependencies/org.eclipse.jdt.compiler.apt.pom (jdt.compiler.apt version only)

            3. Execute the following shell copy&paste snippets to install and/or deploy Tycho Eclipse dependencies
               These snippets MUST be executed from src/dependencies directory
            3a. To deploy to oss.sonatype.org you need to setup gpg keys as explained in 
                https://docs.sonatype.org/display/Repository/How+To+Generate+PGP+Signatures+With+Maven

            4. Close and release staged artifacts into repository 'Releases'

# Versions correspond to the Eclipse Kepler
EQUINOX_VERSION=3.9.1.v20130814-1242
JDT_VERSION=3.9.1.v20130905-0837
JDT_APT_VERSION=1.0.600.v20130530-1010

# Location of unpacked Eclipse SDK
PLUGINS=/tmp/eclipse/plugins

# install command
CMD="mvn install:install-file -Dpackaging=jar"

# deploy command
CMD="mvn gpg:sign-and-deploy-file -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ -DrepositoryId=forge-releases"

# equinox
$CMD -DpomFile=org.eclipse.osgi.pom \
  -Dfile=$PLUGINS/org.eclipse.osgi_$EQUINOX_VERSION.jar \
  -Dsources=$PLUGINS/org.eclipse.osgi.source_$EQUINOX_VERSION.jar

#  jdt
$CMD -DpomFile=org.eclipse.jdt.core.pom \
  -Dfile=$PLUGINS/org.eclipse.jdt.core_$JDT_VERSION.jar \
  -Dsources=$PLUGINS/org.eclipse.jdt.core.source_$JDT_VERSION.jar

#  jdt.apt
$CMD -DpomFile=org.eclipse.jdt.compiler.apt.pom \
  -Dfile=$PLUGINS/org.eclipse.jdt.compiler.apt_$JDT_APT_VERSION.jar \
  -Dsources=$PLUGINS/org.eclipse.jdt.compiler.apt.source_$JDT_APT_VERSION.jar
		 -->

		<equinoxVersion>3.9.1.v20130814-1242</equinoxVersion>
		<jdtVersion>3.9.1.v20130905-0837</jdtVersion>
		<jdtAptVersion>1.0.600.v20130530-1010</jdtAptVersion>

		<!-- version of tycho used by this build -->
		<tychoBootstrapVersion>0.18.1</tychoBootstrapVersion>

	</properties>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.apache.maven</groupId>
				<artifactId>maven-plugin-api</artifactId>
				<version>${maven-version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.maven</groupId>
				<artifactId>maven-core</artifactId>
				<version>${maven-version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.maven</groupId>
				<artifactId>maven-compat</artifactId>
				<version>${maven-version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.maven</groupId>
				<artifactId>maven-model</artifactId>
				<version>${maven-version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.maven</groupId>
				<artifactId>maven-settings</artifactId>
				<version>${maven-version}</version>
			</dependency>
			<dependency>
				<groupId>org.sonatype.plexus</groupId>
				<artifactId>plexus-cipher</artifactId>
				<version>${cipherVersion}</version>
			</dependency>
			<dependency>
				<groupId>org.codehaus.plexus</groupId>
				<artifactId>plexus-component-annotations</artifactId>
				<version>${plexusVersion}</version>
			</dependency>
			<dependency>
				<groupId>org.codehaus.plexus</groupId>
				<artifactId>plexus-container-default</artifactId>
				<version>${plexusVersion}</version>
				<!-- classes from plexus-container-default come with the maven installation -->
				<!-- BUT groupId/artifactId was changed from 
				       plexus-container-default (maven 2.0.x) 
				       sisu-inject-plexus (maven 3.0.x) 
				       org.eclipse.sisu.plexus (maven 3.1.x)
				     so we use oldest version with scope provided to stay compatible and make sure 
				     we don't have a conflicting injection container at runtime -->
				<scope>provided</scope>
			</dependency>
			<dependency>
				<groupId>org.codehaus.plexus</groupId>
				<artifactId>plexus-utils</artifactId>
				<version>${plexusUtilsVersion}</version>
			</dependency>
			<dependency>
				<groupId>org.codehaus.plexus</groupId>
				<artifactId>plexus-io</artifactId>
				<version>2.0.5</version>
			</dependency>
			<dependency>
				<groupId>org.codehaus.plexus</groupId>
				<artifactId>plexus-archiver</artifactId>
				<version>2.2</version>
				<exclusions>
					<exclusion>
						<groupId>org.codehaus.plexus</groupId>
						<artifactId>plexus-component-api</artifactId>
					</exclusion>
					<exclusion>
						<groupId>org.codehaus.plexus</groupId>
						<artifactId>plexus-container-default</artifactId>
					</exclusion>
				</exclusions>
			</dependency>
			<dependency>
				<groupId>org.codehaus.plexus</groupId>
				<artifactId>plexus-compiler-api</artifactId>
				<version>2.2</version>
			</dependency>
			<dependency>
				<groupId>org.codehaus.plexus</groupId>
				<artifactId>plexus-compiler-manager</artifactId>
				<version>2.2</version>
			</dependency>
			<dependency>
				<groupId>org.eclipse.tycho</groupId>
				<artifactId>org.eclipse.osgi</artifactId>
				<version>${equinoxVersion}</version>
			</dependency>
			<dependency>
				<groupId>org.eclipse.tycho</groupId>
				<artifactId>org.eclipse.jdt.core</artifactId>
				<version>${jdtVersion}</version>
			</dependency>
			<dependency>
				<groupId>org.eclipse.tycho</groupId>
				<artifactId>org.eclipse.jdt.compiler.apt</artifactId>
				<version>${jdtAptVersion}</version>
			</dependency>			                        
			<dependency>
				<groupId>org.apache.maven.surefire</groupId>
				<artifactId>surefire-booter</artifactId>
				<version>2.10</version>
			</dependency>
			<dependency>
				<groupId>junit</groupId>
				<artifactId>junit</artifactId>
				<version>4.11</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>de.pdark</groupId>
				<artifactId>decentxml</artifactId>
				<version>1.3</version>
			</dependency>
			<dependency>
				<groupId>bcel</groupId>
				<artifactId>bcel</artifactId>
				<version>5.1</version>
			</dependency>
			<dependency>
				<groupId>org.apache.maven.plugin-testing</groupId>
				<artifactId>maven-plugin-testing-harness</artifactId>
				<version>2.1</version>
                <exclusions>
                  <exclusion>
                    <artifactId>maven-aether-provider</artifactId>
                    <groupId>org.apache.maven</groupId>
                  </exclusion>
                  <exclusion>
                    <artifactId>maven-core</artifactId>
                    <groupId>org.apache.maven</groupId>
                  </exclusion>
                  <exclusion>
                    <artifactId>plexus-utils</artifactId>
                    <groupId>org.codehaus.plexus</groupId>
                  </exclusion>
                  <exclusion>
                    <artifactId>maven-model</artifactId>
                    <groupId>org.apache.maven</groupId>
                  </exclusion>
                  <exclusion>
                    <artifactId>maven-plugin-api</artifactId>
                    <groupId>org.apache.maven</groupId>
                  </exclusion>
                  <exclusion>
                    <artifactId>plexus-archiver</artifactId>
                    <groupId>org.codehaus.plexus</groupId>
                  </exclusion>
                  <exclusion>
                    <artifactId>maven-compat</artifactId>
                    <groupId>org.apache.maven</groupId>
                  </exclusion>
                </exclusions>
			</dependency>
			<dependency>
				<groupId>org.apache.maven</groupId>
				<artifactId>maven-archiver</artifactId>
				<version>2.5</version>
				<exclusions>
					<exclusion>
						<groupId>org.apache.maven</groupId>
						<artifactId>maven-artifact</artifactId>
					</exclusion>
					<exclusion>
						<groupId>org.apache.maven</groupId>
						<artifactId>maven-model</artifactId>
					</exclusion>
					<exclusion>
						<groupId>org.apache.maven</groupId>
						<artifactId>maven-project</artifactId>
					</exclusion>
				</exclusions>
			</dependency>
			<dependency>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<type>maven-plugin</type>
				<version>2.1</version>
			</dependency>
            <dependency>
                <groupId>org.apache.maven.shared</groupId>
                <artifactId>maven-verifier</artifactId>
                <version>1.3</version>
            </dependency>
		</dependencies>
	</dependencyManagement>

	<build>

		<plugins>
			<plugin>
				<artifactId>maven-source-plugin</artifactId>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>jar-no-fork</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.eclipse.tycho</groupId>
				<artifactId>tycho-maven-plugin</artifactId>
				<version>${tychoBootstrapVersion}</version>
				<extensions>true</extensions>
			</plugin>

			<plugin>
				<groupId>org.eclipse.tycho</groupId>
				<artifactId>target-platform-configuration</artifactId>
				<version>${tychoBootstrapVersion}</version>
				<configuration>
					<resolver>p2</resolver>
				</configuration>
			</plugin>
		</plugins>

		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.codehaus.plexus</groupId>
					<artifactId>plexus-component-metadata</artifactId>
					<version>${plexusVersion}</version>
					<executions>
						<execution>
							<goals>
								<goal>generate-metadata</goal>
								<goal>generate-test-metadata</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>2.10</version>
				</plugin>
				<plugin>
				    <groupId>org.apache.maven.plugins</groupId>
				    <artifactId>maven-clean-plugin</artifactId>
				    <version>2.4.1</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>2.1</version>
					<configuration>
						<source>1.5</source>
						<target>1.5</target>
					</configuration>
				</plugin>
				<plugin>
				    <groupId>org.apache.maven.plugins</groupId>
				    <artifactId>maven-jar-plugin</artifactId>
				    <version>2.2</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-release-plugin</artifactId>
					<version>2.0-beta-7</version>
					<configuration>
						<tagBase>https://svn.sonatype.org/m2eclipse/tycho/tags</tagBase>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-assembly-plugin</artifactId>
					<version>2.2-beta-2</version>
					<configuration>
						<tarLongFileMode>gnu</tarLongFileMode>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-dependency-plugin</artifactId>
					<version>2.1</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-resources-plugin</artifactId>
					<version>2.4.3</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-source-plugin</artifactId>
					<version>2.1.2</version>
				</plugin>
				<plugin>
					<groupId>org.apache.felix</groupId>
					<artifactId>maven-bundle-plugin</artifactId>
					<version>2.0.1</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-install-plugin</artifactId>
					<version>2.3.1</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-site-plugin</artifactId>
					<version>3.0</version>
					<configuration>
					    <relativizeDecorationLinks>false</relativizeDecorationLinks>
						<reportPlugins>
							<plugin>
								<groupId>org.apache.maven.plugins</groupId>
								<artifactId>maven-plugin-plugin</artifactId>
								<version>2.9</version>
								<configuration>
									<requirements>
									  <maven>${maven-version}</maven>
									</requirements>								
								</configuration>
							</plugin>
							<plugin>
								<groupId>org.apache.maven.plugins</groupId>
								<artifactId>maven-project-info-reports-plugin</artifactId>
								<version>2.4</version>
								<reportSets>
									<reportSet>
										<reports>
											<report>index</report>
										</reports>
									</reportSet>
								</reportSets>
							</plugin>
						</reportPlugins>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>
	<modules>
		<module>tycho-bundles</module>

		<module>sisu-equinox</module>

		<module>tycho-metadata-model</module>
		<module>tycho-embedder-api</module>
		<module>tycho-core</module>
		<module>tycho-testing-harness</module>
		<module>tycho-compiler-jdt</module>
		<module>tycho-compiler-plugin</module>
		<module>tycho-packaging-plugin</module>
		<module>tycho-source-plugin</module>
		<module>target-platform-configuration</module>
		<module>tycho-maven-plugin</module>
		<module>tycho-pomgenerator-plugin</module>

		<!-- surefire -->
		<module>tycho-surefire</module>

		<!-- release -->
		<module>tycho-release</module>

		<!-- tycho-p2 -->
		<module>tycho-p2</module>
		<module>tycho-artifactcomparator</module>
	</modules>

	<profiles>
		<profile>
			<id>its</id>
			<modules>
				<module>tycho-its</module>
			</modules>
		</profile>
		<profile>
			<id>coverage</id>
			<properties>
				<!-- Override to absolute location from command-line on CI to get a single file -->
				<sonar.jacoco.reportPath>${project.build.directory}/jacoco.exec</sonar.jacoco.reportPath>
			</properties>
			<build>
				<plugins>
					<plugin>
						<groupId>org.jacoco</groupId>
						<artifactId>jacoco-maven-plugin</artifactId>
						<version>0.6.3.201306030806</version>
						<executions>
							<execution>
								<goals>
									<goal>prepare-agent</goal>
								</goals>
								<configuration>
									<destFile>${sonar.jacoco.reportPath}</destFile>
									<append>true</append>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	<profile>
		<id>release</id>
		<build>
			<plugins>
				<plugin>
					<!-- see https://docs.sonatype.org/display/Repository/How+To+Generate+PGP+Signatures+With+Maven -->
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-gpg-plugin</artifactId>
					<version>1.4</version>
					<executions>
						<execution>
							<id>sign-artifacts</id>
							<phase>verify</phase>
							<goals>
								<goal>sign</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>2.8.1</version>
					<executions>
						<execution>
							<id>javadoc-jar</id>
							<goals>
								<goal>jar</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
			</plugins>
		</build>
	</profile>
	</profiles>

	<!--need this to make site:stage happy -->
	<distributionManagement>
		<site>
			<id>tycho.site</id>
			<name>Tycho Site</name>
			<url>staging</url>
		</site>
        <repository>
            <id>${forgeReleaseId}</id>
            <url>${forgeReleaseUrl}</url>
        </repository>
        <snapshotRepository>
            <id>${forgeSnapshotId}</id>
            <url>${forgeSnapshotUrl}</url>
        </snapshotRepository>
  	</distributionManagement>

<!--
    <repositories>
        <repository>
            <id>staging</id>
            <url>https://oss.sonatype.org/content/groups/staging</url>
        </repository>
    </repositories>
-->
</project>
