Book Image

WildFly Cookbook

Book Image

WildFly Cookbook

Overview of this book

Table of Contents (23 chapters)
WildFly Cookbook
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Executing commands in batch mode via the CLI


In this recipe, we will learn how to invoke commands in the batch mode. Actually, you can declare and prepare a list of commands to execute, and execute them sequentially at once. The batch mode gives you consistency among your operations and configuration.

Getting ready

Get our WildFly instance up and running; from the folder where we downloaded the GitHub repository, WFC/github/wildfly-cookbook, copy the example.war and simple.war applications into the $JBOSS_HOME folder and connect to the CLI.

If you can find the applications, you probably need to compile the projects. I'll show you how to do it for the simple application, and the same applies to the others. Open a terminal and do as follows:

$ cd ~/WFC/github/wildfly-cookbook
$ cd simple
$ mvn -e clean package
   
$ cp target/simple.war ~/WFC/wildfly/

How to do it…

We are going to do the following operation in sequence:

  1. Deploy example.war.

  2. Deploy simple.war.

  3. Let's go to the CLI:

    $ cd ~/WFC/wildfly
    ...