Skip to content

Instantly share code, notes, and snippets.

@RawSanj
Created January 18, 2019 15:08
Show Gist options
  • Save RawSanj/4c2ef9966a9e91c160e3a02bf6a1cd98 to your computer and use it in GitHub Desktop.
Save RawSanj/4c2ef9966a9e91c160e3a02bf6a1cd98 to your computer and use it in GitHub Desktop.
Run maven commands on all Maven Projects inside a directory
#!/usr/bin/env bash
#Set the root directory
RootProjectDirectory=`pwd`
echo "Making all Maven Projects under '"${RootProjectDirectory}"' directory"
for project in `find . -name "pom.xml"`;
do
cd "${project/pom.xml/}";
$@;
cd $RootProjectDirectory;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment