如何在 Exec Maven 插件执行中继续而不失败构建错误?

rob*_*rse 3 maven-3 maven maven-exec-plugin

尽管 Maven exec 插件添加的执行之一出现错误,如何才能使 Maven 构建继续进行?

https://www.mojohaus.org/exec-maven-plugin/usage.html

rob*_*rse 6

使用成功代码的示例解决方案:

<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>
Run Code Online (Sandbox Code Playgroud)