Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-1198

CLI does not resolve multiple properties if one property is undefined

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Major
    • Resolution: Done
    • 2.0.4.Final
    • 2.0.5.Final
    • CLI
    • None

    Description

      https://bugzilla.redhat.com/show_bug.cgi?id=1289316 description:

      Multiple property substitution is working with EAP 6.4.3+, however, if a variable amongst the multiple variables is empty or has no value, then the subsequent property in the CLI command is not substituted. 
      
      For example : 
      cat props.properties 
      -----------------------------------------
      PROFILE-NAME=TestProfile
      SERVER-INSTANCE-NUMBER=TestInstance
      APP-VERSION=
      VAR=test
      -----------------------------------------
      
      cat test.cli :
      ---------------------------------------
      /host=master/server-config=${PROFILE-NAME}${APP-VERSION}${SERVER-INSTANCE-NUMBER}${VAR}:add(auto-start=true, group="${PROFILE-NAME}${APP-VERSION}-server-group")
      ---------------------------------------
      
      and if I execute "./jboss-cli.sh --connect --file=test.cli --properties=props.properties" then I have the following in the host.xml ": 
      
      ----------
      ...
      <server name="TestProfile${SERVER-INSTANCE-NUMBER}test" group="TestProfile-server-group" auto-start="true"/>
      ...
      -----------
      
      Note APP-VERSION had no value, and so the subsequent SERVER-INSTANCE-NUMBER was not properly resolved
      

      Attachments

        Issue Links

          Activity

            People

              chaowan@redhat.com Chao Wang
              chaowan@redhat.com Chao Wang
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: