maven - 用 maven-deploy-plugin 替换 nexus staging maven 插件

标签 maven nexus

我们的项目从我们无法控制的父 pom 继承了 nexus staging maven 插件。我在我的根 pom 中有这个配置来禁用 nexus staging maven 插件,这个配置似乎禁用了默认部署执行。

<plugin>
          <groupId>org.sonatype.plugins</groupId>
          <artifactId>nexus-staging-maven-plugin</artifactId>
          <executions>
            <execution>
              <id>default-deploy</id>
              <phase>none</phase>
            </execution>
          </executions>
          <configuration>
            <serverId>nexus</serverId>
            <nexusUrl>url</nexusUrl>
            <skipNexusStagingDeployMojo>true</skipNexusStagingDeployMojo>
          </configuration>
        </plugin>

我在我的根 pom 中定义了 maven deploy 插件,但是 maven-deploy 插件似乎没有启动
<plugin>
        <artifactId>maven-deploy-plugin</artifactId>
        <version>2.7</version>
        <executions>
          <execution>
            <id>default-deploy</id>
            <phase>deploy</phase>
            <goals>
              <goal>deploy</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

我不知道如何用 maven deploy 插件替换继承的 nexus staging maven 插件。任何帮助深表感谢

最佳答案

您可以通过插件 groupID:artefactID 限定目标:

mvn org.apache.maven.plugins:maven-deploy-plugin:deploy

关于maven - 用 maven-deploy-plugin 替换 nexus staging maven 插件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50509571/

相关文章:

android - 如何读取gradle生成的依赖树

java - 从远程位置动态加载 jar

ansible - 通过 Ansible 从 A nexus repo 获取最新的 war 文件

maven - 如何将 "--add-exports"编译器指令添加到 Maven 编译中

java - Spring MVC,Tile在运行war文件jetty Runner时不渲染jsp页面

maven - Grails版本插件Maven部署不会始终更新maven-metadata.xml中的<latest>标签

maven - 如何让 Nexus 获取代理存储库中的 Artifact 文件?

android - Maven依赖解析问题

java - 尝试将 Artifact 上传到 Nexus 2.9 时出错

docker - 带有 dockerization 的 Nexus 存储库配置