如何定义Maven失败的条件?

How to define the condition of Maven fail?

我使用名为 exec-maven-plugin 的 Maven 插件来执行名为 ldapmodify 的外部 LDAP 脚本。但是,即使此脚本执行成功,Maven 安装也会失败。这是我 运行 Maven 安装时的输出:

INFO] --- exec-maven-plugin:1.4.0:exec (default) @ entity-matching-bootstrap ---
ldap_connect_to_host: TCP localhost:389
ldap_new_socket: 508
ldap_prepare_socket: 508
ldap_connect_to_host: Trying ::1 389
ldap_pvt_connect: fd: 508 tm: -1 async: 0
attempting to connect: 
connect success
ldap_add: Already exists (68)
adding new entry "dc=my-domain,dc=com"

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.969 s
[INFO] Finished at: 2018-10-24T15:29:49-04:00
[INFO] Final Memory: 26M/63M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.4.0:exec (default) on project entity-matching-bootstrap: Command execution failed. Process exited with an error: 68 (Exit value: 68) -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

执行脚本的结果是LDAP中已经存在我要添加的条目。 return 代码 68 被 Maven 视为失败。是否可以在这种情况下设置 Maven 或 exec-maven-plugin 不失败?谢谢

Exec Maven Plugin / exec:exec:

successCodes   int[]   Exit codes to be resolved as successful execution for non-compliant applications (applications not returning 0 for success).