Invoker-Plugin not using correct settings-file
Hi all, I configured the invoker-plugin in my POM to use the settings-file in "${maven.home}/conf/settings.xml" -- which works fine for local development. However, when running my Projects on Jenkins, I have configured the project with a different settings-file, since the Maven on the server uses the default file that came with the Maven-Install. I told Jenkins to run the job with '-s ' and added '-Dinvoker.settingsFile=' to let the invoker now as well. The problem is, the invoker is still trying to open '${maven.home}/conf/settings.xml' on which Jenkins apparently has no read-access (don't ask me why other builds work, I am not allowed to access the server directly). Can it be that the configuration given with '-D' does not override the configuration in the POM? Is there a way to get around this problem and get my build running on both Jenkins and a developer-machine? Thanks. -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - >>> business. people. technology. <<< - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Invoker-Plugin not using correct settings-file
Have you tried executing your Maven build specifying -Dinvoker.settingsFile= from command line on your pc. If it works the issue is related to Jenkins. It should work as it should override the pom configured value. /Anders On Tue, Jun 21, 2011 at 18:56, Asmann, Roland wrote: > Hi all, > > I configured the invoker-plugin in my POM to use the settings-file in > "${maven.home}/conf/settings.xml" -- which works fine for local > development. > > However, when running my Projects on Jenkins, I have configured the > project with a different settings-file, since the Maven on the server > uses the default file that came with the Maven-Install. > I told Jenkins to run the job with '-s ' and added > '-Dinvoker.settingsFile=' to let the invoker now as well. > > The problem is, the invoker is still trying to open > '${maven.home}/conf/settings.xml' on which Jenkins apparently has no > read-access (don't ask me why other builds work, I am not allowed to > access the server directly). > > Can it be that the configuration given with '-D' does not override the > configuration in the POM? > > Is there a way to get around this problem and get my build running on > both Jenkins and a developer-machine? > > Thanks. > > -- > Roland Asmann > Senior Software Engineer > > adesso Austria GmbH > Floridotower 26. Stock T +43 1 2198790-27 > Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 > A-1210 Wien M +43 664 88657566 >E roland.asm...@adesso.at >W www.adesso.at > > - > >>> business. people. technology. <<< > - > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > >
Re: Invoker-Plugin not using correct settings-file
I have to admit: no, not yet. I have to put a settings-file somewhere that throws me an error, otherwise I'll never know if it works. I'll give that a try tomorrow, and update this thread according. Roland On 21-06-11 19:11, Anders Hammar wrote: > Have you tried executing your Maven build specifying > -Dinvoker.settingsFile= from command line on your pc. If > it works the issue is related to Jenkins. It should work as it should > override the pom configured value. > > /Anders > > On Tue, Jun 21, 2011 at 18:56, Asmann, Rolandwrote: > >> Hi all, >> >> I configured the invoker-plugin in my POM to use the settings-file in >> "${maven.home}/conf/settings.xml" -- which works fine for local >> development. >> >> However, when running my Projects on Jenkins, I have configured the >> project with a different settings-file, since the Maven on the server >> uses the default file that came with the Maven-Install. >> I told Jenkins to run the job with '-s' and added >> '-Dinvoker.settingsFile=' to let the invoker now as well. >> >> The problem is, the invoker is still trying to open >> '${maven.home}/conf/settings.xml' on which Jenkins apparently has no >> read-access (don't ask me why other builds work, I am not allowed to >> access the server directly). >> >> Can it be that the configuration given with '-D' does not override the >> configuration in the POM? >> >> Is there a way to get around this problem and get my build running on >> both Jenkins and a developer-machine? >> >> Thanks. >> >> -- >> Roland Asmann >> Senior Software Engineer >> >> adesso Austria GmbH >> Floridotower 26. Stock T +43 1 2198790-27 >> Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 >> A-1210 Wien M +43 664 88657566 >> E roland.asm...@adesso.at >> W www.adesso.at >> >> - >> >>> business. people. technology.<<< >> - >> >> - >> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org >> For additional commands, e-mail: users-h...@maven.apache.org >> >> -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - >>> business. people. technology. <<< - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Invoker-Plugin not using correct settings-file
I just tried this with a settings-file that should have stopped my build (because it doesn't point to my inhouse-repository) and has no reference to '@localRepositoryUrl@', but it is actually copying the artifacts from the original localRepo. This means the usage of '-Dinvoker.settingsFile' is NOT overriding the configuration in the POM! So not a Jenkins issue, but one with Maven itself! I'm running Maven 2.2.1 and am using m-invoker-p 1.5. Any ideas/suggestions? Roland On 21.06.2011 19:57, Asmann, Roland wrote: > I have to admit: no, not yet. I have to put a settings-file somewhere > that throws me an error, otherwise I'll never know if it works. > > I'll give that a try tomorrow, and update this thread according. > > Roland > > > On 21-06-11 19:11, Anders Hammar wrote: > > Have you tried executing your Maven build specifying > > -Dinvoker.settingsFile= from command line on your > pc. If > > it works the issue is related to Jenkins. It should work as it should > > override the pom configured value. > > > > /Anders > > > > On Tue, Jun 21, 2011 at 18:56, Asmann, > Rolandwrote: > > > >> Hi all, > >> > >> I configured the invoker-plugin in my POM to use the settings-file in > >> "${maven.home}/conf/settings.xml" -- which works fine for local > >> development. > >> > >> However, when running my Projects on Jenkins, I have configured the > >> project with a different settings-file, since the Maven on the server > >> uses the default file that came with the Maven-Install. > >> I told Jenkins to run the job with '-s' and added > >> '-Dinvoker.settingsFile=' to let the invoker now > as well. > >> > >> The problem is, the invoker is still trying to open > >> '${maven.home}/conf/settings.xml' on which Jenkins apparently has no > >> read-access (don't ask me why other builds work, I am not allowed to > >> access the server directly). > >> > >> Can it be that the configuration given with '-D' does not override the > >> configuration in the POM? > >> > >> Is there a way to get around this problem and get my build running on > >> both Jenkins and a developer-machine? > >> > >> Thanks. > >> > >> -- > >> Roland Asmann > >> Senior Software Engineer > >> > >> adesso Austria GmbH > >> Floridotower 26. Stock T +43 1 2198790-27 > >> Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 > >> A-1210 Wien M +43 664 88657566 > >> E roland.asm...@adesso.at > >> W www.adesso.at > >> > >> - > >> >>> business. people. technology.<<< > >> - > >> > >> - > >> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > >> For additional commands, e-mail: users-h...@maven.apache.org > >> > >> > > -- > Roland Asmann > Senior Software Engineer > > adesso Austria GmbH > Floridotower 26. Stock T +43 1 2198790-27 > Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 > A-1210 Wien M +43 664 88657566 > E roland.asm...@adesso.at > W www.adesso.at > > - > >>> business. people. technology. <<< > - > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - >>> business. people. technology. <<< - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Invoker-Plugin not using correct settings-file
ahh. you have configured the plugin directly. to get what you want you need to configure the property in your pom rather than define the value in your configuration section (the default if unspecified is to use the property, but by specifying it, the property is ignored) - Stephen --- Sent from my Android phone, so random spelling mistakes, random nonsense words and other nonsense are a direct result of using swype to type on the screen On 22 Jun 2011 17:33, "Asmann, Roland" wrote:
Re: Invoker-Plugin not using correct settings-file
Hmmm... On one side it sounds very logical, on the other it doesn't... At least it explains a couple of other issues I was having -- although they weren't influencing my build this much. Thanks! On 22-06-11 21:12, Stephen Connolly wrote: > ahh. you have configured the plugin directly. to get what you want you need > to configure the property in your pom rather than define the value in your > configuration section (the default if unspecified is to use the property, > but by specifying it, the property is ignored) > > - Stephen > > --- > Sent from my Android phone, so random spelling mistakes, random nonsense > words and other nonsense are a direct result of using swype to type on the > screen > On 22 Jun 2011 17:33, "Asmann, Roland" wrote: -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - >>> business. people. technology. <<< - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org