question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't set pact.verifier.publishResults to true with Maven

See original GitHub issue

Hello,

since an update I get the following warning: [main] WARN au.com.dius.pact.provider.junit.InteractionRunner - Skipping publishing of verification results (pact.verifier.publishResults is not set to 'true') As I found this #publishing-verification-results-to-a-pact-broker-version-354 I tried to set the property in the pom.xml in property-section, via the properties-maven-plugin and via command line (Dpact.verifier.publishResults=true), but nothing of that worked for me. I could not figure out how to set it to true.

Any ideas?

Edit: This may be a duplicate of: https://github.com/DiUS/pact-jvm/issues/538 As I use Annotations (@PactUrl) and there is no Annotation like PactBrokerUrl there may be another chance? I need an url like: "http://" + Constants.PACTBROKERHOST + ":" + Constants.PACTBROKERPORT + "/pacts/provider/" + PROVIDER + "/consumer/" + CONSUMER+ "/version/" + PACTVERSION

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
SnewsButtoncommented, Jul 4, 2018

I think I erred because of my general jvm unfamiliarity. Rather than setting the property through maven (which I do now), I initially set pact.verifier.publishResults to the boolean true programatically. So

Properties prop = System.getProperties();
prop.put("pact.verifier.publishResults", true);
System.setProperties(prop);

would not register as ‘true’, but this would:

prop.put("pact.verifier.publishResults", "true");

This is probably just my own fault.

0reactions
uglyogcommented, Jul 12, 2020

@Dattasaisukumar just check https://maven.apache.org/surefire/maven-surefire-plugin/examples/system-properties.html, systemProperties is deprecated and you should use systemPropertyVariables which has a different form.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't set pact.verifier.publishResults to true with Maven #724
Hello, since an update I get the following warning: [main] WARN au.com.dius.pact.provider.junit.InteractionRunner - Skipping publishing of ...
Read more >
Publish verification results to pact broker is not working in pact ...
We're junit5 and had to set it in the @BeforeEach to get it to work : void setupTestTarget(PactVerificationContext context) { context.
Read more >
Pact Maven plugin | Pact Docs
This is a Maven plugin for verifying pacts against a running provider, publishing pacts generated by consumer tests,
Read more >
au.com.dius.pact.provider : maven : 4.1.25
To turn on the verification publishing, set the system property `pact.verifier.publishResults` to `true` in the pact maven plugin, not surefire, ...
Read more >
Untitled
Add the pact-jvm-provider-gradle jar file to your build script class path: ```groovy ... you can set the provider task properties to the actual...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found