我正在使用 Maven 发布插件。问题很简单:我不想在发布时进行部署:执行。我实际上想执行一个 shell 脚本来为我进行部署。所以我有两件事要完成:
这是我的pom:
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.0</version>
<configuration>
<tagBase>svn://saoj-la.dyndns.org/webapp-test/tags</tagBase>
<connectionUrl>scm:svn:svn://saoj-la.dyndns.org/webapp-test/trunk</connectionUrl>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>/bin/sh</executable>
<arguments>
<argument>run.sh</argument>
</arguments>
</configuration>
</plugin>
最佳答案
有点晚了,但供引用:
对于您的第 1 步,您可以使用“跳过”选项禁用 Maven 部署步骤。点击here以供引用。
在命令行上,您可以调用类似:
mvn release:perform -Darguments="-Dmaven.deploy.skip=true"
关于maven-2 - Maven 发布 :perform without deploy and calling an external shell script,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3445075/