A far easier solution (IMO) would be to simply have 2 mvn.bat files and hard-code an alternative settings.xml file in the second one. So you'd have mvn.bat and the default settings.xml file for your work projects, plus mvnp.bat with a hardcoded "-s settings-personal.xml" in the second one.
mvn -? shows -s,--settings Alternate path for the user settings file So mvn -s ~/settings-personal.xml would do what you want, also. Wayne On Sun, Sep 7, 2008 at 11:09 AM, Benjamin Smith-Mannschott <[EMAIL PROTECTED]> wrote: > In the office, we're using maven with a nexus proxy. Let's call it luzifer. > With copious help from Sonatype's book, I've gotten my settings.xml > (attached) to the point where builds at work are smart enough to route all > their artifact lookups through luzifer:8081. > > I've defined a pom (attached) project "distribution-management" which > contains the proper incantations to cause mvn deploy to upload things to the > nexus repo on luzifer. Every "work" project has this as a direct or indirect > parent. > > I write java programs in my free time too and I'd like to be able to use > maven there as well. I don't want to be forced to move my "work" stuff to a > separate user on my notebook. I'd rather avoid having two .m2 directories > and performing a renaming dance everytime I want to switch between building > "for work" and building "for home". > > I hit upon the idea of setting up a local nexus on my notebook for home. So > now nexus is running there. Let's call that one localhost. > > What I think I need is some combination of profile-magic-pixie-dust in > settings.xml and a an analog to distribution-management for home which I'll > use as an ancestor for my "home" projects. > > The difficulty is that I don't *really* understand what I'm doing well > enough to accomplish this without a lot of unproductive flailing. Surely > someone else must be in a similar situation. Anyone care to donate a little > clue? > > (I'm not married to the idea of having a nexus at home. I could work must > from the .m2. Still it would be nice to be able to trash my .m2/repository > and have it repopulate from my at-home nexus witout taxing my internet > bill.) > > // Ben > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
