File tree 2 files changed +9
-0
lines changed
provider/pact-jvm-provider-maven
src/main/kotlin/au/com/dius/pact/provider/maven
2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -612,6 +612,7 @@ For example:
612
612
<pactBrokerUrl >http://pactbroker:1234</pactBrokerUrl >
613
613
<projectVersion >1.0.100</projectVersion > <!-- Defaults to ${project.version} -->
614
614
<trimSnapshot >true</trimSnapshot > <!-- Defaults to false -->
615
+ <skipPactPublish >false</skipPactPublish > <!-- Defaults to false -->
615
616
</configuration >
616
617
</plugin >
617
618
```
Original file line number Diff line number Diff line change @@ -13,6 +13,9 @@ import java.io.File
13
13
@Mojo(name = " publish" )
14
14
open class PactPublishMojo : PactBaseMojo () {
15
15
16
+ @Parameter(defaultValue = " false" , expression= " ${skipPactPublish} " )
17
+ private var skipPactPublish: Boolean = false
18
+
16
19
@Parameter(required = true , defaultValue = " \$ {project.version}" )
17
20
private lateinit var projectVersion: String
18
21
@@ -33,6 +36,11 @@ open class PactPublishMojo : PactBaseMojo() {
33
36
override fun execute () {
34
37
AnsiConsole .systemInstall()
35
38
39
+ if (skipPactPublish) {
40
+ println (" 'skipPactPublish' is set to true, skipping uploading of pacts" )
41
+ return
42
+ }
43
+
36
44
if (pactBrokerUrl.isNullOrEmpty() && brokerClient == null ) {
37
45
throw MojoExecutionException (" pactBrokerUrl is required" )
38
46
}
You can’t perform that action at this time.
0 commit comments