Configure Maven to run Gradle where necessary

This commit is contained in:
Dave Syer
2016-07-28 12:51:22 +01:00
parent ad889ee6d2
commit 71b16eac86
14 changed files with 243 additions and 53 deletions

View File

@@ -28,7 +28,6 @@ repositories {
apply plugin: 'groovy'
apply plugin: 'spring-boot'
apply plugin: 'spring-cloud-contract'
apply plugin: 'maven-publish'
dependencyManagement {
@@ -42,7 +41,10 @@ dependencies {
compile("org.springframework.boot:spring-boot-starter-web")
compile("org.springframework.boot:spring-boot-starter-actuator")
testCompile 'org.springframework.cloud:spring-cloud-starter-contract-verifier'
testCompile 'com.google.code.gson:gson'
testCompile 'org.springframework.boot:spring-boot-starter-test'
testCompile 'org.springframework.restdocs:spring-restdocs-mockmvc'
testCompile 'org.springframework.cloud:spring-cloud-contract-wiremock'
}
test {

View File

@@ -168,5 +168,33 @@
</pluginRepository>
</pluginRepositories>
</profile>
<profile>
<id>integration</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>gradle</id>
<phase>install</phase>
<configuration>
<executable>./gradlew</executable>
<arguments>
<argument>build</argument>
<argument>publishToMavenLocal</argument>
<argument>-PverifierVersion=${spring-cloud-contract.version}</argument>
</arguments>
</configuration>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>