You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Martin Hoeller <ma...@xss.co.at> on 2007/02/14 12:17:57 UTC
handling of optional 3rd-party-dependencies in tests
Hi all!
I've got a question regarding dependencies. Let me first explain my
project structure.
- I've got project A which is a web application (WAR).
- A depends on project B which is of type JAR.
- B depends on hibernate which has an optional dependency on ehcache.
My idea is if A wants to use hibernate's second level cache ehcache A has
to define a dependency on ehcache. To use ehcache also for tests in B, B
defines ehcache as a dependency of scope "test".
Whenever I now run mvn test I get the following warings:
| Artifact net.sf.ehcache:ehcache:jar:1.2.3:test retains local scope 'test' overriding broader scope 'compile'
| given by a dependency. If this is not intended, modify or remove the local scope.
How can I get rid of this warning? Or am I doing something wrong?
tia,
- martin
--
Martin Höller | martin.hoeller@xss.co.at
*x Software + Systeme | http://www.xss.co.at/
Karmarschgasse 51/2/20 | Tel: +43-1-6060114-30
A-1100 Vienna, Austria | Fax: +43-1-6060114-71
Re: [m2] handling of optional 3rd-party-dependencies in tests
Posted by Tim Kettler <ti...@udo.edu>.
Hi,
Am Mittwoch, den 14.02.2007, 13:38 +0100 schrieb Martin Hoeller:
[...]
> However, as this is nothing I need to worry about (that's what I expected),
> I would like this warning to go away. I don't want warnings if everything
> is fine. What am I missing?
There is a recent thread [1] about exactly this topic on the dev list.
And the corresponding jira entry [2].
>
> - martin
-Tim
[1]
http://www.nabble.com/More-control-over-what-WARNING-messages-are-displayed-tf3211800s177.html#a8919184
[2] http://jira.codehaus.org/browse/MNG-2823
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [m2] handling of optional 3rd-party-dependencies in tests
Posted by Martin Hoeller <ma...@xss.co.at>.
Hello Franz!
Thanks for your quick reply.
On 14. February 2007 13:08 franz see wrote:
> I'm guessing that happened while maven was building module B.
Yes, forgot to mention this.
> AFAIK, that's just a reminder that that jar is using the scope "test"
> only. I don't think it's anything to worry about ( not unless you did not
> specify that jar to be of scope "test" ).
Not exactly sure what you mean.
I did not specify B.jar in project A to be of scope test, it's of scope
runtime (should it better be of scope compile?).
However, as this is nothing I need to worry about (that's what I expected),
I would like this warning to go away. I don't want warnings if everything
is fine. What am I missing?
- martin
--
Martin Höller | martin.hoeller@xss.co.at
*x Software + Systeme | http://www.xss.co.at/
Karmarschgasse 51/2/20 | Tel: +43-1-6060114-30
A-1100 Vienna, Austria | Fax: +43-1-6060114-71
Re: [m2] handling of optional 3rd-party-dependencies in tests
Posted by franz see <fr...@gmail.com>.
Good day to you, martin,
I'm guessing that happened while maven was building module B. AFAIK, that's
just a reminder that that jar is using the scope "test" only. I don't think
it's anything to worry about ( not unless you did not specify that jar to be
of scope "test" ).
Cheers,
Franz
matinh wrote:
>
> Hi all!
>
> I've got a question regarding dependencies. Let me first explain my
> project structure.
>
> - I've got project A which is a web application (WAR).
> - A depends on project B which is of type JAR.
> - B depends on hibernate which has an optional dependency on ehcache.
>
> My idea is if A wants to use hibernate's second level cache ehcache A has
> to define a dependency on ehcache. To use ehcache also for tests in B, B
> defines ehcache as a dependency of scope "test".
>
> Whenever I now run mvn test I get the following warings:
>
> | Artifact net.sf.ehcache:ehcache:jar:1.2.3:test retains local scope
> 'test' overriding broader scope 'compile'
> | given by a dependency. If this is not intended, modify or remove the
> local scope.
>
> How can I get rid of this warning? Or am I doing something wrong?
>
> tia,
> - martin
> --
> Martin Höller | martin.hoeller@xss.co.at
> *x Software + Systeme | http://www.xss.co.at/
> Karmarschgasse 51/2/20 | Tel: +43-1-6060114-30
> A-1100 Vienna, Austria | Fax: +43-1-6060114-71
>
>
>
--
View this message in context: http://www.nabble.com/handling-of-optional-3rd-party-dependencies-in-tests-tf3226679s177.html#a8963739
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org