0

我有一个包含多个模块的 Maven 项目,但我只想将一个部署到我的远程存储库服务器。我试图将它放在distributionManagement我要部署的模块的 pom 中,但它只能放在主 pom 中。我怎么能这样做?

谢谢你。

编辑:通过放置固定

<build>
  <pluginManagement>
    <plugins>
      <plugin>
        <artifactId>maven-deploy-plugin</artifactId>
        <version>3.0.0-M1</version>
        <configuration>
          <skip>true</skip>
        </configuration>
      </plugin>
    </plugins>
  </pluginManagement>
</build>

到我不想部署的模块。

4

2 回答 2

0

使这个模块成为一个独立的项目。从其 pom 文件中删除父部分。

于 2020-08-25T05:47:53.427 回答
0

您可以通过在所有其他模块中将 maven deploy 插件的 skip 属性设置为 true 来做到这一点。

但是:如果你以后只需要一个模块,为什么它是多模块项目?不应该分开吗?

于 2020-08-25T06:55:44.673 回答