Last active
December 19, 2015 00:25
-
-
Save ejlp12/0b1bad697d775b607308 to your computer and use it in GitHub Desktop.
Start single WAR application using JBoss EAP - Use for simply testing a WAR file started in new JBoss EAP runtime
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Start single WAR application using JBoss EAP | |
if [ "$#" -ne 1 ]; then | |
printf "Illegal number of parameters\n usage: \$0 <EAP_HOME> <PORT_OFFSET> <WAR_FILE>\n" | |
exit 1 | |
fi | |
JBOSS_HOME=$1 | |
PORT_OFFSET=$2 | |
WAR=$3 | |
rm -rf /tmp/standalone.1/ | |
mkdir /tmp/standalone.1/ | |
mkdir /tmp/standalone.1/configuration /tmp/standalone.1/data /tmp/standalone.1/deployments /tmp/standalone.1/lib /tmp/standalone.1/log /tmp/standalone.1/tmp | |
cp -v $JBOSS_HOME/standalone/configuration/*.xml $JBOSS_HOME/standalone/configuration/*.properties /tmp/standalone.1/configuration/ | |
cp -v $WAR /tmp/standalone.1/deployments | |
$JBOSS_HOME/bin/add-user.sh -sc /tmp/standalone.1/configuration/ -dc x -u admin -g admin -p Passw0rd! | |
$JBOSS_HOME/bin/standalone.sh -b=0.0.0.0 -Djboss.server.base.dir=/tmp/standalone.1/ -Djboss.socket.binding.port-offset=$PORT_OFFSET | |
rm -rf /tmp/standalone.1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment