You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jules Gosnell <ju...@coredevelopers.net> on 2006/04/10 20:58:30 UTC

m2 - multiproject - inherit and add to surefire plugin

I have a number of submodules which I would like to all inherit the same 
sys-props from a top-level pom to be set when running unit tests.

Each module may wish to provide its own additional properties at test time.

Is this possible ? Or do I have to either repeat shared props in every 
modules or merge all props into top-level ? The online plugin doc 
doesn't seem to consider this usecase...

Thanks for your time.


Jules

-- 
"Open Source is a self-assembling organism. You dangle a piece of
string into a super-saturated solution and a whole operating-system
crystallises out around it."

/**********************************
 * Jules Gosnell
 * Partner
 * Core Developers Network (Europe)
 *
 *    www.coredevelopers.net
 *
 * Open Source Training & Support.
 **********************************/


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: m2 - multiproject - inherit and add to surefire plugin

Posted by Jules Gosnell <ju...@coredevelopers.net>.
John Casey wrote:

>I've setup a small test here, and using the merge-control attributes I
>introduced for plugin configuration handling, I cannot get it to work. It'll
>take more debugging to get this worked out.
>
>In the meantime, I filed this issue:
>
>http://jira.codehaus.org/browse/MNG-2218
>
>Please vote/watch it for updates.
>  
>
Thanks, John - have done/will do...

Jules

>On 4/10/06, Brett Porter <br...@gmail.com> wrote:
>  
>
>>I don't think adding that to the child POM is necessary, since it is
>>implied when you run the tests.
>>
>>What Jules was asking was if systemProperties could be merged during
>>inheritence. The answer to that is, I believe, no. However, there may
>>be an attribute that you can set on the system properties to have it
>>merge - I know there is some code John added for that but I don't know
>>whether it is exposed, or how it is used. It is certainly
>>undocumented.
>>
>>John?
>>
>>- Brett
>>
>>On 4/11/06, John Casey <ca...@gmail.com> wrote:
>>    
>>
>>>You should be able to setup your plugin configuration at the top level
>>>      
>>>
>>using
>>    
>>
>>>a <pluginManagement/> section, then simply reference the plugin by:
>>>
>>><plugin>
>>>  <artifactId>maven-surefire-plugin</artifactId>
>>></plugin>
>>>
>>>in each module POM.
>>>
>>>-john
>>>
>>>On 4/10/06, Jules Gosnell <ju...@coredevelopers.net> wrote:
>>>      
>>>
>>>>I have a number of submodules which I would like to all inherit the
>>>>        
>>>>
>>same
>>    
>>
>>>>sys-props from a top-level pom to be set when running unit tests.
>>>>
>>>>Each module may wish to provide its own additional properties at test
>>>>time.
>>>>
>>>>Is this possible ? Or do I have to either repeat shared props in every
>>>>modules or merge all props into top-level ? The online plugin doc
>>>>doesn't seem to consider this usecase...
>>>>
>>>>Thanks for your time.
>>>>
>>>>
>>>>Jules
>>>>
>>>>--
>>>>"Open Source is a self-assembling organism. You dangle a piece of
>>>>string into a super-saturated solution and a whole operating-system
>>>>crystallises out around it."
>>>>
>>>>/**********************************
>>>>* Jules Gosnell
>>>>* Partner
>>>>* Core Developers Network (Europe)
>>>>*
>>>>*    www.coredevelopers.net
>>>>*
>>>>* Open Source Training & Support.
>>>>**********************************/
>>>>
>>>>
>>>>---------------------------------------------------------------------
>>>>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
>>
>>
>>    
>>
>
>  
>


-- 
"Open Source is a self-assembling organism. You dangle a piece of
string into a super-saturated solution and a whole operating-system
crystallises out around it."

/**********************************
 * Jules Gosnell
 * Partner
 * Core Developers Network (Europe)
 *
 *    www.coredevelopers.net
 *
 * Open Source Training & Support.
 **********************************/


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: m2 - multiproject - inherit and add to surefire plugin

Posted by John Casey <ca...@gmail.com>.
I've setup a small test here, and using the merge-control attributes I
introduced for plugin configuration handling, I cannot get it to work. It'll
take more debugging to get this worked out.

In the meantime, I filed this issue:

http://jira.codehaus.org/browse/MNG-2218

Please vote/watch it for updates.

