You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Asmann, Roland" <Ro...@adesso.at> on 2012/01/16 09:43:04 UTC
Settings-file and invoker-plugin
Hi all,
When running my projects on Jenkins, I need to set the settings-file (-s
/path/to/settings.xml). I've hit my toes a couple of times now on the
fact that I than also have to set the settings-file for the
invoker-plugin (-Dinvoker.settingsFile=/path/to/settings.xml).
Why doesn't the invoker use the file that was given with -s? I can
understand that it takes the default settings when no configuration is
give, but having the plugin actually use a different settings-file when
running Maven with an explicit settings-file is kind of weird.
Anyway, is there a way to get the invoker-plugin to use the
settings-file that I set at the command-line?
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.asmann@adesso.at
W www.adesso.at
-------------------------------------------------------------
>>> business. people. technology. <<<
-------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Settings-file and invoker-plugin
Posted by Stephen Connolly <st...@gmail.com>.
Please try mrm-maven-plugin... you'll be pleasantly surprised... best
example is the current trunk of versions-maven-plugin @ mojo
On 16 January 2012 15:08, Asmann, Roland <Ro...@adesso.at> wrote:
> My use-case is also running integration tests. However, I don't want to
> have several different settings.xml files (unless it becomes necessary).
>
> So, I created one that works for me (user/pw on servers, proxy,
> repositories -- especially using the 'normal' local repo as a remote for
> the invoker) and had this copied onto our Jenkins.
> Now, I use these settings in both my normal builds and my invoker
> integration-tests.
>
> So, what I would like, is when running Maven with the -s command, the
> invoker should pick this up as the default settings.
> Or if there is a way to get the location of the settings.xml file using
> a variable, I can configure my invoker-plugin to use it automatically.
>
> Is there some way to solve this or will I just have to live with adding
> 2 parameters when running Maven?
>
>
> On 16.01.2012 10:12, Stephen Connolly wrote:
>> Most people use invoker to run integration tests of their maven plugins.
>>
>> As such, when running integration tests, you typically will have a
>> test settings.xml so that the test environment will be constant.
>>
>> There is the issue of when you are behind a proxy, to solve this issue
>> (as sometimes you need absolute control over the test env settings)
>> there is mrm-maven-plugin @ mojo, that fires up a local Mock
>> Repository Manager which will use your settings.xml to retrieve
>> artifacts not available in your local repository so that the invoker
>> based tests can still have the required environment, but work behind a
>> proxy.
>>
>> What is your use-case?
>>
>> On 16 January 2012 08:43, Asmann, Roland <Ro...@adesso.at> wrote:
>> > Hi all,
>> >
>> > When running my projects on Jenkins, I need to set the settings-file (-s
>> > /path/to/settings.xml). I've hit my toes a couple of times now on the
>> > fact that I than also have to set the settings-file for the
>> > invoker-plugin (-Dinvoker.settingsFile=/path/to/settings.xml).
>> >
>> > Why doesn't the invoker use the file that was given with -s? I can
>> > understand that it takes the default settings when no configuration is
>> > give, but having the plugin actually use a different settings-file when
>> > running Maven with an explicit settings-file is kind of weird.
>> >
>> > Anyway, is there a way to get the invoker-plugin to use the
>> > settings-file that I set at the command-line?
>> >
>> > 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.asmann@adesso.at
>> > W www.adesso.at
>> >
>> > -------------------------------------------------------------
>> > >>> business. people. technology. <<<
>> > -------------------------------------------------------------
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> > For additional commands, e-mail: users-help@maven.apache.org
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@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.asmann@adesso.at
> W www.adesso.at
>
> -------------------------------------------------------------
> >>> business. people. technology. <<<
> -------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Settings-file and invoker-plugin
Posted by "Asmann, Roland" <Ro...@adesso.at>.
My use-case is also running integration tests. However, I don't want to
have several different settings.xml files (unless it becomes necessary).
So, I created one that works for me (user/pw on servers, proxy,
repositories -- especially using the 'normal' local repo as a remote for
the invoker) and had this copied onto our Jenkins.
Now, I use these settings in both my normal builds and my invoker
integration-tests.
So, what I would like, is when running Maven with the -s command, the
invoker should pick this up as the default settings.
Or if there is a way to get the location of the settings.xml file using
a variable, I can configure my invoker-plugin to use it automatically.
Is there some way to solve this or will I just have to live with adding
2 parameters when running Maven?
On 16.01.2012 10:12, Stephen Connolly wrote:
> Most people use invoker to run integration tests of their maven plugins.
>
> As such, when running integration tests, you typically will have a
> test settings.xml so that the test environment will be constant.
>
> There is the issue of when you are behind a proxy, to solve this issue
> (as sometimes you need absolute control over the test env settings)
> there is mrm-maven-plugin @ mojo, that fires up a local Mock
> Repository Manager which will use your settings.xml to retrieve
> artifacts not available in your local repository so that the invoker
> based tests can still have the required environment, but work behind a
> proxy.
>
> What is your use-case?
>
> On 16 January 2012 08:43, Asmann, Roland <Ro...@adesso.at> wrote:
> > Hi all,
> >
> > When running my projects on Jenkins, I need to set the settings-file (-s
> > /path/to/settings.xml). I've hit my toes a couple of times now on the
> > fact that I than also have to set the settings-file for the
> > invoker-plugin (-Dinvoker.settingsFile=/path/to/settings.xml).
> >
> > Why doesn't the invoker use the file that was given with -s? I can
> > understand that it takes the default settings when no configuration is
> > give, but having the plugin actually use a different settings-file when
> > running Maven with an explicit settings-file is kind of weird.
> >
> > Anyway, is there a way to get the invoker-plugin to use the
> > settings-file that I set at the command-line?
> >
> > 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.asmann@adesso.at
> > W www.adesso.at
> >
> > -------------------------------------------------------------
> > >>> business. people. technology. <<<
> > -------------------------------------------------------------
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@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.asmann@adesso.at
W www.adesso.at
-------------------------------------------------------------
>>> business. people. technology. <<<
-------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Settings-file and invoker-plugin
Posted by Stephen Connolly <st...@gmail.com>.
Most people use invoker to run integration tests of their maven plugins.
As such, when running integration tests, you typically will have a
test settings.xml so that the test environment will be constant.
There is the issue of when you are behind a proxy, to solve this issue
(as sometimes you need absolute control over the test env settings)
there is mrm-maven-plugin @ mojo, that fires up a local Mock
Repository Manager which will use your settings.xml to retrieve
artifacts not available in your local repository so that the invoker
based tests can still have the required environment, but work behind a
proxy.
What is your use-case?
On 16 January 2012 08:43, Asmann, Roland <Ro...@adesso.at> wrote:
> Hi all,
>
> When running my projects on Jenkins, I need to set the settings-file (-s
> /path/to/settings.xml). I've hit my toes a couple of times now on the
> fact that I than also have to set the settings-file for the
> invoker-plugin (-Dinvoker.settingsFile=/path/to/settings.xml).
>
> Why doesn't the invoker use the file that was given with -s? I can
> understand that it takes the default settings when no configuration is
> give, but having the plugin actually use a different settings-file when
> running Maven with an explicit settings-file is kind of weird.
>
> Anyway, is there a way to get the invoker-plugin to use the
> settings-file that I set at the command-line?
>
> 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.asmann@adesso.at
> W www.adesso.at
>
> -------------------------------------------------------------
> >>> business. people. technology. <<<
> -------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org