<?xml version="1.0" encoding="UTF-8"?>
<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>

	<groupId>org.springframework.boot.ide</groupId>
	<artifactId>org.springframework.boot.ide.servers</artifactId>
	<version>4.0.0-SNAPSHOT</version>
	<packaging>pom</packaging>

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

	<prerequisites>
		<maven>3.0</maven>
	</prerequisites>

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

	<modules>
		<module>../headless-services/jdt-ls-extension</module>
		<module>org.springframework.tooling.ls.eclipse.commons</module>
	
		<module>org.springframework.tooling.cloudfoundry.manifest.ls</module>
		<module>org.springframework.tooling.cloudfoundry.manifest.ls.feature</module>
		<module>org.springframework.tooling.ls.repository</module>

		<module>org.springframework.tooling.cloudfoundry.manifest.ls.integration</module>
		<module>org.springframework.tooling.cloudfoundry.manifest.ls.integration.feature</module>

		<module>org.springframework.tooling.ls.eclipse.gotosymbol</module>
		<module>org.springframework.tooling.boot.ls</module>
		<module>org.springframework.tooling.boot.ls.feature</module>

		<module>org.springframework.tooling.bosh.ls</module>
		<module>org.springframework.tooling.bosh.ls.feature</module>

		<module>org.springframework.tooling.concourse.ls</module>
		<module>org.springframework.tooling.concourse.ls.feature</module>

		<module>org.springframework.tooling.ls.integration.repository</module>

	</modules>

	<properties>
		<p2.qualifier>SNAPSHOT</p2.qualifier>
		<p2.sign>false</p2.sign>
		<p2.repository.name>Spring Boot IDE Language Server</p2.repository.name>

		<!-- Signing -->
		<signing.skip>true</signing.skip>
		<signing.alias>pivotal</signing.alias>
		<signing.keystore>~/.keytool/pivotal.jks</signing.keystore>

		<!-- OSX app signing -->
		<skip.osx.signing>true</skip.osx.signing>

		<tycho-version>1.1.0</tycho-version>
		<encoding>UTF-8</encoding>

		<dist.accessKey>${accessKey}</dist.accessKey>
		<dist.secretKey>${secretKey}</dist.secretKey>
		<dist.bucket>dist.springsource.com</dist.bucket>
		<dist.key>TOOLS</dist.key>
		<dist.path>${dist.type}/${dist.key}/${dist.project}/${dist.version}</dist.path>

	</properties>

	<profiles>

		<profile>
			<id>snapshot</id>
			<properties>
				<dist.type>snapshot</dist.type>
				<dist.version>nightly</dist.version>
			</properties>
		</profile>
		
		<profile>
			<id>milestone</id>
			<properties>
				<dist.type>milestone</dist.type>
				<dist.version>today</dist.version> <!-- should be overridden when building with some timestamp like 20171114 -->
			</properties>
		</profile>
		
		<profile>
			<id>release</id>
			<properties>
				<dist.type>release</dist.type>
				<dist.version>today</dist.version> <!-- should be overridden when building with some timestamp like 20171114 -->
			</properties>
		</profile>

		<profile>
			<id>e47</id>
			<properties>
				<dist.target>e4.7.3</dist.target>
				<dist.target.major>e4.7</dist.target.major>
				<dist.platform.name>Oxygen</dist.platform.name>
				<dist.platform.name.long>Oxygen.3 (4.7.3)</dist.platform.name.long>
				<dist.platform.id>oxygen</dist.platform.id>
				<dist.platform.version>4.7</dist.platform.version>
				<package.qualifierPrefix>e47</package.qualifierPrefix>
			</properties>
			<repositories>
				<repository>
					<id>oxygen</id>
					<layout>p2</layout>
					<url>http://download.eclipse.org/releases/oxygen/</url>
				</repository>
