Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Maven settings activator
#!/bin/bash
PROFILE=$1
MVN_HOME=~/.m2
SETTINGS_FILE=settings.xml
SETTINGS="${MVN_HOME}/${SETTINGS_FILE}"
if [ -z "$1" ]; then
rm -f "${SETTINGS}"
else
ln -sf "$1-${SETTINGS_FILE}" "${SETTINGS}"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment