我们的项目从一个我们无法控制的父pom继承了nexus maven插件。我在我的根pom中使用了这个配置来禁用nexus 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部署插件,但是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部署插件替换继承的nexus maven插件。任何帮助都是非常感谢的。
发布于 2020-02-12 23:05:15
您可以通过插件groupID:artefactID来限定目标
mvn org.apache.maven.plugins:maven-deploy-plugin:deploy发布于 2021-09-27 13:22:47
我遇到了类似的问题,为了成功禁用nexus-staging-maven-plugin,我只需要在我的主pom中添加以下内容:
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<extensions>false</extensions>
</plugin>由于我的一个依赖项是禁用maven-deploy-plugin(我建议在您的项目中也检查它),我还需要添加:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>false</skip>
</configuration>
</plugin>https://stackoverflow.com/questions/50509571
复制相似问题