WAD watches changes in src\main\
folder by default or on the specified folders that are given through cmd args, builds the project using the pom.xml
and deploys the ThinWAR into the configured folder.
Download the executable and self-contained wad.jar
[THIN_WAR]/java -jar wad.jar [DEPLOYMENT_DIR ANOTHER_DIR]
e.g.
[THIN_WAR]/java -jar wad.jar /openliberty/wlp/usr/servers/defaultServer/dropins/ dist
or [THIN_WAR]/java -jar wad.jar [DEPLOYMENT_DIR ANOTHER_DIR] watchPaths=[ABSOLUTE_PATH_TO_SRC_MAIN],[ABSOLUTE_PATH_TO_SRC_MAIN]
wad can be also configured in ~/.wadrc
. Each deployment folder in an new line:
/Users/duke/payara/glassfish/domains/domain1/autodeploy
/Users/duke/openliberty/usr/servers/defaultServer/dropins
/Users/duke/tomee/webapps
/Users/duke/wildfly/standalone/deployments
On each source change WAD will:
- Use the current directory as the service name if the
pom.xml
does not contain a<project><build><finalName>
entry. - Build the project using the
pom.xml
found in the directory - Copy the
./target/[name].war
into the path used as parameter
You only have to write code and save it frequently like this:
WildFly wildfly-[VERSION].Final/standalone/deployments
OpenLiberty openliberty-[VERSION]/usr/servers/defaultServer/dropins
Payara payara/glassfish/domains/domain1/autodeploy
TomEE tomee-[version]/webapps
WAD also supports simultaneous deployment to multiple servers
[THIN_WAR]/java -jar wad.jar /openliberty/wlp/usr/servers/defaultServer/dropins/ wildfly/standalone/deployments payara/glassfish/domains/domain1/autodeploy tomee/webapps
A a shell script:
#!/bin/bash
BASEDIR=$(dirname $0)
java -jar ${BASEDIR}/wad.jar "$@"%
will install WAD "globally". Now you can launch WAD from any directory you like e.g.
wad.sh /openliberty/wlp/usr/servers/defaultServer/dropins/
"Improved Java / Jakarta EE Productivity with wad.sh" by @rieckpil