Created
March 6, 2021 02:49
-
-
Save justin-lyon/5d7d48fc7c9a034f43bae0446f27235a to your computer and use it in GitHub Desktop.
Java Build Commands
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
# These are some Java and Maven commands I want to keep handy | |
# Create a clean package, wipes out /target, compiles, runs tests, and generates a brand new .jar | |
mvn clean package | |
# Run the jar | |
java -jar target/myapp.jar | |
# List the contents of the jar | |
jar tf target/myapp.jar | |
# Extract from jar to cwd | |
jar xf path/to/myapp.jar | |
# Extract one file (META-INF/MANIFEST.MF) from jar to cwd | |
jar xf path/to/myapp.jar META-INF/MANIFEST.MF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment