<?xml version="1.0" encoding="UTF-8"?>
<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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<properties>
		<org.eclipse.sisu.inject.version>0.1.1</org.eclipse.sisu.inject.version>
		<org.eclipse.sisu.plexus.version>0.1.1</org.eclipse.sisu.plexus.version>
		<sisu-guice.version>3.1.6</sisu-guice.version>

		<maven-shade-plugin.version>2.4.3</maven-shade-plugin.version>
		<maven-dependency-plugin.version>3.0.0</maven-dependency-plugin.version>
		<build-helper-maven-plugin.version>1.12</build-helper-maven-plugin.version>
	</properties>
	<parent>
		<groupId>org.springframework.cloud</groupId>
		<artifactId>spring-cloud-contract-parent</artifactId>
		<version>2.1.1.RELEASE</version>
		<relativePath>..</relativePath>
	</parent>
	<artifactId>spring-cloud-contract-shade</artifactId>
	<packaging>jar</packaging>
	<name>Spring Cloud Contract Shaded Dependencies</name>
	<description>Spring Cloud Contract Shaded Dependencies</description>
	<dependencies>
		<dependency>
			<groupId>org.eclipse.aether</groupId>
			<artifactId>aether-api</artifactId>
			<optional>true</optional>
		</dependency>
		<dependency>
			<groupId>org.eclipse.aether</groupId>
			<artifactId>aether-impl</artifactId>
			<optional>true</optional>
		</dependency>
		<dependency>
			<groupId>org.eclipse.aether</groupId>
			<artifactId>aether-transport-file</artifactId>
			<optional>true</optional>
		</dependency>
		<dependency>
			<groupId>org.eclipse.aether</groupId>
			<artifactId>aether-transport-http</artifactId>
			<optional>true</optional>
		</dependency>
		<dependency>
			<groupId>org.eclipse.aether</groupId>
			<artifactId>aether-connector-basic</artifactId>
			<optional>true</optional>
		</dependency>
		<dependency>
			<groupId>org.apache.maven</groupId>
			<artifactId>maven-aether-provider</artifactId>
			<optional>true</optional>
		</dependency>
		<dependency>
			<groupId>org.apache.maven</groupId>
			<artifactId>maven-artifact</artifactId>
			<optional>true</optional>
		</dependency>
		<dependency>
			<groupId>org.apache.maven</groupId>
			<artifactId>maven-settings-builder</artifactId>
			<optional>true</optional>
		</dependency>
		<dependency>
			<groupId>org.eclipse.sisu</groupId>
			<artifactId>org.eclipse.sisu.inject</artifactId>
			<version>${org.eclipse.sisu.inject.version}</version>
			<optional>true</optional>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.eclipse.sisu</groupId>
			<artifactId>org.eclipse.sisu.plexus</artifactId>
			<version>${org.eclipse.sisu.plexus.version}</version>
			<exclusions>
				<exclusion>
					<groupId>javax.enterprise</groupId>
					<artifactId>cdi-api</artifactId>
				</exclusion>
			</exclusions>
			<optional>true</optional>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.sonatype.sisu</groupId>
			<artifactId>sisu-guice</artifactId>
			<version>${sisu-guice.version}</version>
			<classifier>no_aop</classifier>
			<exclusions>
				<exclusion>
					<groupId>aopalliance</groupId>
					<artifactId>aopalliance</artifactId>
				</exclusion>
				<exclusion>
					<groupId>com.google.code.findbugs</groupId>
					<artifactId>jsr305</artifactId>
				</exclusion>
			</exclusions>
			<optional>true</optional>
			<scope>provided</scope>
		</dependency>
	</dependencies>
	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-shade-plugin</artifactId>
				<version>${maven-shade-plugin.version}</version>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>shade</goal>
						</goals>
						<configuration>
							<createDependencyReducedPom>false</createDependencyReducedPom>
							<shadedArtifactAttached>false</shadedArtifactAttached>
							<createSourcesJar>true</createSourcesJar>
							<shadeSourcesContent>true</shadeSourcesContent>
							<keepDependenciesWithProvidedScope>true
							</keepDependenciesWithProvidedScope>
							<relocations>
								<relocation>
									<pattern>org.eclipse.aether.connector</pattern>
									<shadedPattern>shaded.org.eclipse.aether.connector
									</shadedPattern>
								</relocation>
								<relocation>
									<pattern>org.eclipse.aether.transport</pattern>
									<shadedPattern>shaded.org.eclipse.aether.transport
									</shadedPattern>
								</relocation>
								<relocation>
									<pattern>org.eclipse.aether.impl</pattern>
									<shadedPattern>shaded.org.eclipse.aether.impl
									</shadedPattern>
								</relocation>
								<relocation>
									<pattern>org.eclipse.aether.internal</pattern>
									<shadedPattern>shaded.org.eclipse.aether.internal
									</shadedPattern>
								</relocation>
								<relocation>
									<pattern>org.eclipse.aether.spi</pattern>
									<shadedPattern>shaded.org.eclipse.aether.spi
									</shadedPattern>
								</relocation>
								<relocation>
									<pattern>org.apache.maven</pattern>
									<shadedPattern>shaded.org.apache.maven</shadedPattern>
								</relocation>
							</relocations>
							<filters>
								<filter>
									<excludes>
										<exclude>org/slf4j/</exclude>
									</excludes>
								</filter>
							</filters>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId>
				<version>${maven-dependency-plugin.version}</version>
				<executions>
					<execution>
						<id>unpack-dependencies</id>
						<phase>package</phase>
						<goals>
							<goal>unpack</goal>
						</goals>
						<configuration>
							<artifactItems>
								<artifactItem>
									<groupId>org.springframework.cloud</groupId>
									<artifactId>spring-cloud-contract-shade</artifactId>
									<version>${project.version}</version>
									<classifier>sources</classifier>
									<type>jar</type>
									<overWrite>false</overWrite>
									<outputDirectory>${project.build.directory}/sources
									</outputDirectory>
								</artifactItem>
							</artifactItems>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>build-helper-maven-plugin</artifactId>
				<version>${build-helper-maven-plugin.version}</version>
				<executions>
					<execution>
						<id>add-source</id>
						<phase>package</phase>
						<goals>
							<goal>add-source</goal>
						</goals>
						<configuration>
							<sources>
								<source>${project.build.directory}/sources</source>
							</sources>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<configuration>
					<failIfNoTests>false</failIfNoTests>
				</configuration>
			</plugin>
		</plugins>
	</build>
</project>
