When working at home on maven stuff, to make your life easy for you you can take your local repo with you on a thumb drive. I used rsync to move the files to the drive, but I don't necessarily want to pull them off like that.
With maven you can simply put in a new entry into your settings.xml file to pull from your thumb drive like this:
<mirrors>
<mirror>
<mirrorOf>central</mirrorOf>
<name>thumb</name>
<url>file:///path/to/thumb/repository</url>
<id>my-thumb</id>
</mirror>
</mirrors>
And that's it. This is also useful when you're "cleaning up" your local repo. Instead of deleting it and redownloading it all from a corp repo, you can copy your existing repo to something like ~/old_repo/ and point to that as your first repo. I have not *actually* tried it. That's a post for another day. :-D
Update: One downside of this is that it appears that snapshots are not pulled in. It might be better to just up some repositories that point to the thumb drive rather than using the mirror.
No comments:
Post a Comment