Manipulating JARs, WARs, and EARs on the command line

The NixMash Blog app is currently packaged as a Fat War with Gradle and the Spring plugin bootRepackage task. It is then copied to a Linode Cloud server running Ubuntu. You can read more about the process in this NixMash post.

With bash deployment scripts (details in this NixMash post), updating the app is really easy but can take a minute or two to complete the process. But SSH to the remote server and updating a .CSS file or something at the command line is definitely a smart play when possible.

# List and extract the file...

$ jar -tf nixmashSpring.war
$ jar -xvf nixmashSpring.war WEB-INF/classes/static/css/github.css
 
# update the file and replace in the WAR...

$ jar -uvf nixmashSpring.war WEB-INF/classes/static/css/github.css
Posted April 05, 2017 04:55 PM EDT

More Like This Post