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

	<groupId>org.springframework.tooling</groupId>
	<artifactId>jdt-ls-extension-parent</artifactId>
	<packaging>pom</packaging>
	<version>0.0.1-SNAPSHOT</version>
	<name>jdt-ls-extension-parent</name>

	<organization>
		<name>Pivotal Software, Inc.</name>
		<url>https://spring.io</url>
	</organization>
	<url>https://spring.io/tools</url>
	<inceptionYear>2007</inceptionYear>

	<licenses>
		<license>
			<name>Eclipse Public License v1.0</name>
			<url>https://www.eclipse.org/legal/epl-v10.html</url>
		</license>
	</licenses>

	<scm>
		<connection>https://github.com/spring-projects/sts4.git</connection>
		<tag>HEAD</tag>
		<url>https://github.com/spring-projects/sts4/</url>
	</scm>

	<issueManagement>
		<url>https://github.com/spring-projects/sts4/issues</url>
		<system>GitHub</system>
	</issueManagement>

	<ciManagement>
		<url>https://build.spring.io/browse/IDE</url>
		<system>BAMBOO</system>
	</ciManagement>

	<modules>
		<module>org.springframework.tooling.jdt.ls.extension</module>
		<module>org.springframework.tooling.jdt.ls.commons</module>
		<module>org.springframework.tooling.jdt.ls.commons.test</module>
	</modules>

	<properties>
		<tycho-version>1.1.0</tycho-version>

		<!-- Signing -->
		<signing.skip>true</signing.skip>
		<signing.alias>pivotal</signing.alias>
		<signing.keystore>~/.keytool/pivotal.jks</signing.keystore>
		<misc.p2.repo.version>3.9.4.201902271843</misc.p2.repo.version>
	</properties>
	
	<profiles>
		<profile>
			<id>bamboo-signing</id>
			<properties>
				<signing.store.password>${env.bamboo_signing_store_password}</signing.store.password>
				<signing.key.password>${env.bamboo_signing_store_password}</signing.key.password>
			</properties>
		</profile>
	</profiles>

	<repositories>
		<!-- composite update site contains http references, using exact https urls instead -->
		<repository>
			<id>photon</id>
			<layout>p2</layout>
			<url>https://download.eclipse.org/releases/photon/201806271001</url>
		</repository>
		<repository>
			<id>photon-epp</id>
			<layout>p2</layout>
			<url>https://download.eclipse.org/technology/epp/packages/photon/</url>
		</repository>
		
		<repository>
			<id>JDT.LS</id>
			<layout>p2</layout>
			<!-- <url>${jdt.ls.updatesite}</url> -->
			<url>https://download.eclipse.org/jdtls/snapshots/repository/latest/</url>
		</repository>
		<repository>
			<id>jboss-apt</id>
			<layout>p2</layout>
			<!--URL copied from jdt.ls target platform file, needed to satisfy some of its dependencies -->
			<url>https://download.jboss.org/jbosstools/updates/m2e-extensions/m2e-apt/1.5.0-2018-08-14_20-24-39-H12/</url>
		</repository>
 		<repository>
 			<id>p2-thirdparty-bundles</id>
 			<layout>p2</layout>
 			<url>https://dist.springsource.com/release/TOOLS/third-party/misc-p2-repo/${misc.p2.repo.version}</url>
 		</repository>
	</repositories>
	<build>
		<plugins>

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

			<plugin>
				<artifactId>maven-deploy-plugin</artifactId>
				<version>2.5</version>
				<configuration>
					<skip>true</skip>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jarsigner-plugin</artifactId>
				<version>3.0.0</version>
				<executions>
					<execution>
						<id>sign</id>
						<goals>
							<goal>sign</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<skip>${signing.skip}</skip>
					<alias>${signing.alias}</alias>
					<keystore>${signing.keystore}</keystore>
					<storepass>${signing.store.password}</storepass>
					<keypass>${signing.key.password}</keypass>
					<tsa>http://sha256timestamp.ws.symantec.com/sha256/timestamp</tsa>
<!--					<tsa>http://timestamp.digicert.com</tsa> -->
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.eclipse.tycho</groupId>
				<artifactId>tycho-p2-plugin</artifactId>
				<version>${tycho-version}</version>
				<executions>
					<execution>
						<id>second-generate-p2-metadata</id>
						<goals>
							<goal>p2-metadata</goal>
						</goals>
						<phase>verify</phase>
					</execution>
				</executions>
			</plugin>

		</plugins>
	</build>
</project>

