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]

Reply via email to