Search code examples
jbosswildfly-10

Using multiple --properties arguments via JBoss CLI


I would like to know, if is possible to run following command (or something like this) with more than one properties file in --properties argument.

$JBOSS_HOME/bin/jboss-cli.sh --connect --user=admin --password=admin --properties=init.properties --properties=jvm.properties --file=init.cli

or

$JBOSS_HOME/bin/jboss-cli.sh --connect --user=admin --password=admin --properties=init.properties jvm.properties --file=init.cli

Solution

  • Yes, you can! You were actually right in your first given example.


    Here's a non-practical illustration:

    hello.properties

    hello=Hello from the
    

    world.properties

    world='Second' property file
    

    echo.cli

    set hello=${hello}
    set world=${world}
    echo $hello $world
    

    Running:

    $ $JBOSS_HOME/bin/jboss-cli.sh --connect --properties=hello.properties --properties=world.properties --file=echo.cli
    Hello from the 'Second' property file