<?xml version="1.0" encoding="UTF-8"?>
<!--
 - Copyright (c) 2008, 2020 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>jenkins</system>
		<url>https://ci.eclipse.org/tycho</url>
	</ciManagement>
	<licenses>
		<license>
			<name>Eclipse Public License</name>
			<url>http://www.eclipse.org/legal/epl-v20.html</url>
			<distribution>repo</distribution>
		</license>
	</licenses>
	<organization>
		<name>Eclipse Foundation</name>
		<url>http://www.eclipse.org/</url>
	</organization>
	<issueManagement>
		<system>GitHub</system>
		<url>https://github.com/eclipse/tycho/issues</url>
	</issueManagement>
	<scm>
		<connection>scm:git:https://github.com/eclipse/tycho.git</connection>
		<developerConnection>scm:git:ssh://git.eclipse.org/gitroot/tycho/org.eclipse.tycho.git</developerConnection>
		<url>https://github.com/eclipse/tycho/</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.6.3</maven>
	</prerequisites>

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

	<name>Tycho</name>
	<description>Tycho integrates Maven with Eclipse and OSGi</description>
	
 	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<min.jdk.version>11</min.jdk.version>

		<!-- copy&paste from maven/pom.xml file. I wish import scope worked in 3.0 -->
		<classWorldsVersion>2.2.3</classWorldsVersion>
		<commonsCliVersion>1.2</commonsCliVersion>
		<commonsCompressVersion>1.21</commonsCompressVersion>
		<plexusVersion>2.1.0</plexusVersion>
		<plexusUtilsVersion>3.3.0</plexusUtilsVersion>
		<cipherVersion>2.0</cipherVersion>
		<modelloVersion>1.4</modelloVersion>
		<jxpathVersion>1.3</jxpathVersion>
		<pluginToolsVersion>3.6.1</pluginToolsVersion>
		<maven-version>3.8.2</maven-version>
		<!-- NOTE: when updating surefire version, double-check Import-Package statements generated by bnd-maven-plugin and possibly adapt instructions in various bnd.bnd files -->
		<surefire-version>2.22.2</surefire-version>

		<equinoxVersion>3.17.0</equinoxVersion>
		<ecjVersion>3.27.0</ecjVersion>

		<!-- version of Tycho used by this build -->
		<tychoBootstrapVersion>2.4.0</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.plugin-tools</groupId>
				<artifactId>maven-plugin-annotations</artifactId>
				<version>${pluginToolsVersion}</version>
				<scope>provided</scope>
			</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.codehaus.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.eclipse.sisu</groupId>
				<artifactId>org.eclipse.sisu.plexus</artifactId>
				<version>0.3.5</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)
				     by using org.eclipse.sisu.plexus we effectively require maven 3.1.x as min version at runitme-->
				<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>3.2.0</version>
			</dependency>
			<dependency>
				<groupId>org.codehaus.plexus</groupId>
				<artifactId>plexus-archiver</artifactId>
				<version>4.2.2</version>
			</dependency>
			<dependency>
				<groupId>org.codehaus.plexus</groupId>
				<artifactId>plexus-compiler-api</artifactId>
				<version>2.8.8</version>
			</dependency>
			<dependency>
				<groupId>org.codehaus.plexus</groupId>
				<artifactId>plexus-compiler-manager</artifactId>
				<version>2.8.8</version>
			</dependency>
			<dependency>
				<groupId>org.apache.commons</groupId>
				<artifactId>commons-compress</artifactId>
				<version>${commonsCompressVersion}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.commons</groupId>
				<artifactId>commons-compress</artifactId>
				<classifier>sources</classifier>
				<version>${commonsCompressVersion}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.commons</groupId>
				<artifactId>commons-exec</artifactId>
				<version>1.3</version>
			</dependency>
			<dependency>
				<groupId>org.eclipse.platform</groupId>
				<artifactId>org.eclipse.osgi</artifactId>
				<version>${equinoxVersion}</version>
			</dependency>
			<dependency>
				<groupId>org.eclipse.jdt</groupId>
				<artifactId>ecj</artifactId>
				<version>${ecjVersion}</version>
			</dependency>
			<dependency>
				<groupId>org.eclipse.tycho</groupId>
				<artifactId>tycho-testing-harness</artifactId>
				<version>${project.version}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>junit</groupId>
				<artifactId>junit</artifactId>
				<version>4.13.2</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.junit.jupiter</groupId>
				<artifactId>junit-jupiter-api</artifactId>
				<version>5.7.2</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.mockito</groupId>
				<artifactId>mockito-core</artifactId>
				<version>3.12.4</version>
				<scope>test</scope>
			</dependency>
			<dependency>
			<!-- manage explicitly because junit and mockito pull in different versions -->
				<groupId>org.hamcrest</groupId>
				<artifactId>hamcrest-core</artifactId>
				<version>2.2</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>de.pdark</groupId>
				<artifactId>decentxml</artifactId>
				<version>1.4</version>
			</dependency>
			<dependency>
				<groupId>org.apache.bcel</groupId>
				<artifactId>bcel</artifactId>
				<version>6.5.0</version>
			</dependency>
			<dependency>
				<groupId>org.apache.maven.plugin-testing</groupId>
				<artifactId>maven-plugin-testing-harness</artifactId>
				<version>3.3.0</version>
			</dependency>
			<dependency>
				<groupId>org.apache.maven</groupId>
				<artifactId>maven-archiver</artifactId>
				<version>3.5.0</version>
			</dependency>
			<dependency>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<type>maven-plugin</type>
				<version>3.2.1</version>
			</dependency>
			<dependency>
				<groupId>org.apache.maven.shared</groupId>
				<artifactId>maven-verifier</artifactId>
				<version>1.7.2</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-plugin-plugin</artifactId>
					<version>${pluginToolsVersion}</version>
					<!-- workaround for http://jira.codehaus.org/browse/MNG-5346 -->
					<configuration>
						<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
						<extractors>
							<extractor>java-annotations</extractor>
						</extractors>
					</configuration>
					<executions>
						<execution>
							<id>default-descriptor</id>
							<goals>
								<goal>descriptor</goal>
							</goals>
							<phase>process-classes</phase>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>3.0.0-M5</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-clean-plugin</artifactId>
					<version>3.1.0</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-deploy-plugin</artifactId>
					<version>2.8.2</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.8.1</version>
					<configuration>
						<source>${min.jdk.version}</source>
						<target>${min.jdk.version}</target>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-jar-plugin</artifactId>
					<version>3.2.0</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-release-plugin</artifactId>
					<version>2.5.3</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>3.3.0</version>
					<configuration>
						<tarLongFileMode>gnu</tarLongFileMode>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-dependency-plugin</artifactId>
					<version>3.1.2</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-resources-plugin</artifactId>
					<version>3.2.0</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-source-plugin</artifactId>
					<version>3.2.1</version>
				</plugin>
				<plugin>
					<groupId>org.apache.felix</groupId>
					<artifactId>maven-bundle-plugin</artifactId>
					<version>5.1.1</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-install-plugin</artifactId>
					<version>2.5.2</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-site-plugin</artifactId>
					<version>3.9.1</version>
					<dependencies>
						<dependency>
							<groupId>org.apache.maven.doxia</groupId>
							<artifactId>doxia-module-markdown</artifactId>
							<version>1.9.1</version>
						</dependency>
					</dependencies>
					<configuration>
						<relativizeDecorationLinks>false</relativizeDecorationLinks>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-plugin-plugin</artifactId>
        <version>${pluginToolsVersion}</version>
        <configuration>
          <requirements>
            <maven>${maven-version}</maven>
            <jdk>${min.jdk.version}</jdk>
          </requirements>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>3.1.1</version>
        <reportSets>
          <reportSet>
            <reports>
              <report>index</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
    </plugins>
  </reporting>

	<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-lib-detector</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>

		<module>tycho-extras</module>
	</modules>

	<profiles>
		<profile>
			<id>its</id>
			<modules>
				<module>tycho-its</module>
			</modules>
		</profile>
		<profile>
			<id>releng</id>
			<modules>
				<module>tycho-releng</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.8.7</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>3.0.1</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>3.2.0</version>
						<configuration>
							<failOnError>false</failOnError>
						</configuration>
						<executions>
							<execution>
								<id>javadoc-jar</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

	<distributionManagement>
		<site>
			<id>tycho.site</id>
			<name>Tycho Site</name>
			<!-- >workaround for http://jira.codehaus.org/browse/MSITE-671 -->
			<url>http://staging</url>
		</site>
		<repository>
			<id>${forgeReleaseId}</id>
			<url>${forgeReleaseUrl}</url>
		</repository>
		<snapshotRepository>
			<id>${forgeSnapshotId}</id>
			<url>${forgeSnapshotUrl}</url>
		</snapshotRepository>
	</distributionManagement>

</project>
