Your explanation is much easier to understand. :)
-----Original Message-----
From: Emmanuel Venisse [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 05, 2004 10:30 AM
To: Maven Users List
Subject: Re: Are unit test includes and excludes inherited?
If you have this in parent :
<project>
<currentVersion>1</currentVersion>
.
<dependencies>
<dependency>
a jar A with version 1
<dependency>
<dependency>
a jar B with version 1
<dependency>
</dependencies>
.
<build>
<sourceDirectory>${basedir}/src/somedir</sourceDirectory>
</build>
</project>
and in child :
<project>
<currentVersion>1</currentVersion>
.
<dependencies>
<dependency>
a jar A with version 2
<dependency>
</dependencies>
.
<build>
<sourceDirectory>${basedir}/src/otherdir</sourceDirectory>
</build>
</project>
The list of dependencies is :
- jar A version 2
- jar B version 1
sourcedirectory = ${basedir}/src/otherdir
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 05, 2004 3:41 PM
Subject: RE: Are unit test includes and excludes inherited?
> The key word below is _merged_. That is, the XML structures are merged.
So,
> if you have a first-level child element of the project element, it'll be
> inherited. Beyond that, if your n-level specification isn't within the
> dependencies declaration, it'll be overwritten by the child declaration.
>
> <project>
> <currentVersion>1</currentVersion> <= first-level
> .
> .
> .
> <build>
> <sourceDirectory>${basedir}/src/somedir</sourceDirectory> <= n-level
> </build>
>
> </project>
>
> In the above example, the source directory will be overwritten if the
build
> element is specified in the child project.xml, since the first-level
element
> is not <dependencies>. In non-dependency situations, maven does a simple
> node replacement, not a node-structure-merge.
Yes
>
> Hope this helps.
>
> -john
>
> -----Original Message-----
> From: Nigel Deakin [mailto:[EMAIL PROTECTED]
> Sent: Thursday, February 05, 2004 8:51 AM
> To: Maven Users List
> Subject: RE: Are unit test includes and excludes inherited?
>
> Thanks. Are you saying that dependencies are the *only* thing that is
> inherited? I was under the impression that other components of the POM
> were inherited, such as <unitTestSourceDirectory>.
>
> Furthermore, I notice that in maven.xml, goals are inherited but not
> post-goals.
>
> Is there a definititive definition of what is inherited?
>
> Nigel
>
> > -----Original Message-----
> > From: Emmanuel Venisse [mailto:[EMAIL PROTECTED]
> > Sent: Thursday February 5 2004 1:08 pm
> > To: Maven Users List
> > Subject: Re: Are unit test includes and excludes inherited?
> >
> >
> > In Maven, only dependencies are merged when you inherit a project.
> > In your case, you redeclare a build tag, so only the child
> > part is used and
> > not the parent part.
> >
> > Emmanuel
> >
> > ----- Original Message -----
> > From: "Nigel Deakin" <[EMAIL PROTECTED]>
> > To: "Maven Users List" <[EMAIL PROTECTED]>
> > Sent: Thursday, February 05, 2004 1:16 PM
> > Subject: Are unit test includes and excludes inherited?
> >
> >
> > I have a question about project inheritance which I haven't
> > been able to
> > find out an answer to from searching the documentation or the archives
> > of this list.
> >
> > I have two maven projects, one which extends the others. In
> > general the
> > inheritence is working as I would expect.
> >
> > In the parent project I have defined which unit tests I want
> > to run and
> > which ones I want to omit:
> >
> > <build>
> > <!-- snip other stuff -->
> >
> > <unitTest>
> > <includes>
> > <include>com/**/Test*.java</include>
> > </includes>
> > <excludes>
> > <exclude>**/foo/TestBar*.java</exclude>
> > </excludes>
> > </unitTest>
> > </build>
> >
> > In the child project I simply have:
> >
> > <build>
> > <!-- snip other stuff -->
> >
> > </build>
> >
> > Now when I run the tests in the child project it runs
> > everything in the
> > unitTestSourceDirectory, ignoring the excludes defined in the parent
> > project. So it looks as if the includes and excludes are not being
> > inherited.
> >
> > Is this expected behaviour?
> >
> > (This is with 1.0-rc1)
> >
> > Nigel
> >
> >
> > This message contains confidential information and is
> > intended only for the
> > named individual and may not be disseminated without prior
> > permission. If
> > you are not the named addressee, you should not disseminate,
> > distribute or
> > copy this e-mail. Please notify the sender immediately by
> > e-mail if you have
> > received this message in error and delete this e-message from
> > your system.
> > E-mail transmission cannot be guaranteed to be secure or error-free as
> > information could be intercepted, corrupted, lost, destroyed,
> > delayed in
> > transmission, incomplete, or may contain viruses. The sender
> > therefore does
> > not accept liability for any errors or omissions in the
> > contents of this
> > Message which arise as a result of e-mail transmission. If
> > verification is
> > required please request a hard-copy version. This message is
> > provided for
> > informational purposes and should not be construed as a
> > solicitation or
> > offer to buy or sell any software or services.
> >
> > ______________________________________________________________
> > __________
> > This email has been scanned for all viruses by the MessageLabs SkyScan
> > service. http://www.messagelabs.com
> > ______________________________________________________________
> > __________
> >
> > ---------------------------------------------------------------------
> > 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]
> >
> >
> > ______________________________________________________________
> > __________
> >
> > This email has been scanned for all viruses by MessageLabs
> > ______________________________________________________________
> > __________
> >
>
> This message contains confidential information and is intended only for
the
> named individual and may not be disseminated without prior permission. If
> you are not the named addressee, you should not disseminate, distribute or
> copy this e-mail. Please notify the sender immediately by e-mail if you
have
> received this message in error and delete this e-message from your system.
> E-mail transmission cannot be guaranteed to be secure or error-free as
> information could be intercepted, corrupted, lost, destroyed, delayed in
> transmission, incomplete, or may contain viruses. The sender therefore
does
> not accept liability for any errors or omissions in the contents of this
> Message which arise as a result of e-mail transmission. If verification
is
> required please request a hard-copy version. This message is provided for
> informational purposes and should not be construed as a solicitation or
> offer to buy or sell any software or services.
>
> ________________________________________________________________________
> This email has been scanned for all viruses by the MessageLabs SkyScan
> service. http://www.messagelabs.com
> ________________________________________________________________________
>
> ---------------------------------------------------------------------
> 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]
>
>
---------------------------------------------------------------------
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]