Skip to content

Instantly share code, notes, and snippets.

@nitrocode
Created August 20, 2015 05:42
Show Gist options
  • Save nitrocode/9400d8a5acf0cadffd3e to your computer and use it in GitHub Desktop.
Save nitrocode/9400d8a5acf0cadffd3e to your computer and use it in GitHub Desktop.
Creates a TomCat or JBoss compressed and deployable WAR file
#!/bin/bash
# Usage: ./create-war.sh DIRECTORY WARFILE
# e.g. ./create-war.sh Siesta Siesta.war
DIRECTORY=$1
WARFILE=$2
cd $DIRECTORY/WebContent
jar -cf ../../$WARFILE *
cd -
ls -l $WARFILE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment