Thanks Kenney

A 

-----Original Message-----
From: Kenney Westerhof [mailto:[EMAIL PROTECTED] 
Sent: 12 July 2006 12:26
To: Maven Users List
Subject: Re: Effective-pom and junit M2

On Wed, 12 Jul 2006 [EMAIL PROTECTED] wrote:

Hi,

Dependencies specified in dependencyManagement are not added as
dependencies. They just specify defaults for projects that _do_ specify
those dependencies - they could only specify groupId and arfifactId, the
version and scope will be set from the depMgt section.

So in your case, either add a dep on junit to the child projects that
need junit, or remove the <dependencyManagement> opening and closing
tags from the parent project.

-- Kenney

> Hi,
>
> I have a multi project set-up in M2 - version 2.0.4. I have set up a 
> pom containing things that I want to apply across all modules (such as

> certain reports - PMD, Macker, Checkstyle, etc).
>
> If I include a dependency management in there (e.g)
>
>       <dependencyManagement>
>               <dependencies>
>                       <dependency>
>                               <groupId>junit</groupId>
>                               <artifactId>junit</artifactId>
>                               <version>3.8.1</version>
>                               <scope>test</scope>
>                       </dependency>
>               </dependencies>
>       </dependencyManagement>
>
> Why, at a module level do I get the error that Junit  packages cannot 
> be found ?
> I have referred to the other pom via the <parent> tag.
> I have run the mvn help:effective-pom and I can see Junit is a 
> dependency, but code can't seem to see it.
>
> I have seen a bug reported in 2.0.2 of maven and some further 
> discussion around it. Jira says it is fixed, but am I just seeing that

> it has been reintroduced ?
> http://jira.codehaus.org/browse/MNG-2068
>
> Thx
> Andy
>

--
Kenney Westerhof
http://www.neonics.com
GPG public key: http://www.gods.nl/~forge/kenneyw.key

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Visit our website at http://www.ubs.com

This message contains confidential information and is intended only
for the individual named.  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
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or 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 securities or
related financial instruments.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to