Publishing Stubs as JARs

将存根发布为 jar 的最简单方法是集中存储存根的方式。例如,您可以将它们作为 jar 保存在 Maven 存储库中。

The easiest approach to publishing stubs as jars is to centralize the way stubs are kept. For example, you can keep them as jars in a Maven repository.

对于maven和gradle,该设置已准备好工作。但是,如果你愿意,可以对其进行自定义。

For both Maven and Gradle, the setup comes ready to work. However, you can customize it if you want to.

查看下列 URL,了解 {samples_url}/producer_with_restdocs/pom.xml[Maven] 和 {samples_url}/producer_with_restdocs/pom.xml[Gradle] 示例。

Check these URL for {samples_url}/producer_with_restdocs/pom.xml[Maven] and {samples_url}/producer_with_restdocs/pom.xml[Gradle] samples.