...
Build the WAR file. The application must be packaged into a WAR file (Web Application Archive) on the server. Use the maven-war-plugin shipped with Jtest to package the application. The plugin automatically builds applications with the correct WAR structure. Execute the following command in the application directory:
Code Block |
---|
mvnmvnw clean install |
Step 2: Deploying Example to an Application Server
...
- Run the following command to create an admin (Management role) user:
Code Block ./add-user.sh
- Configure the secondary host. Edit the domain/configuration/host-slave.xml file (or copy the existing one from this directory).
- Change the management port to '19999':
Code Block <management-interfaces> <native-interface security-realm="ManagementRealm"> <socket interface="management" port="${jboss.management.native.port:19999}"/> </native-interface> </management-interfaces>
- In the 'main-server-group', add the 'auto-start' option:
Code Block <server name="server-one" group="main-server-group" auto-start="true"/>
- Change the management port to '19999':
- Start the Domain Controller (primary host):
Code Block ./domain.sh --host-config=host-master.xml
- In a separate console, start the secondary host:
Code Block ./domain.sh --host-config=host-slave.xml -Djboss.domain.master.address=127.0.0.1
- Deploy the application in one of the two ways:
- Run the following:
Code Block deploy /path/to/calculator.war --server-groups=main-server-group
- Open the Administration Console (http://localhost:9990/console/App.html#domain-deployments), and deploy and assign the application to 'main-server-group'.
- Run the following:
Verify that the application is running by visiting: http://localhost:8080/Calculator/
...
Execute the following command in the example application’s main directory:
Code Block |
---|
mvnmvnw package jtest:monitor |
The goal generates the monitor.zip package, which contains artifacts necessary for collecting application coverage.
...