wildfly:execute-commands

Full name:

org.wildfly.plugins:wildfly-maven-plugin:1.1.0.Beta1:execute-commands

Description:

Execute commands to the running WildFly Application Server. Commands should be formatted in the same manor CLI commands are formatted. Executing commands in a batch will rollback all changes if one command fails.
     <batch>true</batch>
     <fail-on-error>false</fail-on-error>
     <commands>
         <command>/subsystem=logging/console=CONSOLE:write-attribute(name=level,value=DEBUG)</command>
     </commands>

Attributes:

  • Requires a Maven project to be executed.
  • The goal is thread-safe and supports parallel builds.

Optional Parameters

Name Type Since Description
batch boolean - true if commands should be executed in a batch or false if they should be executed one at a time.
Default value is: false.
User property is: wildfly.batch.
commands List - The CLI commands to execute.
User property is: wildfly.commands.
executeCommands Commands - Deprecated. Use the <commands/>, <scripts/> and <batch/> configuration parameters
failOnError boolean - Indicates whether or not subsequent commands should be executed if an error occurs executing a command. A value of false will continue processing commands even if a previous command execution results in a failure.
Default value is: true.
User property is: wildfly.failOnError.
hostname String - Specifies the host name of the server where the deployment plan should be executed.
Default value is: localhost.
User property is: wildfly.hostname.
id String - Specifies the id of the server if the username and password is to be retrieved from the settings.xml file
User property is: wildfly.id.
jbossHome String - The WildFly Application Server's home directory. This is not required, but should be used for commands such as module add as they are executed on the local file system.
User property is: jboss-as.home.
password String - Specifies the password to use if prompted to authenticate by the server. If no password is specified and the server requests authentication the user will be prompted to supply the password,
User property is: wildfly.password.
port int - Specifies the port number the server is listening on.
Default value is: 9990.
User property is: wildfly.port.
propertiesFiles List - The properties files to use when executing CLI scripts or commands.
protocol String - The protocol used to connect to the server for management.
User property is: wildfly.protocol.
scripts List - The CLI script files to execute.
User property is: wildfly.scripts.
skip boolean - true if commands execution should be skipped.
Default value is: false.
User property is: wildfly.skip.
systemProperties Map - The system properties to be set when executing CLI commands.
timeout int - The timeout, in seconds, to wait for a management connection.
Default value is: 60.
User property is: wildfly.timeout.
username String - Specifies the username to use if prompted to authenticate by the server. If no username is specified and the server requests authentication the user will be prompted to supply the username,
User property is: wildfly.username.

Parameter Details

batch:

true if commands should be executed in a batch or false if they should be executed one at a time.
  • Type: boolean
  • Required: No
  • User Property: wildfly.batch
  • Default: false

commands:

The CLI commands to execute.
  • Type: java.util.List
  • Required: No
  • User Property: wildfly.commands

executeCommands:

Deprecated. Use the <commands/>, <scripts/> and <batch/> configuration parameters
The commands to execute.

Note that if defined the commands, scripts and fail-on-error parameters outside of this configuration property are ignored.

  • Type: org.wildfly.plugin.cli.Commands
  • Required: No

failOnError:

Indicates whether or not subsequent commands should be executed if an error occurs executing a command. A value of false will continue processing commands even if a previous command execution results in a failure.
  • Type: boolean
  • Required: No
  • User Property: wildfly.failOnError
  • Default: true

hostname:

Specifies the host name of the server where the deployment plan should be executed.
  • Type: java.lang.String
  • Required: No
  • User Property: wildfly.hostname
  • Default: localhost

id:

Specifies the id of the server if the username and password is to be retrieved from the settings.xml file
  • Type: java.lang.String
  • Required: No
  • User Property: wildfly.id

jbossHome:

The WildFly Application Server's home directory. This is not required, but should be used for commands such as module add as they are executed on the local file system.
  • Type: java.lang.String
  • Required: No
  • User Property: jboss-as.home

password:

Specifies the password to use if prompted to authenticate by the server. If no password is specified and the server requests authentication the user will be prompted to supply the password,
  • Type: java.lang.String
  • Required: No
  • User Property: wildfly.password

port:

Specifies the port number the server is listening on.
  • Type: int
  • Required: No
  • User Property: wildfly.port
  • Default: 9990

propertiesFiles:

The properties files to use when executing CLI scripts or commands.
  • Type: java.util.List
  • Required: No

protocol:

The protocol used to connect to the server for management.
  • Type: java.lang.String
  • Required: No
  • User Property: wildfly.protocol

scripts:

The CLI script files to execute.
  • Type: java.util.List
  • Required: No
  • User Property: wildfly.scripts

skip:

true if commands execution should be skipped.
  • Type: boolean
  • Required: No
  • User Property: wildfly.skip
  • Default: false

systemProperties:

The system properties to be set when executing CLI commands.
  • Type: java.util.Map
  • Required: No

timeout:

The timeout, in seconds, to wait for a management connection.
  • Type: int
  • Required: No
  • User Property: wildfly.timeout
  • Default: 60

username:

Specifies the username to use if prompted to authenticate by the server. If no username is specified and the server requests authentication the user will be prompted to supply the username,
  • Type: java.lang.String
  • Required: No
  • User Property: wildfly.username