display file inside a jar
To display file inside a jar:
First, locate the file inside the jar
$> jar tf artifact.jar | grep "web.xml"
webroot/WEB-INF/web.xml
Then use unzip (with -p option)
$> unzip -p artifact.jar webroot/WEB-INF/web.xml | less
Or in one command
$> jar tf artifact.jar | grep "web.xml" | xargs unzip -p artifact.jar
# or
$> unzip -p artifact.jar $(jar tf artifact.jar | grep "web.xml")
Note: unzip option -p: extract files to pipe, no messages