350 lines
9.9 KiB
XML
350 lines
9.9 KiB
XML
<?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>
|
|
|
|
<groupId>com.example</groupId>
|
|
<artifactId>http-server-dsl</artifactId>
|
|
<version>0.0.1</version>
|
|
|
|
<name>Spring Cloud Contract Verifier Http Server Sample</name>
|
|
<description>Spring Cloud Contract Verifier Http Server Sample</description>
|
|
|
|
<parent>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-parent</artifactId>
|
|
<version>3.2.0</version>
|
|
<relativePath/>
|
|
</parent>
|
|
|
|
<properties>
|
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
<java.version>17</java.version>
|
|
<spring-cloud-contract.version>4.1.2-SNAPSHOT</spring-cloud-contract.version>
|
|
<spring-cloud-stream.version>4.1.1-SNAPSHOT</spring-cloud-stream.version>
|
|
</properties>
|
|
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-web</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-actuator</artifactId>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-test</artifactId>
|
|
<scope>test</scope>
|
|
<exclusions>
|
|
<exclusion>
|
|
<groupId>org.junit.vintage</groupId>
|
|
<artifactId>junit-vintage-engine</artifactId>
|
|
</exclusion>
|
|
</exclusions>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.springframework.cloud</groupId>
|
|
<artifactId>spring-cloud-starter-stream-rabbit</artifactId>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>org.springframework.cloud</groupId>
|
|
<artifactId>spring-cloud-stream-test-binder</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
|
|
<!-- tag::verifier_test_dependencies[] -->
|
|
<dependency>
|
|
<groupId>org.springframework.cloud</groupId>
|
|
<artifactId>spring-cloud-starter-contract-verifier</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<!-- end::verifier_test_dependencies[] -->
|
|
</dependencies>
|
|
|
|
<dependencyManagement>
|
|
<dependencies>
|
|
<!-- tag::contract_bom[] -->
|
|
<dependency>
|
|
<groupId>org.springframework.cloud</groupId>
|
|
<artifactId>spring-cloud-contract-dependencies</artifactId>
|
|
<version>${spring-cloud-contract.version}</version>
|
|
<type>pom</type>
|
|
<scope>import</scope>
|
|
<!-- end::contract_bom[] -->
|
|
</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>
|
|
</dependencies>
|
|
</dependencyManagement>
|
|
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
|
</plugin>
|
|
<!-- tag::contract_maven_plugin[] -->
|
|
<plugin>
|
|
<groupId>org.springframework.cloud</groupId>
|
|
<artifactId>spring-cloud-contract-maven-plugin</artifactId>
|
|
<version>${spring-cloud-contract.version}</version>
|
|
<extensions>true</extensions>
|
|
<configuration>
|
|
<packageWithBaseClasses>com.example.fraud</packageWithBaseClasses>
|
|
<!-- <convertToYaml>true</convertToYaml>-->
|
|
</configuration>
|
|
</plugin>
|
|
<!-- end::contract_maven_plugin[] -->
|
|
<plugin>
|
|
<artifactId>maven-deploy-plugin</artifactId>
|
|
<version>2.8.2</version>
|
|
<configuration>
|
|
<skip>true</skip>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-clean-plugin</artifactId>
|
|
<version>3.0.0</version>
|
|
<configuration>
|
|
<filesets>
|
|
<fileset>
|
|
<directory>build</directory>
|
|
</fileset>
|
|
<fileset>
|
|
<directory>target</directory>
|
|
</fileset>
|
|
</filesets>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<artifactId>maven-surefire-plugin</artifactId>
|
|
<configuration>
|
|
<failIfNoTests>true</failIfNoTests>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-antrun-plugin</artifactId>
|
|
<version>3.1.0</version>
|
|
<executions>
|
|
<execution>
|
|
<phase>process-test-resources</phase>
|
|
<configuration>
|
|
<target>
|
|
<taskdef resource="net/sf/antcontrib/antcontrib.properties" />
|
|
<fail message="Generated test files are missing.">
|
|
<condition>
|
|
<not>
|
|
<resourcecount count="6">
|
|
<fileset id="fs" dir="${project.build.directory}/generated-test-sources/contracts/com/example/fraud/" includes="BinaryTest.java,FraudnameTest.java,FraudTest.java,MessagingTest.java,MultipartTest.java,TestTest.java"/>
|
|
</resourcecount>
|
|
</not>
|
|
</condition>
|
|
</fail>
|
|
<fail message="Generated test files are missing.">
|
|
<condition>
|
|
<not>
|
|
<resourcecount count="2">
|
|
<fileset id="fs" dir="${project.build.directory}/generated-test-sources/contracts/com/example/fraud/yml" includes="FraudnameTest.java,FraudTest.java"/>
|
|
</resourcecount>
|
|
</not>
|
|
</condition>
|
|
</fail>
|
|
</target>
|
|
</configuration>
|
|
<goals>
|
|
<goal>run</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>ant-contrib</groupId>
|
|
<artifactId>ant-contrib</artifactId>
|
|
<version>20020829</version>
|
|
</dependency>
|
|
</dependencies>
|
|
</plugin>
|
|
</plugins>
|
|
<pluginManagement>
|
|
<plugins>
|
|
<!--This plugin's configuration is used to store Eclipse m2e settings
|
|
only. It has no influence on the Maven build itself. -->
|
|
<plugin>
|
|
<groupId>org.eclipse.m2e</groupId>
|
|
<artifactId>lifecycle-mapping</artifactId>
|
|
<version>1.0.0</version>
|
|
<configuration>
|
|
<lifecycleMappingMetadata>
|
|
<pluginExecutions>
|
|
<pluginExecution>
|
|
<pluginExecutionFilter>
|
|
<groupId>org.springframework.cloud</groupId>
|
|
<artifactId>spring-cloud-contract-maven-plugin
|
|
</artifactId>
|
|
<versionRange>
|
|
[${spring-cloud-contract.version},)
|
|
</versionRange>
|
|
<goals>
|
|
<goal>convert</goal>
|
|
<goal>generateTests</goal>
|
|
</goals>
|
|
</pluginExecutionFilter>
|
|
<action>
|
|
<ignore></ignore>
|
|
</action>
|
|
</pluginExecution>
|
|
</pluginExecutions>
|
|
</lifecycleMappingMetadata>
|
|
</configuration>
|
|
</plugin>
|
|
</plugins>
|
|
</pluginManagement>
|
|
</build>
|
|
|
|
<!-- tag::repos[] -->
|
|
<repositories>
|
|
<repository>
|
|
<id>spring-snapshots</id>
|
|
<name>Spring Snapshots</name>
|
|
<url>https://repo.spring.io/snapshot</url>
|
|
<snapshots>
|
|
<enabled>true</enabled>
|
|
</snapshots>
|
|
</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>
|
|
</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>
|
|
<!-- end::repos[] -->
|
|
|
|
<profiles>
|
|
<profile>
|
|
<id>integration</id>
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.codehaus.mojo</groupId>
|
|
<artifactId>exec-maven-plugin</artifactId>
|
|
<version>1.6.0</version>
|
|
<executions>
|
|
<execution>
|
|
<id>gradle</id>
|
|
<phase>test</phase>
|
|
<configuration>
|
|
<executable>./gradlew</executable>
|
|
<arguments>
|
|
<argument>clean</argument>
|
|
<argument>build</argument>
|
|
<argument>publishToMavenLocal</argument>
|
|
<!-- TODO: Remove -->
|
|
<argument>-x</argument>
|
|
<argument>test</argument>
|
|
<!-- TODO: Remove -->
|
|
<argument>-x</argument>
|
|
<argument>contractTest</argument>
|
|
<argument>
|
|
-PverifierVersion=${spring-cloud-contract.version}
|
|
</argument>
|
|
</arguments>
|
|
</configuration>
|
|
<goals>
|
|
<goal>exec</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</profile>
|
|
<profile>
|
|
<id>windows</id>
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.codehaus.mojo</groupId>
|
|
<artifactId>exec-maven-plugin</artifactId>
|
|
<version>1.6.0</version>
|
|
<executions>
|
|
<execution>
|
|
<id>gradle</id>
|
|
<phase>test</phase>
|
|
<configuration>
|
|
<executable>gradlew.bat</executable>
|
|
<arguments>
|
|
<argument>clean</argument>
|
|
<argument>build</argument>
|
|
<argument>publishToMavenLocal</argument>
|
|
<!-- TODO: Remove -->
|
|
<argument>-x</argument>
|
|
<argument>test</argument>
|
|
<!-- TODO: Remove -->
|
|
<argument>-x</argument>
|
|
<argument>contractTest</argument>
|
|
<argument>
|
|
-PverifierVersion=${spring-cloud-contract.version}
|
|
</argument>
|
|
</arguments>
|
|
</configuration>
|
|
<goals>
|
|
<goal>exec</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</profile>
|
|
</profiles>
|
|
</project>
|