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

Reply via email to