<!--				<repository>
					<id>staging</id>
					<layout>p2</layout>
					<url>http://download.eclipse.org/staging/oxygen/</url>
				</repository> -->
				<repository>
					<id>orbit</id>
					<layout>p2</layout>
					<url>http://download.eclipse.org/tools/orbit/downloads/drops/R20170919201930/repository/</url>
				</repository>
				<repository>
					<id>lsp4j-snapshots</id>
					<layout>p2</layout>
					<url>http://services.typefox.io/open-source/jenkins/job/lsp4j/job/master/lastStableBuild/artifact/build/p2-repository/</url>
				</repository>
				<repository>
					<id>e-i-commons</id>
					<layout>p2</layout>
					<url>http://dist.springframework.org/snapshot/IDE/nightly</url>
				</repository>
				<repository>
					<id>lsp4e-050-stream</id>
					<layout>p2</layout>
					<url>http://download.eclipse.org/lsp4e/0.5.x-snapshots/</url>
				</repository>
				<repository>
					<id>tm4e</id>
					<layout>p2</layout>
					<url>http://download.eclipse.org/tm4e/snapshots/</url>
				</repository>
			</repositories>
		</profile>

		<profile>
			<id>e48</id>
			<properties>
				<dist.target>e4.8.0</dist.target>
				<dist.target.major>e4.8</dist.target.major>
				<dist.platform.name>Photon</dist.platform.name>
				<dist.platform.name.long>Photon (4.8)</dist.platform.name.long>
				<dist.platform.id>photon</dist.platform.id>
				<dist.platform.version>4.8</dist.platform.version>
				<package.qualifierPrefix>e48</package.qualifierPrefix>
			</properties>
			<repositories>
				<repository>
					<id>photon</id>
					<layout>p2</layout>
					<url>http://download.eclipse.org/releases/photon/</url>
				</repository>
				<repository>
					<id>staging</id>
					<layout>p2</layout>
					<url>http://download.eclipse.org/staging/photon/</url>
				</repository>
<!--				<repository>
					<id>platform-i-builds</id>
					<layout>p2</layout>
					<url>http://download.eclipse.org/eclipse/updates/4.8-I-builds/</url>
				</repository> -->
				<repository>
					<id>orbit</id>
					<layout>p2</layout>
					<url>http://download.eclipse.org/tools/orbit/downloads/drops/R20180606145124/repository</url>
				</repository>
<!--				<repository>
					<id>orbit-i-builds</id>
					<layout>p2</layout>
					<url>http://download.eclipse.org/tools/orbit/downloads/latest-I/</url>
				</repository> -->
