If you find yourself wishing you could support multiple maven repositories on a single development box:
the good news is you can easily start using different maven repositories on a single box by using the "-s" or "--settings" option.
For example:
alias my-mvn="mvn -s ~/.m2/my-settings.xml"
Then in the my-settings.xml I specify the localRepository
:
1
2
3
4
5
6
7
8
9
<br />
<?xml version="1.0" encoding="UTF-8"?></p>
<p><settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"<br />
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"<br />
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"><br />
<localRepository>/path/to/homedir/.m2/my-repository</localRepository><br />
<interactiveMode>true</interactiveMode><br />
<offline>false</offline></p>
<p></settings><br />
Et voila! Seamless builds for my-mvn ending up in a separate repository.