You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Michal Maczka <mm...@interia.pl> on 2003/02/28 21:39:51 UTC

[test:plugin] Classpath issue

I want to control behavior of my application differently for test
environment and differently for production environment.

Behavior of my application is controlled through set of configuration files
(like log4j.propertrties)
The problem is that currently in maven the "main" resources are preceding
the test resources in the classpath
and [test] plugin is always takinng  them first.



In my opinion when Junit test cases are executed the order of class path
entries should be changed
from:

<pathelement location="${maven.build.dest}"/>
<pathelement location="${maven.test.dest}"/>

to

<pathelement location="${maven.test.dest}"/>
<pathelement location="${maven.build.dest}"/>

I am including short example showing where is the problem.
Basically in  it I have two log4j.properties files: one in
'test-resources', second in 'resources'.
This example shows that the one kept in test-resources is never used and I
cannot easily control
the "test environment" when it is overlapping with "production'
environment".


Michal Maczka






----------------------------------------------------------------------
KLIKAJ!!! Nie pytaj dlaczego... >>> http://link.interia.pl/f16e2