You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Hefner, Andreas" <an...@sdm.de> on 2003/12/18 18:32:40 UTC
dependencies of test classes
Hi everybody,
We are using maven as our build system in a major project. We strictly separated our sources into productive java sources (below src/java) and test sources (below src/test). Some dependencies (like junit and abbot) will only be used by the test classes and not by the productive classes. The normal behavior of maven is that it puts all dependencies in the maven.dependency.classpath and this same classpath is used for compiling productive sources and test sources. The question is: Is there a way to tell maven that it should use test dependencies (like junit and abbot) only when compiling test classes? The reason is that the test classes and test dependencies will not be shipped to the customer and we want to be sure that our productive classes do not depend on the test dependencies.
Thanks,
Andreas
Re: dependencies of test classes
Posted by Emmanuel Venisse <em...@venisse.net>.
----- Original Message -----
From: "Hefner, Andreas" <an...@sdm.de>
To: <us...@maven.apache.org>
Sent: Thursday, December 18, 2003 6:32 PM
Subject: dependencies of test classes
> Hi everybody,
>
> We are using maven as our build system in a major project. We strictly
separated our sources into productive java sources (below src/java) and test
sources (below src/test). Some dependencies (like junit and abbot) will only
be used by the test classes and not by the productive classes. The normal
behavior of maven is that it puts all dependencies in the
maven.dependency.classpath and this same classpath is used for compiling
productive sources and test sources. The question is: Is there a way to tell
maven that it should use test dependencies (like junit and abbot) only when
compiling test classes? The reason is that the test classes and test
dependencies will not be shipped to the customer and we want to be sure that
our productive classes do not depend on the test dependencies.
Actually, you can add a property in your dependencies declarations for test
dependencies, and customize the dependencies report.
Note to developers:
A lot of users demand this feature. I think we should add it in standard.
>
> Thanks,
> Andreas
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org