Simply use only provided scope as it will be available to your tests as well. On Oct 18, 2011 6:28 AM, "mickael leduque" <mickael.leduque.se...@gmail.com> wrote:
> Hello, > > I need to have the same dependency with two different scopes : test and > provided. > The scope mustn't be compile, of course. > > Now, if I try to repeat the dependency declaration twice with different > scope, maven says : > > [WARNING] Some problems were encountered while building the effective model > for <groupId>:<artifactid>:jar:1.0-SNAPSHOT > [WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' > must be unique: <dep-groupId>:<dep-artifactId>:jar -> duplicate declaration > of version (?) @ line 85, column 21 > > I suppose it ignores my attempt and either > 1. chooses randomly one of the scopes > 2. decides to ignore either and decides it will be the default scope, > compile > > How can I have what I need ? >