On 4/10/06, Brett Porter <br...@gmail.com> wrote:
>
> I don't think adding that to the child POM is necessary, since it is
> implied when you run the tests.
>
> What Jules was asking was if systemProperties could be merged during
> inheritence. The answer to that is, I believe, no. However, there may
> be an attribute that you can set on the system properties to have it
> merge - I know there is some code John added for that but I don't know
> whether it is exposed, or how it is used. It is certainly
> undocumented.
>
> John?
>
> - Brett
>
> On 4/11/06, John Casey <ca...@gmail.com> wrote:
> > You should be able to setup your plugin configuration at the top level
> using
> > a <pluginManagement/> section, then simply reference the plugin by:
> >
> > <plugin>
> >   <artifactId>maven-surefire-plugin</artifactId>
> > </plugin>
> >
> > in each module POM.
> >
> > -john
> >
> > On 4/10/06, Jules Gosnell <ju...@coredevelopers.net> wrote:
> > >
> > >
> > > I have a number of submodules which I would like to all inherit the
> same
> > > sys-props from a top-level pom to be set when running unit tests.
> > >
> > > Each module may wish to provide its own additional properties at test
> > > time.
> > >
> > > Is this possible ? Or do I have to either repeat shared props in every
> > > modules or merge all props into top-level ? The online plugin doc
> > > doesn't seem to consider this usecase...
> > >
> > > Thanks for your time.
> > >
> > >
> > > Jules
> > >
> > > --
> > > "Open Source is a self-assembling organism. You dangle a piece of
> > > string into a super-saturated solution and a whole operating-system
> > > crystallises out around it."
> > >
> > > /**********************************
> > > * Jules Gosnell
> > > * Partner
> > > * Core Developers Network (Europe)
> > > *
> > > *    www.coredevelopers.net
> > > *
> > > * Open Source Training & Support.
> > > **********************************/
> > >
> > >
> > > ---------------------------------------------------------------------
> > > 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: m2 - multiproject - inherit and add to surefire plugin

Posted by Brett Porter <br...@gmail.com>.
I don't think adding that to the child POM is necessary, since it is
implied when you run the tests.

What Jules was asking was if systemProperties could be merged during
inheritence. The answer to that is, I believe, no. However, there may
be an attribute that you can set on the system properties to have it
merge - I know there is some code John added for that but I don't know
whether it is exposed, or how it is used. It is certainly
undocumented.

John?

- Brett

On 4/11/06, John Casey <ca...@gmail.com> wrote:
> You should be able to setup your plugin configuration at the top level using
> a <pluginManagement/> section, then simply reference the plugin by:
>
> <plugin>
>   <artifactId>maven-surefire-plugin</artifactId>
> </plugin>
>
> in each module POM.
>
> -john
>
> On 4/10/06, Jules Gosnell <ju...@coredevelopers.net> wrote:
> >
> >
> > I have a number of submodules which I would like to all inherit the same
> > sys-props from a top-level pom to be set when running unit tests.
> >
> > Each module may wish to provide its own additional properties at test
> > time.
> >
> > Is this possible ? Or do I have to either repeat shared props in every
> > modules or merge all props into top-level ? The online plugin doc
> > doesn't seem to consider this usecase...
> >
> > Thanks for your time.
> >
> >
> > Jules
> >
> > --
> > "Open Source is a self-assembling organism. You dangle a piece of
> > string into a super-saturated solution and a whole operating-system
> > crystallises out around it."
> >
> > /**********************************
> > * Jules Gosnell
> > * Partner
> > * Core Developers Network (Europe)
> > *
> > *    www.coredevelopers.net
> > *
> > * Open Source Training & Support.
> > **********************************/
> >
> >
> > ---------------------------------------------------------------------
> > 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: m2 - multiproject - inherit and add to surefire plugin

Posted by John Casey <ca...@gmail.com>.
You should be able to setup your plugin configuration at the top level using
a <pluginManagement/> section, then simply reference the plugin by:

<plugin>
  <artifactId>maven-surefire-plugin</artifactId>
</plugin>

in each module POM.

-john

On 4/10/06, Jules Gosnell <ju...@coredevelopers.net> wrote:
>
>
> I have a number of submodules which I would like to all inherit the same
> sys-props from a top-level pom to be set when running unit tests.
>
> Each module may wish to provide its own additional properties at test
> time.
>
> Is this possible ? Or do I have to either repeat shared props in every
> modules or merge all props into top-level ? The online plugin doc
> doesn't seem to consider this usecase...
>
> Thanks for your time.
>
>
> Jules
>
> --
> "Open Source is a self-assembling organism. You dangle a piece of
> string into a super-saturated solution and a whole operating-system
> crystallises out around it."
>
> /**********************************
> * Jules Gosnell
> * Partner
> * Core Developers Network (Europe)
> *
> *    www.coredevelopers.net
> *
> * Open Source Training & Support.
> **********************************/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>