<!--				<repository>
					<id>lsp4j-snapshots</id>
					<layout>p2</layout>
					<url>http://services.typefox.io/open-source/jenkins/job/lsp4j/job/master/lastStableBuild/artifact/build/p2-repository/</url>
				</repository> -->
				<repository>
					<id>e-i-commons</id>
					<layout>p2</layout>
					<url>http://dist.springframework.org/snapshot/IDE/nightly</url>
				</repository>
				<repository>
					<id>lsp4e</id>
					<layout>p2</layout>
					<url>http://download.eclipse.org/lsp4e/snapshots/</url>
				</repository>
				<repository>
					<id>tm4e</id>
					<layout>p2</layout>
					<url>http://download.eclipse.org/tm4e/snapshots/</url>
				</repository>
			</repositories>
		</profile>

		<profile>
			<id>build.springsource.com</id>
			<activation>
				<property>
					<name>bamboo.buildNumber</name>
				</property>
			</activation>
			<properties>
				<!-- <test.vmargs>-Dhttp.proxyHost=proxy.eng.vmware.com -Dhttp.proxyPort=3128 
					-Dhttps.proxyHost=proxy.eng.vmware.com -Dhttps.proxyPort=3128 ${test.osvmargs}</test.vmargs> -->
				<p2.qualifier>CI-B${bamboo.buildNumber}</p2.qualifier>
				<p2.replaceQualifier>true</p2.replaceQualifier>
				<!-- <http_proxy>http://proxy.eng.vmware.com:3128</http_proxy> -->
				<!-- <https_proxy>http://proxy.eng.vmware.com:3128</https_proxy> -->
			</properties>
		</profile>

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

	<pluginRepositories>
	    <pluginRepository>
	      <id>tycho-snapshots</id>
	      <url>https://repo.eclipse.org/content/repositories/tycho-snapshots/</url>
	    </pluginRepository>
		<!-- necessary for Maven and Ant AWS dependency -->
		<pluginRepository>
			<id>spring-maven-release</id>
			<name>Spring Maven Release Repository</name>
			<url>http://maven.springframework.org/release</url>
		</pluginRepository>
		<pluginRepository>
			<id>springsource-maven-release</id>
			<name>SpringSource Maven Release Repository</name>
			<url>http://repository.springsource.com/maven/bundles/release</url>
		</pluginRepository>
		<pluginRepository>
			<id>sonatype.snapshots</id>
			<url>https://repository.sonatype.org/content/repositories/snapshots/</url>
		</pluginRepository>
	</pluginRepositories>

	<build>
		<extensions>
			<extension>
				<groupId>org.springframework.build.aws</groupId>
				<artifactId>org.springframework.build.aws.maven</artifactId>
				<version>3.1.0.RELEASE</version>
			</extension>
		</extensions>

		<plugins>

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

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

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

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jarsigner-plugin</artifactId>
				<version>1.4</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>
				</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>

		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.eclipse.tycho</groupId>
					<artifactId>tycho-compiler-plugin</artifactId>
					<version>${tycho-version}</version>
					<configuration>
						<encoding>UTF-8</encoding>
						<compilerArgument>-err:-forbidden</compilerArgument>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.eclipse.tycho</groupId>
					<artifactId>target-platform-configuration</artifactId>
					<version>${tycho-version}</version>
					<configuration>
						<resolver>p2</resolver>
						<pomDependencies>consider</pomDependencies>
						<ignoreTychoRepositories>true</ignoreTychoRepositories>
						<dependency-resolution>
							<optionalDependencies>ignore</optionalDependencies>
						</dependency-resolution>
						<environments>
							<environment>
								<os>macosx</os>
								<ws>cocoa</ws>
								<arch>x86_64</arch>
							</environment>
							<environment>
								<os>win32</os>
								<ws>win32</ws>
								<arch>x86_64</arch>
							</environment>
							<environment>
								<os>linux</os>
								<ws>gtk</ws>
								<arch>x86_64</arch>
							</environment>
						</environments>
						<filters>
							<filter>
								<type>java-package</type>
								<id>javax.servlet</id>
								<restrictTo>
									<type>eclipse-plugin</type>
									<id>javax.servlet</id>
								</restrictTo>
							</filter>
						</filters>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.eclipse.tycho</groupId>
					<artifactId>tycho-packaging-plugin</artifactId>
					<version>${tycho-version}</version>
					<configuration>
						<format>yyyyMMddHHmm</format>
						<archiveSite>true</archiveSite>
						<archive>
							<addMavenDescriptor>false</addMavenDescriptor>
						</archive>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-resources-plugin</artifactId>
					<version>2.4.3</version>
					<configuration>
						<encoding>ISO-8859-1</encoding>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-antrun-plugin</artifactId>
					<version>1.6</version>
					<dependencies>
						<dependency>
							<groupId>ant-contrib</groupId>
							<artifactId>ant-contrib</artifactId>
							<version>1.0b3</version>
							<exclusions>
								<exclusion>
									<groupId>ant</groupId>
									<artifactId>ant</artifactId>
								</exclusion>
							</exclusions>
						</dependency>
						<dependency>
							<groupId>org.apache.ant</groupId>
							<artifactId>ant-nodeps</artifactId>
							<version>1.8.1</version>
						</dependency>
						<dependency>
							<groupId>org.springframework.build</groupId>
							<artifactId>org.springframework.build.aws.ant</artifactId>
							<version>3.1.0.RELEASE</version>
						</dependency>
						<dependency>
							<groupId>net.java.dev.jets3t</groupId>
							<artifactId>jets3t</artifactId>
							<version>0.8.1</version>
						</dependency>
					</dependencies>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

</project>
