<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2013-2018 the original author or authors.
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      https://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

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

	<artifactId>spring-cloud-sleuth</artifactId>
	<version>3.1.0-SNAPSHOT</version>
	<packaging>pom</packaging>
	<name>Spring Cloud Sleuth</name>
	<description>Spring Cloud Sleuth</description>

	<parent>
		<groupId>org.springframework.cloud</groupId>
		<artifactId>spring-cloud-build</artifactId>
		<version>3.1.0-SNAPSHOT</version>
		<relativePath/>
		<!-- lookup parent from repository -->
	</parent>

	<scm>
		<url>https://github.com/spring-cloud/spring-cloud-sleuth</url>
		<connection>scm:git:git://github.com/spring-cloud/spring-cloud-sleuth.git
		</connection>
		<developerConnection>
			scm:git:ssh://git@github.com/spring-cloud/spring-cloud-sleuth.git
		</developerConnection>
		<tag>HEAD</tag>
	</scm>

	<modules>
		<module>spring-cloud-sleuth-dependencies</module>
		<module>spring-cloud-sleuth-api</module>
		<module>spring-cloud-sleuth-instrumentation</module>
		<module>spring-cloud-sleuth-brave</module>
		<module>spring-cloud-sleuth-autoconfigure</module>
		<module>tests</module>
		<module>spring-cloud-sleuth-zipkin</module>
		<module>spring-cloud-starter-sleuth</module>
		<module>spring-cloud-sleuth-samples</module>
		<module>docs</module>
	</modules>

	<properties>
		<maven.compiler.target>1.8</maven.compiler.target>
		<maven.compiler.source>1.8</maven.compiler.source>
		<maven.compiler.testTarget>1.8</maven.compiler.testTarget>
		<maven.compiler.testSource>1.8</maven.compiler.testSource>
		<spring-cloud-build.version>3.1.0-SNAPSHOT</spring-cloud-build.version>
		<spring-cloud-commons.version>3.1.0-SNAPSHOT</spring-cloud-commons.version>
		<spring-cloud-gateway.version>3.1.0-SNAPSHOT</spring-cloud-gateway.version>
		<spring-cloud-config.version>3.1.0-SNAPSHOT</spring-cloud-config.version>
		<spring-cloud-circuitbreaker.version>2.1.0-SNAPSHOT</spring-cloud-circuitbreaker.version>
		<spring-cloud-stream.version>3.2.0-SNAPSHOT</spring-cloud-stream.version>
		<spring-cloud-function.version>3.2.0-SNAPSHOT</spring-cloud-function.version>
		<spring-cloud-netflix.version>3.1.0-SNAPSHOT</spring-cloud-netflix.version>
		<spring-cloud-openfeign.version>3.1.0-SNAPSHOT</spring-cloud-openfeign.version>
		<spring-cloud-task.version>2.4.0-SNAPSHOT</spring-cloud-task.version>
		<spring-cloud-deployer.version>2.5.1</spring-cloud-deployer.version>
		<brave.version>5.13.2</brave.version>
		<opentracing.version>0.32.0</opentracing.version>
		<spring-security-boot-autoconfigure.version>2.3.4.RELEASE</spring-security-boot-autoconfigure.version>
		<spring-security-oauth2.version>2.2.0.RELEASE</spring-security-oauth2.version>
		<spring-security-version>5.6.0-M3</spring-security-version>
		<disable.nohttp.checks>false</disable.nohttp.checks>
		<okhttp.version>4.9.0</okhttp.version>
		<mockwebserver.version>4.8.0</mockwebserver.version>
		<guava.version>20.0</guava.version>
		<javax.resource-api.version>1.7.1</javax.resource-api.version>
		<cglib-nodep.version>3.3.0</cglib-nodep.version>
		<objenesis.version>3.0.1</objenesis.version>
		<p6spy.version>3.9.1</p6spy.version>
		<datasource-proxy.version>1.7</datasource-proxy.version>
		<tomcat-jdbc.version>10.0.6</tomcat-jdbc.version>
		<commons-dbcp2.version>2.8.0</commons-dbcp2.version>
		<kotlin.version>1.5.20</kotlin.version>

		<!-- Until we switch it to true in sc-build -->
		<javadoc.failOnError>true</javadoc.failOnError>
		<javadoc.failOnWarnings>false</javadoc.failOnWarnings>
		<commons-lang3.version>3.8.1</commons-lang3.version>
		<hamcrest-core.version>2.2</hamcrest-core.version>
		<awaitility.version>4.0.3</awaitility.version>
		<brave-propagation-aws.version>0.21.3</brave-propagation-aws.version>
		<archunit-junit5.version>0.14.1</archunit-junit5.version>
		<testcontainers.version>1.15.3</testcontainers.version>
		<build-helper-maven-plugin.version>3.2.0</build-helper-maven-plugin.version>
	</properties>

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.8.1</version>
					<executions>
						<execution>
							<id>default-compile</id>
							<configuration>
								<showDeprecation>true</showDeprecation>
								<showWarnings>true</showWarnings>
								<compilerArguments>
									<source>${maven.compiler.source}</source>
									<target>${maven.compiler.target}</target>
								</compilerArguments>
							</configuration>
						</execution>
						<execution>
							<id>default-testCompile</id>
							<configuration>
								<showDeprecation>true</showDeprecation>
								<showWarnings>true</showWarnings>
								<compilerArguments>
									<source>${maven.compiler.testSource}</source>
									<target>${maven.compiler.testTarget}</target>
								</compilerArguments>
							</configuration>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<artifactId>maven-enforcer-plugin</artifactId>
					<version>1.3.1</version>
					<executions>
						<execution>
							<id>enforce-java</id>
							<goals>
								<goal>enforce</goal>
							</goals>
							<configuration>
								<rules>
									<requireJavaVersion>
										<version>${maven.compiler.testTarget}</version>
									</requireJavaVersion>
								</rules>
							</configuration>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<artifactId>maven-deploy-plugin</artifactId>
					<version>2.8.2</version>
				</plugin>
				<plugin>
					<artifactId>maven-surefire-plugin</artifactId>
					<configuration>
						<systemPropertyVariables>
							<spring.cloud.sleuth.assertions.enabled>true</spring.cloud.sleuth.assertions.enabled>
						</systemPropertyVariables>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
		<plugins>
			<plugin>
				<groupId>io.spring.javaformat</groupId>
				<artifactId>spring-javaformat-maven-plugin</artifactId>
			</plugin>
			<plugin>
				<artifactId>maven-checkstyle-plugin</artifactId>
			</plugin>
		</plugins>
	</build>

	<reporting>
		<plugins>
			<plugin>
				<artifactId>maven-checkstyle-plugin</artifactId>
			</plugin>
			<plugin>
				<artifactId>maven-surefire-report-plugin</artifactId>
			</plugin>
		</plugins>
	</reporting>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.springframework.cloud</groupId>
				<artifactId>spring-cloud-sleuth-dependencies</artifactId>
				<version>${project.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
			<dependency>
				<groupId>org.springframework.cloud</groupId>
				<artifactId>spring-cloud-netflix-dependencies</artifactId>
				<version>${spring-cloud-netflix.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
			<dependency>
				<groupId>org.springframework.cloud</groupId>
				<artifactId>spring-cloud-commons-dependencies</artifactId>
				<version>${spring-cloud-commons.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
			<dependency>
				<groupId>org.springframework.cloud</groupId>
				<artifactId>spring-cloud-gateway-dependencies</artifactId>
				<version>${spring-cloud-gateway.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
			<dependency>
				<groupId>org.springframework.cloud</groupId>
				<artifactId>spring-cloud-circuitbreaker-dependencies</artifactId>
				<version>${spring-cloud-circuitbreaker.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
			<dependency>
				<groupId>org.springframework.cloud</groupId>
				<artifactId>spring-cloud-stream-dependencies</artifactId>
				<version>${spring-cloud-stream.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
			<dependency>
				<groupId>org.springframework.cloud</groupId>
				<artifactId>spring-cloud-function-dependencies</artifactId>
				<version>${spring-cloud-function.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
			<dependency>
				<groupId>org.springframework.cloud</groupId>
				<artifactId>spring-cloud-openfeign-dependencies</artifactId>
				<version>${spring-cloud-openfeign.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
			<dependency>
				<groupId>org.springframework.cloud</groupId>
				<artifactId>spring-cloud-config-dependencies</artifactId>
				<version>${spring-cloud-config.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
			<dependency>
				<groupId>org.springframework.cloud</groupId>
				<artifactId>spring-cloud-task-dependencies</artifactId>
				<version>${spring-cloud-task.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
			<dependency>
				<groupId>org.springframework.cloud</groupId>
				<artifactId>spring-cloud-deployer-dependencies</artifactId>
				<version>${spring-cloud-deployer.version}</version>
				<scope>import</scope>
				<type>pom</type>
			</dependency>
			<dependency>
				<groupId>org.springframework.security</groupId>
				<artifactId>spring-security-bom</artifactId>
				<version>${spring-security-version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
			<dependency>
				<groupId>org.springframework.security.oauth.boot</groupId>
				<artifactId>spring-security-oauth2-autoconfigure</artifactId>
				<version>${spring-security-boot-autoconfigure.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework.security.oauth</groupId>
				<artifactId>spring-security-oauth2</artifactId>
				<version>${spring-security-oauth2.version}</version>
			</dependency>
			<dependency>
				<groupId>cglib</groupId>
				<artifactId>cglib-nodep</artifactId>
				<version>${cglib-nodep.version}</version>
			</dependency>
			<dependency>
				<groupId>org.objenesis</groupId>
				<artifactId>objenesis</artifactId>
				<version>${objenesis.version}</version>
				<!-- not test because we need it in stream -->
			</dependency>
			<dependency>
				<groupId>com.squareup.okhttp3</groupId>
				<artifactId>mockwebserver</artifactId>
				<version>${mockwebserver.version}</version>
			</dependency>
			<dependency>
				<groupId>io.zipkin.aws</groupId>
				<artifactId>brave-propagation-aws</artifactId>
				<version>${brave-propagation-aws.version}</version>
			</dependency>
			<dependency>
				<groupId>p6spy</groupId>
				<artifactId>p6spy</artifactId>
				<version>${p6spy.version}</version>
			</dependency>
			<dependency>
				<groupId>net.ttddyy</groupId>
				<artifactId>datasource-proxy</artifactId>
				<version>${datasource-proxy.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.commons</groupId>
				<artifactId>commons-dbcp2</artifactId>
				<version>${commons-dbcp2.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.tomcat</groupId>
				<artifactId>tomcat-jdbc</artifactId>
				<version>${tomcat-jdbc.version}</version>
			</dependency>
			<dependency>
				<groupId>org.hamcrest</groupId>
				<artifactId>hamcrest-core</artifactId>
				<version>${hamcrest-core.version}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.awaitility</groupId>
				<artifactId>awaitility</artifactId>
				<version>${awaitility.version}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>com.tngtech.archunit</groupId>
				<artifactId>archunit-junit5</artifactId>
				<version>${archunit-junit5.version}</version>
			</dependency>
			<dependency>
				<groupId>org.testcontainers</groupId>
				<artifactId>testcontainers-bom</artifactId>
				<version>${testcontainers.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<profiles>
		<profile>
			<id>spring</id>
			<repositories>
				<repository>
					<id>spring-snapshots</id>
					<name>Spring Snapshots</name>
					<url>https://repo.spring.io/snapshot</url>
					<snapshots>
						<enabled>true</enabled>
					</snapshots>
					<releases>
						<enabled>false</enabled>
					</releases>
				</repository>
				<!-- BRAVE  -->
				<repository>
					<id>jfrog-snapshots</id>
					<name>JFrog Snapshots</name>
					<url>https://oss.jfrog.org/oss-snapshot-local/</url>
					<snapshots>
						<enabled>true</enabled>
					</snapshots>
					<releases>
						<enabled>false</enabled>
					</releases>
				</repository>
				<repository>
					<id>spring-milestones</id>
					<name>Spring Milestones</name>
					<url>https://repo.spring.io/milestone</url>
					<snapshots>
						<enabled>false</enabled>
					</snapshots>
				</repository>
				<repository>
					<id>spring-releases</id>
					<name>Spring Releases</name>
					<url>https://repo.spring.io/release</url>
					<snapshots>
						<enabled>false</enabled>
					</snapshots>
				</repository>
			</repositories>
			<pluginRepositories>
				<pluginRepository>
					<id>spring-snapshots</id>
					<name>Spring Snapshots</name>
					<url>https://repo.spring.io/snapshot</url>
					<snapshots>
						<enabled>true</enabled>
					</snapshots>
					<releases>
						<enabled>false</enabled>
					</releases>
				</pluginRepository>
				<pluginRepository>
					<id>spring-milestones</id>
					<name>Spring Milestones</name>
					<url>https://repo.spring.io/milestone</url>
					<snapshots>
						<enabled>false</enabled>
					</snapshots>
				</pluginRepository>
				<pluginRepository>
					<id>spring-releases</id>
					<name>Spring Releases</name>
					<url>https://repo.spring.io/release</url>
					<snapshots>
						<enabled>false</enabled>
					</snapshots>
				</pluginRepository>
			</pluginRepositories>
		</profile>
		<profile>
			<id>ide</id>
			<activation>
				<activeByDefault>false</activeByDefault>
			</activation>
			<build>
				<plugins>
					<plugin>
						<artifactId>maven-compiler-plugin</artifactId>
						<configuration>
							<source>${maven.compiler.testSource}</source>
							<target>${maven.compiler.testTarget}</target>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>benchmarks</id>
			<activation>
				<activeByDefault>false</activeByDefault>
			</activation>
			<modules>
				<module>benchmarks</module>
			</modules>
		</profile>
		<profile>
			<id>sonar</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.jacoco</groupId>
						<artifactId>jacoco-maven-plugin</artifactId>
						<executions>
							<execution>
								<id>pre-unit-test</id>
								<goals>
									<goal>prepare-agent</goal>
								</goals>
								<configuration>
									<propertyName>surefireArgLine</propertyName>
									<destFile>${project.build.directory}/jacoco.exec
									</destFile>
								</configuration>
							</execution>
							<execution>
								<id>post-unit-test</id>
								<phase>test</phase>
								<goals>
									<goal>report</goal>
								</goals>
								<configuration>
									<!-- Sets the path to the file which contains the execution data. -->
									<dataFile>${project.build.directory}/jacoco.exec
									</dataFile>
								</configuration>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<artifactId>maven-surefire-plugin</artifactId>
						<configuration>
							<!-- Sets the VM argument line used when unit tests are run. -->
							<argLine>${surefireArgLine}</argLine>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

</project>
