英文:
How to upload consumer contract to official Pact Broker
问题
以下是代码部分的中文翻译:
我可以使用以下的POM条目来实现这个:
<plugin>
<groupId>au.com.dius.pact.provider</groupId>
<artifactId>maven</artifactId>
<version>4.1.17</version>
<configuration>
<pactBrokerUrl>https://akbank.pactflow.io</pactBrokerUrl>
<pactBrokerToken>MyToken</pactBrokerToken>
</configuration>
</plugin>
然而,我不记得我在哪里找到这个示例,也不确定这是否是正确的方式,因为maven插件的groupid以“.provider”结尾。
[文档][1] 在这个主题上非常有限。请告诉我我是否做得对。
[1]: https://docs.pact.io/implementation_guides/jvm/consumer/junit#forcing-pact-files-to-be-overwritten-365
英文:
I can do this using the following pom entry:
<plugin>
<groupId>au.com.dius.pact.provider</groupId>
<artifactId>maven</artifactId>
<version>4.1.17</version>
<configuration>
<pactBrokerUrl>https://akbank.pactflow.io</pactBrokerUrl>
<pactBrokerToken>MyToken</pactBrokerToken>
</configuration>
</plugin>
However I don't remember where I found this sample and not sure if this is the correct way because the groupid of the maven plugin ends with ".provider".
The documentation is very limited regarding to this topic. Please advise if what I'm doing is correct.
答案1
得分: 0
<build>
<plugins>
...
<plugin>
<groupId>au.com.dius.pact.provider</groupId>
<artifactId>maven</artifactId>
<version>4.1.17</version>
<configuration>
<pactBrokerUrl>http://localhost:9292</pactBrokerUrl>
<pactBrokerUsername>pact_workshop</pactBrokerUsername>
<pactBrokerPassword>pact_workshop</pactBrokerPassword>
</configuration>
</plugin>
</plugins>
</build>
英文:
OK it is in Pact Maven + Springboot + JUnit5 workshop, under Step 11 - Using a Pact Broker title.
<build>
<plugins>
...
<plugin>
<groupId>au.com.dius.pact.provider</groupId>
<artifactId>maven</artifactId>
<version>4.1.17</version>
<configuration>
<pactBrokerUrl>http://localhost:9292</pactBrokerUrl>
<pactBrokerUsername>pact_workshop</pactBrokerUsername>
<pactBrokerPassword>pact_workshop</pactBrokerPassword>
</configuration>
</plugin>
</plugins>
</build>
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论