首页 > 解决方案 > 我怎样才能只将特定模块部署到我的远程存储库?

问题描述

我有一个包含多个模块的 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>

到我不想部署的模块。

标签: javamavendeploymentmoduleremote-repository

解决方案


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


推荐阅读