JBoss-CLI "deploy -l" always returns exit code 1 even when it succeeds
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6.x
- 7.x
Issue
CLI command deploy -l results always returns 1 even if it succeeded.
For example, it can be seen by following steps:
$ /JBOSS_HOME/bin/jboss-cli.sh -c --command="deploy -l"
NAME RUNTIME-NAME ENABLED STATUS
testapp.war testapp.war true OK
$ echo $?
1
Resolution
This issue is reported in the following buzgilla and JIRAs:
- EAP 6.4.x: This content is not included.BZ#1224170 which was fixed in EAP 6.4.15 or later
- EAP 7.0.z: Content from issues.jboss.org is not included.JBEAP-9135 which will be fixed in EAP 7.0.6 or later
- EAP 7.1.0: Content from issues.jboss.org is not included.JBEAP-9134
- Upstream (WildFly): Content from issues.jboss.org is not included.WFCORE-2330
Please ignore the exit code for the command deploy -l until the above issue is fixed.
Root Cause
The result string for command line is correct, but only failed to return exit code correctly.
SBR
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.