maven - 如何在 Exec Maven 插件执行中继续构建并且不会因错误而失败?
问题描述
尽管 Maven exec 插件添加的执行之一出错,如何使 Maven 构建继续?
解决方案
使用成功代码的示例解决方案:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>docker-rmi</id>
<phase>clean</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>docker</executable>
<workingDirectory>${project.basedir}</workingDirectory>
<arguments>
<argument>rmi</argument>
<argument>${project.groupId}/${project.artifactId}:${project.version</argument>
</arguments>
<successCodes>
<successCode>0</successCode>
<successCode>1</successCode>
</successCodes>
</configuration>
</execution>
</executions>
</plugin>
推荐阅读
- msmq - 集群中的 MSMQ
- mongodb - mongod.conf - bindIp 拒绝连接
- php - DomPDF 错误未捕获的异常“Dompdf\Exception”
- c# - 系统内存不足 C#
- elasticsearch - 解决 Elasticsearch 中 UpdateByQuery 的版本冲突
- excel - 无法设置 ListBox 类的 List 属性
- amazon-web-services - 在 Redshift UDF 中求和
- mysql - 从多个具有原点的相同表中选择
- php - 将 MySql 查询转换为 Laravel
- sql - 尝试使用 CASE WHEN THEN 进行 GROUP BY - postgresql