<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<properties>
		<dependency-management-plugin.version>1.0.8.RELEASE</dependency-management-plugin.version>
		<plexus-archiver.version>4.9.1</plexus-archiver.version>
		<sdkman-java-installation.version>17.0.1-tem</sdkman-java-installation.version>
	</properties>

	<parent>
		<groupId>org.springframework.cloud</groupId>
		<artifactId>spring-cloud-contract-docker-parent</artifactId>
		<version>4.2.0-RC1</version>
		<relativePath>..</relativePath>
	</parent>

	<artifactId>spring-cloud-contract-docker</artifactId>
	<packaging>pom</packaging>
	<version>4.2.0-RC1</version>
	<name>Spring Cloud Contract Docker</name>
	<description>Spring Cloud Contract Docker</description>

	<dependencies>
		<dependency>
			<groupId>org.springframework.cloud</groupId>
			<artifactId>spring-cloud-contract-dependencies</artifactId>
			<version>${project.version}</version>
			<type>pom</type>
			<scope>runtime</scope>
		</dependency>

		<dependency>
			<groupId>org.apache.groovy</groupId>
			<artifactId>groovy</artifactId>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.groovy</groupId>
			<artifactId>groovy-ant</artifactId>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.groovy</groupId>
			<artifactId>groovy-groovydoc</artifactId>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework.cloud</groupId>
			<artifactId>spring-cloud-starter-contract-verifier</artifactId>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework.cloud</groupId>
			<artifactId>spring-cloud-contract-gradle-plugin</artifactId>
			<scope>runtime</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework.cloud</groupId>
			<artifactId>spring-cloud-contract-wiremock</artifactId>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework.cloud</groupId>
			<artifactId>spring-cloud-contract-spec</artifactId>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework.cloud</groupId>
			<artifactId>spring-cloud-contract-tools</artifactId>
			<version>${project.version}</version>
			<type>pom</type>
			<scope>runtime</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework.cloud</groupId>
			<artifactId>spring-cloud-contract-spec-java</artifactId>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework.cloud</groupId>
			<artifactId>spring-cloud-contract-spec-groovy</artifactId>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework.cloud</groupId>
			<artifactId>spring-cloud-contract-spec-kotlin</artifactId>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework.cloud</groupId>
			<artifactId>spring-cloud-contract-verifier</artifactId>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework.cloud</groupId>
			<artifactId>spring-cloud-contract-converters</artifactId>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework.cloud</groupId>
			<artifactId>spring-cloud-contract-stub-runner</artifactId>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework.cloud</groupId>
			<artifactId>spring-cloud-contract-stub-runner-boot</artifactId>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework.cloud</groupId>
			<artifactId>spring-cloud-contract-shade</artifactId>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework.cloud</groupId>
			<artifactId>spring-cloud-starter-contract-stub-runner</artifactId>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework.cloud</groupId>
			<artifactId>spring-cloud-starter-contract-stub-runner-jetty</artifactId>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework.cloud</groupId>
			<artifactId>spring-cloud-contract-maven-plugin</artifactId>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>io.spring.gradle</groupId>
			<artifactId>dependency-management-plugin</artifactId>
			<version>${dependency-management-plugin.version}</version>
			<scope>runtime</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework.cloud</groupId>
			<artifactId>spring-cloud-build</artifactId>
			<version>${spring-cloud-build.version}</version>
			<type>pom</type>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<configuration>
					<failIfNoTests>false</failIfNoTests>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId>
				<executions>
					<execution>
						<id>copy-dependencies</id>
						<phase>package</phase>
						<goals>
							<goal>copy-dependencies</goal>
						</goals>
						<configuration>
							<outputDirectory>
								${project.build.directory}/maven_dependencies
							</outputDirectory>
							<overWriteReleases>false</overWriteReleases>
							<overWriteSnapshots>true</overWriteSnapshots>
							<overWriteIfNewer>true</overWriteIfNewer>
							<useRepositoryLayout>true</useRepositoryLayout>
							<copyPom>true</copyPom>
							<excludeTransitive>false</excludeTransitive>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>exec-maven-plugin</artifactId>
				<version>${exec-maven-plugin.version}</version>
				<executions>
					<execution>
						<id>gradle</id>
						<phase>package</phase>
						<configuration>
							<executable>./get_dependencies.sh</executable>
						</configuration>
						<goals>
							<goal>exec</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>com.spotify</groupId>
				<artifactId>dockerfile-maven-plugin</artifactId>
				<version>1.4.13</version>
				<executions>
					<execution>
						<id>default</id>
						<goals>
							<goal>build</goal>
							<goal>push</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<repository>${docker.registry.organization}/spring-cloud-contract
					</repository>
					<tag>${project.version}</tag>
					<username>${env.DOCKER_HUB_USERNAME}</username>
					<password>${env.DOCKER_HUB_PASSWORD}</password>
					<build>
						<noCache>true</noCache>
					</build>
					<buildArgs>
						<SDKMAN_JAVA_INSTALLATION>${sdkman-java-installation.version}</SDKMAN_JAVA_INSTALLATION>
					</buildArgs>
				</configuration>
				<dependencies>
					<dependency>
						<groupId>org.codehaus.plexus</groupId>
						<artifactId>plexus-archiver</artifactId>
						<version>${plexus-archiver.version}</version>
					</dependency>
				</dependencies>
			</plugin>
		</plugins>
	</build>
</project>
