JBoss EAP 6 CLI module command inside an if/then executes even when the if statement resolves in false

Solution Verified - Updated -

Issue

I'm trying to accomplish the following JBoss cli script:

if (outcome == failed) of /system-property=jsf-2.2.7/:read-resource
    /system-property=jsf-2.2.7/:add(value=1)
    module add --name=javax.faces.api --slot=mojarra-2.2.7 --resources=src/main/resources/jsf-module/jsf-api-2.2.7.jar --module-xml=src/main/resources/jsf-module/mojarra-api-module.xml
end-if

However, even when the system-property=jsf-2.2.7 is already set, the module add is still executed, which should not be the case. In other words, even when the if conditional should return false, the command module is executed.

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content