Skip to content

Instantly share code, notes, and snippets.

@juergenhoetzel
Created February 19, 2011 11:14
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 juergenhoetzel/835002 to your computer and use it in GitHub Desktop.
Save juergenhoetzel/835002 to your computer and use it in GitHub Desktop.
Wrapper around original "mvn" Maven executable so you can trigger Maven goals from a subdir
#!/bin/bash
ORIG_MVN=/opt/maven/bin/mvn
while [ ! -r "pom.xml" ] && [ "$PWD" != "/" ]
do
cd ..
done
if [ -r "pom.xml" ]; then
exec ${ORIG_MVN} "$@"
else
echo "No pom.xml" >&2
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment