JBoss-CLI "deploy -l" always returns exit code 1 even when it succeeds

Solution Unverified - Updated

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:

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.

Tags

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.