Skip to content

Instantly share code, notes, and snippets.

@sleclercq
Created April 20, 2019 14:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sleclercq/2d5a17280b2029b37c9015cd55f48cc3 to your computer and use it in GitHub Desktop.
Save sleclercq/2d5a17280b2029b37c9015cd55f48cc3 to your computer and use it in GitHub Desktop.
# Calls ./mvnw if found, otherwise execute the original mvn
mvn-or-mvnw() {
if [ -x ./mvnw ]; then
echo "executing mvnw instead of mvn"
./mvnw "$@"
else
command mvn "$@"
fi
}
# either use orignal mvn or the mvn wrapper
alias mvn="mvn-or-mvnw"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment