Skip to content

Instantly share code, notes, and snippets.

@conbon
Created July 24, 2020 09:28
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 conbon/85c73e5a9bd05a00f7c53e9ec9418ef2 to your computer and use it in GitHub Desktop.
Save conbon/85c73e5a9bd05a00f7c53e9ec9418ef2 to your computer and use it in GitHub Desktop.
# iterate dir and perform mvn commands across all subdirs - in this example 'mvn clean'
for folder in */; do folder=${folder%*/}; cd $folder; if [[ -f "pom.xml" ]]; then mvn clean; else echo "not a maven project"; fi; cd ..; done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment