6.2. Use the Examples with the Command Line

Once the source for the examples is obtained, you can build the application with Maven and deploy it to a platform. The examples are all web applications so you can view the running application in a web browser. The procedure details the steps for building, deploying to JBoss EAP and viewing an application.
The procedure assumes that JBoss EAP is already installed and Maven is configured to use the JBoss EAP and JBoss Web Framework Kit Maven repositories.

Procedure 6.1. Use the Examples with the Command Line

  1. On the command line, navigate to the directory of a specific example, where the pom.xml file for the example is located.
  2. Compile the Maven-based example to verify it builds successfully
    $ mvn compile
  3. Start JBoss EAP
    For Linux and OS X $ EAP_HOME/bin/standalone.sh
    For Windows        $ EAP_HOME\bin\standalone.bat
  4. Build and deploy the application to JBoss EAP
    $ mvn clean install jboss-as:deploy
  5. View the deployed application in a web browser at http://localhost:8080/application_name/, where application_name is replaced by the name of your application.

Note

Some examples have additional deployment requirements and steps. If the above procedure does not result in successful deployment of an example, check the README.md file distributed with the example for any additional deployment information.