Re: Running two builds of the same branch simultaneously
On Thu, Mar 20, 2008 at 3:36 AM, Dan Fabulich [EMAIL PROTECTED] wrote: Brian E. Fox wrote: Samuel Le Berrigaud wrote: 1. only run mvn verify, this way nothing gets installed into the local repository, This doesn't work in a multi-module reactor build where the modules depend on each other, does it? No, it will only work if you at least do compile (then a reference to /target/classes is passed instead of the jar) Huh? verify is after compile, right before install. (Actually, I did package, then later tried verify to see if it would work; neither did.) Should that have worked? -Dan Are you using maven-dependency-plugin at all? if you are then you should be using the copy-dependencies or unpack-dependencies goals and not the copy or unpack goals for those dependencies that come from the reactor, otherwise the build will fail as you describe -Stephen
Re: Running two builds of the same branch simultaneously
You could do the following... Copy ~/.m2/settings.xml to ~/.m2/settingsy.xml Configure localRepository in settingsy.xml to point somewhere else Copy MAVEN_HOME/bin/mvn.bat to mvny.bat Edit mvny.bat and append -f ~/.m2/settingsy.xml to the call to mvn Then call normal mvn from X, and mvny from Y. This will automatically use the 2 localRepositories without messing with poms or logging in as 2 users etc. You just have to remember to use mvn in one window and mvny in the other. Wayne On 3/19/08, Dan Fabulich [EMAIL PROTECTED] wrote: Brian E. Fox wrote: Samuel Le Berrigaud wrote: 1. only run mvn verify, this way nothing gets installed into the local repository, This doesn't work in a multi-module reactor build where the modules depend on each other, does it? No, it will only work if you at least do compile (then a reference to /target/classes is passed instead of the jar) Huh? verify is after compile, right before install. (Actually, I did package, then later tried verify to see if it would work; neither did.) Should that have worked? -Dan - 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]
Re: Running two builds of the same branch simultaneously
You could do even better! in X create mvn.bat that is just @echo off %MAVEN_HOME%\bin\mvn.bat -s %USERPROFILE%\.m2\settings-x.xml %* create mvn.sh that is just #!/bin/sh $MAVEN_HOME/bin/mvn -s ~/.m2/settings-x.xml $* in Y create mvn.bat that is just @echo off %MAVEN_HOME%\bin\mvn.bat -s %USERPROFILE%\.m2\settings-y.xml %* create mvn.sh that is just #!/bin/sh $MAVEN_HOME/bin/mvn -s ~/.m2/settings-y.xml $* Now whichever window you are in, running mvn or ./mvn.sh will use the correct settings.xml and will not require remembering which command to launch from which window. You can even check these batch and shell scripts into SCM so that the release plugin will not complain about them. -Stephen P.S. you could make them even more portable by having them check for the settings-x.xml and settings-y.xml and reverting to defaults if those settings are not present On Thu, Mar 20, 2008 at 7:47 AM, Wayne Fay [EMAIL PROTECTED] wrote: You could do the following... Copy ~/.m2/settings.xml to ~/.m2/settingsy.xml Configure localRepository in settingsy.xml to point somewhere else Copy MAVEN_HOME/bin/mvn.bat to mvny.bat Edit mvny.bat and append -f ~/.m2/settingsy.xml to the call to mvn Then call normal mvn from X, and mvny from Y. This will automatically use the 2 localRepositories without messing with poms or logging in as 2 users etc. You just have to remember to use mvn in one window and mvny in the other. Wayne On 3/19/08, Dan Fabulich [EMAIL PROTECTED] wrote: Brian E. Fox wrote: Samuel Le Berrigaud wrote: 1. only run mvn verify, this way nothing gets installed into the local repository, This doesn't work in a multi-module reactor build where the modules depend on each other, does it? No, it will only work if you at least do compile (then a reference to /target/classes is passed instead of the jar) Huh? verify is after compile, right before install. (Actually, I did package, then later tried verify to see if it would work; neither did.) Should that have worked? -Dan - 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]
RE: Running two builds of the same branch simultaneously
That's right about the dep plugin and others that expect to manipulate a jar (if you wanted me to copy a jar, what should I do when I'm handed a folder with classes?). In compile of a reactor build, you get a handle to the classes folder, package will get you a handle to the jar in the target folder and install+ will get you a handle to the jar in the local repo. -Original Message- From: Stephen Connolly [mailto:[EMAIL PROTECTED] Sent: Thursday, March 20, 2008 2:00 AM To: Maven Users List Subject: Re: Running two builds of the same branch simultaneously On Thu, Mar 20, 2008 at 3:36 AM, Dan Fabulich [EMAIL PROTECTED] wrote: Brian E. Fox wrote: Samuel Le Berrigaud wrote: 1. only run mvn verify, this way nothing gets installed into the local repository, This doesn't work in a multi-module reactor build where the modules depend on each other, does it? No, it will only work if you at least do compile (then a reference to /target/classes is passed instead of the jar) Huh? verify is after compile, right before install. (Actually, I did package, then later tried verify to see if it would work; neither did.) Should that have worked? -Dan Are you using maven-dependency-plugin at all? if you are then you should be using the copy-dependencies or unpack-dependencies goals and not the copy or unpack goals for those dependencies that come from the reactor, otherwise the build will fail as you describe -Stephen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Running two builds of the same branch simultaneously
I'm working on a multi-module reactor project that has a long build. I'd like to be able to sync down two copies of trunk (X and Y), do a little bit of work in X, and start building X. While X builds, I'd like to go over to Y, do a little bit of work in Y, and kick off a build of Y. The problem with this is the local repository: my X changes may incorrectly commingle with my Y changes. Can anyone suggest a way to make this work? If possible, I'd prefer not to have to login to my box as two separate users to make this work. (FYI, I'm on Windows XP.) -Dan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Running two builds of the same branch simultaneously
Hi Dan, I see two solutions to this: 1. only run mvn verify, this way nothing gets installed into the local repository, 2. or run the maven command specifying the local repository on the command line. Use separate repositories for each build. I don't remember the property to use on the command line to specify the repository but I believe this is possible. Anyone? Hope this helps, SaM On Thu, Mar 20, 2008 at 2:01 PM, Dan Fabulich [EMAIL PROTECTED] wrote: I'm working on a multi-module reactor project that has a long build. I'd like to be able to sync down two copies of trunk (X and Y), do a little bit of work in X, and start building X. While X builds, I'd like to go over to Y, do a little bit of work in Y, and kick off a build of Y. The problem with this is the local repository: my X changes may incorrectly commingle with my Y changes. Can anyone suggest a way to make this work? If possible, I'd prefer not to have to login to my box as two separate users to make this work. (FYI, I'm on Windows XP.) -Dan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Samuel Le Berrigaud
Re: Running two builds of the same branch simultaneously
On Wed, Mar 19, 2008 at 8:01 PM, Dan Fabulich [EMAIL PROTECTED] wrote: The problem with this is the local repository: my X changes may incorrectly commingle with my Y changes. Can anyone suggest a way to make this work? If possible, I'd prefer not to have to login to my box as two separate users to make this work. (FYI, I'm on Windows XP.) You can use -Dmaven.repo.local=... to specify a different local repository on the command line. (As you've discovered, there is no locking in the local repo, and concurrent builds using the same local repo are not supported.) -- Wendy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Running two builds of the same branch simultaneously
Wendy Smoak wrote: You can use -Dmaven.repo.local=... to specify a different local repository on the command line. Is there some way to wire up a POM to make that be the default for my project? -Dan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Running two builds of the same branch simultaneously
On Wed, Mar 19, 2008 at 8:22 PM, Dan Fabulich [EMAIL PROTECTED] wrote: Wendy Smoak wrote: You can use -Dmaven.repo.local=... to specify a different local repository on the command line. Is there some way to wire up a POM to make that be the default for my project? Not really. It's developer-specific, so it goes in settings.xml (or on the command line). It wouldn't make sense in the pom, which needs to work for all developers. -- Wendy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Running two builds of the same branch simultaneously
Wendy Smoak wrote: Not really. It's developer-specific, so it goes in settings.xml (or on the command line). Too bad... It wouldn't make sense in the pom, which needs to work for all developers. Sure it would; you'd set the local repo to be ./localrepo. -Dan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Running two builds of the same branch simultaneously
Samuel Le Berrigaud wrote: 1. only run mvn verify, this way nothing gets installed into the local repository, This doesn't work in a multi-module reactor build where the modules depend on each other, does it? I've got a project X that depends on project Y; project Y built (without installing anything in my local repo) but project X claimed that it couldn't find project Y. Is this even supposed to work? -Dan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Running two builds of the same branch simultaneously
No, it will only work if you at least do compile (then a reference to /target/classes is passed instead of the jar) -Original Message- From: Dan Fabulich [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 19, 2008 11:32 PM To: Maven Users List Subject: Re: Running two builds of the same branch simultaneously Samuel Le Berrigaud wrote: 1. only run mvn verify, this way nothing gets installed into the local repository, This doesn't work in a multi-module reactor build where the modules depend on each other, does it? I've got a project X that depends on project Y; project Y built (without installing anything in my local repo) but project X claimed that it couldn't find project Y. Is this even supposed to work? -Dan - 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]
RE: Running two builds of the same branch simultaneously
Brian E. Fox wrote: Samuel Le Berrigaud wrote: 1. only run mvn verify, this way nothing gets installed into the local repository, This doesn't work in a multi-module reactor build where the modules depend on each other, does it? No, it will only work if you at least do compile (then a reference to /target/classes is passed instead of the jar) Huh? verify is after compile, right before install. (Actually, I did package, then later tried verify to see if it would work; neither did.) Should that have worked? -Dan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]