Skip to content

Instantly share code, notes, and snippets.

@ljantzen
Created October 11, 2010 07:22
Show Gist options
  • Save ljantzen/620167 to your computer and use it in GitHub Desktop.
Save ljantzen/620167 to your computer and use it in GitHub Desktop.
m2 repo switcher
<mirror>
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<url>http://nexus:8100/nexus/content/groups/public</url>
</mirror>
</mirrors>
#!/bin/bash
# I keep this function in my .bashrc
function m2 {
if [ "$1" == "home" ] ; then
rm $HOME/.m2/settings.xml
ln -s $HOME/.m2/home.xml $HOME/.m2/settings.xml
fi
if [ "$1" == "work" ] ; then
rm $HOME/.m2/settings.xml
ln -s $HOME/.m2/work.xml $HOME/.m2/settings.xml
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment