<?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.jboss.tools.rsp</groupId>
	<artifactId>parent</artifactId>
	<version>0.23.5.Final</version>
	<packaging>pom</packaging>
	<name>Runtime Server Protocol</name>
	<description>A runtime-server protocol based on LSP</description>
	<url>https://github.com/redhat-developer/rsp-server</url>
	<scm>
		<url>https://github.com/redhat-developer/rsp-server</url>
	</scm>
	<organization>
		<name>Red Hat, Inc</name>
		<url>http://www.redhat.com</url>
	</organization>
	<issueManagement>
		<system>GitHub Issues</system>
		<url>https://github.com/redhat-developer/rsp-server/issues</url>
	</issueManagement>
	<licenses>
		<license>
			<name>Eclipse Public License 2.0</name>
			<url>https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>
	<developers>
		<developer>
			<name>Rob Stryker</name>
			<email>rstryker@redhat.com</email>
			<url>https://github.com/robstryker</url>
			<id>robstryker</id>
		</developer>
		<developer>
			<name>Andre Dietisheim</name>
			<email>adietish@redhat.com</email>
			<url>https://github.com/adietish</url>
			<id>adietish</id>
		</developer>
		<developer>
			<name>Jeff MAURY</name>
			<email>jeffmaury.github@jeffmaury.com</email>
			<url>https://github.com/jeffmaury</url>
			<id>jeffmaury</id>
		</developer>
	</developers>

	<properties>
		<tycho-version>1.3.0</tycho-version>
		<jacoco.version>0.8.4</jacoco.version>
		<sonar.code.codeCoveragePlugin>jacoco</sonar.code.codeCoveragePlugin>
		<sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
		<moduleProperties></moduleProperties>
		<jboss.releases.repo.id>jboss-releases-repository</jboss.releases.repo.id>
		<jboss.releases.repo.url>https://repository.jboss.org/nexus/service/local/staging/deploy/maven2/</jboss.releases.repo.url>
		<jboss.snapshots.repo.id>jboss-snapshots-repository</jboss.snapshots.repo.id>
		<jboss.snapshots.repo.url>https://repository.jboss.org/nexus/content/repositories/snapshots/</jboss.snapshots.repo.url>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<maven-surefire-plugin.version>3.0.0-M3</maven-surefire-plugin.version>
		<download-maven-plugin.version>1.4.1</download-maven-plugin.version>
	</properties>

	<modules>
		<module>targetplatform</module>
		<module>api</module>
		<module>client</module>
		<module>framework</module>
		<module>runtimes</module>
		<module>distribution</module>
		<module>site</module>
	</modules>

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<configuration>
						<source>1.8</source>
						<target>1.8</target>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>${maven-surefire-plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>com.googlecode.maven-download-plugin</groupId>
					<artifactId>download-maven-plugin</artifactId>
					<version>${download-maven-plugin.version}</version>
				</plugin>
			</plugins>
		</pluginManagement>

		<plugins>
			<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>
					<target>
						<artifact>
							<groupId>org.jboss.tools.rsp</groupId>
							<artifactId>rsp-target</artifactId>
							<version>${project.version}</version>
						</artifact>
					</target>
					<environments>
						<environment>
							<os>macosx</os>
							<ws>cocoa</ws>
							<arch>x86_64</arch>
						</environment>
						<environment>
							<os>win32</os>
							<ws>win32</ws>
							<arch>x86</arch>
						</environment>
						<environment>
							<os>win32</os>
							<ws>win32</ws>
							<arch>x86_64</arch>
						</environment>
						<environment>
							<os>linux</os>
							<ws>gtk</ws>
							<arch>x86</arch>
						</environment>
						<environment>
							<os>linux</os>
							<ws>gtk</ws>
							<arch>x86_64</arch>
						</environment>
					</environments>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.eclipse.tycho</groupId>
				<artifactId>tycho-surefire-plugin</artifactId>
				<version>${tycho-version}</version>
				<configuration>
					<argLine>${moduleProperties}</argLine>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<version>${jacoco.version}</version>
				<executions>
					<execution>
						<id>jacoco-initialize</id>
						<goals>
							<goal>prepare-agent</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<!-- Lock sonar maven plugin version -->
			<plugin>
				<groupId>org.sonarsource.scanner.maven</groupId>
				<artifactId>sonar-maven-plugin</artifactId>
				<version>3.6.0.1398</version>
			</plugin>
		</plugins>

	</build>

	<profiles>
		<profile>
			<id>jdk9</id>
			<activation>
				<jdk>[9</jdk>
			</activation>
			<properties>
				<moduleProperties>--add-modules=ALL-SYSTEM</moduleProperties>
            </properties>
         </profile>
		<profile>
			<id>sonar</id>
			<properties>
				<sonar.host.url>https://sonarcloud.io</sonar.host.url>
				<sonar.organization>redhat-developer</sonar.organization>
			</properties>
			<build>
				<plugins>
					<plugin>
						<groupId>org.jacoco</groupId>
						<artifactId>jacoco-maven-plugin</artifactId>
						<version>${jacoco.version}</version>
						<executions>
							<execution>
								<id>prepare-agent</id>
								<goals>
									<goal>prepare-agent</goal>
								</goals>
							</execution>
							<execution>
								<id>report</id>
								<goals>
									<goal>report</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

	<pluginRepositories>
		<pluginRepository>
			<id>tycho-snapshots</id>
			<url>https://repo.eclipse.org/content/repositories/tycho-snapshots/</url>
		</pluginRepository>
	</pluginRepositories>

	<distributionManagement>
 		<repository>
			<id>${jboss.releases.repo.id}</id>
			<name>JBoss Releases Repository</name>
 			<url>${jboss.releases.repo.url}</url>
		</repository>
		<snapshotRepository>
			<id>${jboss.snapshots.repo.id}</id>
			<name>JBoss Snapshots Repository</name>
			<url>${jboss.snapshots.repo.url}</url>
		</snapshotRepository>
	</distributionManagement>
</project>
