<?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/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<groupId>de.monochromata.poms</groupId>
		<artifactId>maven-artifact</artifactId>
		<version>1.1.149</version>
		<relativePath/>
	</parent>
	<groupId>de.monochromata.contract</groupId>
	<artifactId>java-contract</artifactId>
	<version>18.4.6</version>
	<name>Java Contract</name>
	<description>Contract testing for Java API's</description>
	<url>https://gitlab.com/monochromata-de/java-contract</url>

	<licenses>
		<license>
			<name>MIT</name>
			<url>https://opensource.org/licenses/MIT</url>
		</license>
	</licenses>
	
	<developers>
		<developer>
			<name>Sebastian Lohmeier</name>
			<email>sl@monochromata.de</email>
			<url>https://monochromata.de</url>
		</developer>
	</developers>
	
	<scm>
		<connection>scm:git:https://gitlab.com/monochromata-de/java-contract.git</connection>
		<developerConnection>scm:git:https://gitlab.com/monochromata-de/java-contract.git</developerConnection>
		<url>https://gitlab.com/monochromata-de/java-contract/tree/master</url>
	</scm>

    <distributionManagement>
        <site>
            <id>ftp.monochromata.de</id>
            <url>sftp://ftp.monochromata.de/public_html/monochromata.de/maven/sites/${project.groupId}/</url>
        </site>
    </distributionManagement>

	<properties>
		<maven.site.skip>true</maven.site.skip>
		<maven.site.deploy.skip>true</maven.site.deploy.skip>
        <io.cucumber.version>7.13.0</io.cucumber.version>
	</properties>

	<dependencies>
		<dependency>
			<groupId>com.fasterxml.jackson.core</groupId>
			<artifactId>jackson-core</artifactId>
		</dependency>
		<dependency>
			<groupId>com.fasterxml.jackson.core</groupId>
			<artifactId>jackson-databind</artifactId>
		</dependency>
		<dependency>
		    <groupId>com.fasterxml.jackson.module</groupId>
		    <artifactId>jackson-module-parameter-names</artifactId>
		</dependency>
		<dependency>
		    <groupId>com.fasterxml.jackson.datatype</groupId>
		    <artifactId>jackson-datatype-jdk8</artifactId>
		</dependency>
		<dependency>
		    <groupId>com.fasterxml.jackson.datatype</groupId>
		    <artifactId>jackson-datatype-jsr310</artifactId>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
		</dependency>
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter</artifactId>
			<version>5.9.3</version>
		</dependency>
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-lang3</artifactId>
		</dependency>
		<dependency>
			<groupId>org.assertj</groupId>
			<artifactId>assertj-core</artifactId>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
		</dependency>
		<dependency>
		  <groupId>net.bytebuddy</groupId>
		  <artifactId>byte-buddy</artifactId>
		  <version>1.14.5</version>
		</dependency>
		<dependency>
		  <groupId>net.bytebuddy</groupId>
		  <artifactId>byte-buddy-agent</artifactId>
		  <version>1.14.5</version>
		</dependency>
		<dependency>
			<groupId>au.com.dius.pact.core</groupId>
			<artifactId>matchers</artifactId>
			<version>4.6.1</version>
		</dependency>
		<dependency>
			<groupId>au.com.dius.pact.core</groupId>
			<artifactId>model</artifactId>
			<version>4.6.1</version>
		</dependency>
		<dependency>
			<groupId>au.com.dius.pact.core</groupId>
			<artifactId>pactbroker</artifactId>
			<version>4.6.1</version>
		</dependency>
		<dependency>
			<groupId>io.pact.plugin.driver</groupId>
			<artifactId>core</artifactId>
			<version>0.4.0</version>
		</dependency>
		<dependency>
			<groupId>org.jetbrains.kotlin</groupId>
			<artifactId>kotlin-stdlib</artifactId>
			<version>1.9.0</version>
		</dependency>
		<dependency>
		  <groupId>org.apache.maven</groupId>
		  <artifactId>maven-model</artifactId>
		  <version>3.9.3</version>
		</dependency>

		<!-- Test -->
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-engine</artifactId>
			<version>5.9.3</version>
		</dependency>
		<dependency>
			<groupId>com.google.code.findbugs</groupId>
			<artifactId>jsr305</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>de.monochromata.cucumber</groupId>
			<artifactId>stepdefs</artifactId>
			<version>1.3.75</version>
			<scope>test</scope>
		</dependency>
        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-java</artifactId>
            <version>${io.cucumber.version}</version>
            <scope>test</scope>
        </dependency>
		<dependency>
		   <groupId>io.cucumber</groupId>
		   <artifactId>cucumber-junit-platform-engine</artifactId>
		   <version>${io.cucumber.version}</version>
		   <scope>test</scope>
		</dependency>
        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-junit</artifactId>
            <version>${io.cucumber.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-picocontainer</artifactId>
            <version>${io.cucumber.version}</version>
            <scope>test</scope>
        </dependency>
		<dependency>
			<groupId>nl.jqno.equalsverifier</groupId>
			<artifactId>equalsverifier</artifactId>
			<scope>test</scope>
			<version>3.15</version>
		</dependency>
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-core</artifactId>
			<scope>test</scope>
			<exclusions>
				<exclusion>
		          <groupId>net.bytebuddy</groupId>
		          <artifactId>byte-buddy</artifactId>
		        </exclusion>
			</exclusions>
		</dependency>
		<dependency>
		    <groupId>net.javacrumbs.json-unit</groupId>
		    <artifactId>json-unit-assertj</artifactId>
		    <version>3.0.0</version>
		    <scope>test</scope>
		</dependency>
		<dependency>
			<groupId>au.com.dius.pact</groupId>
			<artifactId>consumer</artifactId>
			<version>4.6.1</version>
			<scope>test</scope>
		</dependency>
		<dependency> 
		  <groupId>ch.qos.logback</groupId>
		  <artifactId>logback-classic</artifactId>
		  <version>1.4.8</version>
		  <scope>test</scope>
		</dependency>
	</dependencies>
	
	<build>
		<plugins>
			<plugin>
		        <groupId>com.coderplus.maven.plugins</groupId>
		        <artifactId>copy-rename-maven-plugin</artifactId>
		        <version>1.0.1</version>
		        <executions>
		          <execution>
		            <id>rename-interaction-listener-class-file</id>
		            <phase>test-compile</phase>
		            <goals>
		              <goal>rename</goal>
		            </goals>
		            <configuration>
		              <sourceFile>target/classes/de/monochromata/contract/provider/redefine/InteractionListener.class</sourceFile>
		              <destinationFile>target/classes/de/monochromata/contract/provider/redefine/InteractionListener.bin</destinationFile>
		              <ignoreFileNotFoundOnIncremental>false</ignoreFileNotFoundOnIncremental>
		            </configuration>
		          </execution>
		        </executions>
	      </plugin>
		<plugin>
		    <groupId>org.apache.maven.plugins</groupId>
		    <artifactId>maven-surefire-plugin</artifactId>
		    <configuration>
		        <properties>
		            <configurationParameters>
		                cucumber.junit-platform.naming-strategy=long
		            </configurationParameters>
		        </properties>
		    </configuration>
		</plugin>
			<!-- Remove when https://gitlab.com/monochromata-de/poms/-/issues/34 is fixed -->
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.11.0</version>
					<configuration>
						<source>17</source>
						<target>17</target>
					</configuration>
				</plugin>
			<!-- Remove when https://gitlab.com/monochromata-de/poms/-/issues/34 is fixed -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>3.5.0</version>
				<configuration>
					<source>17</source>
					<target>17</target>
				</configuration>
			</plugin>
		</plugins>
	</build>
	
	<profiles>
		<profile>
			<id>ci</id>
			<!--<activation>
				<property>
					<name>env.CI</name>
					<value>true</value>
				</property>
			</activation>-->
			<build>
				<plugins>
			      <plugin>
			          <groupId>au.com.dius.pact.provider</groupId>
			          <artifactId>maven</artifactId>
			          <version>4.6.1</version>
			          <configuration>
			            <pactBrokerUrl>${env.PACT_BROKER_BASE_URL}</pactBrokerUrl>
			            <pactBrokerAuthenticationScheme>Bearer</pactBrokerAuthenticationScheme>
			            <pactBrokerToken>${env.PACT_BROKER_TOKEN}</pactBrokerToken>
			            <projectVersion>${project.version}-${env.CI_COMMIT_SHORT_SHA}</projectVersion>
			            <branchName>${env.CI_COMMIT_REF_NAME}</branchName>
	          			<environment>the-central-repository</environment>
			          </configuration>
			          <executions>
			          	<execution>
			          		<id>publish-contract</id>
			          		<goals>
			          			<goal>publish</goal>
		          			</goals>
		          			<phase>post-integration-test</phase>
			          	</execution>
			          	<execution>
			          		<id>can-i-deploy</id>
			          		<goals>
			          			<goal>can-i-deploy</goal>
			          		</goals>
			          		<phase>verify</phase>
			          		<configuration>
			          			<pacticipant>java-contract</pacticipant>
			          			<pacticipantVersion>${project.version}-${env.CI_COMMIT_SHORT_SHA}</pacticipantVersion>
			          		</configuration>
			          	</execution>
			          </executions>
			      </plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

</project>
