Hi David,
I see what you mean now.
The first thing I'd try is to add excludes to the creation of test-jar
for the resources you don't want included.
If that isn't satisfactory, then certainly adding an additional
classpath might be an option - I've seen recent additions of requests
for that to the surefire plugin.
Cheers,
Brett
On 3/08/2006 8:53 AM, David J. M. Karlsen wrote:
Brett Porter wrote:
I'm sorry ,maybe its just because I'm pre-coffee, but I don't really
understand what you are referring to.
Sorry - I'll try to elaborate a little more:
process-[test-]resources copies with targetPath to
target/[test-]classes, which is added to the classpath. So it should
all be correct.
That's fine - but all this stuff will be added to the test-jar (I'm
using attached tests - so that I can reuse the same tests later - see
http://maven.apache.org/guides/mini/guide-attached-tests.html).
When I run the test phase with surefire in the my main artifact I need
some spring-config, log4j-config etc available on the classpath - but I
do *not* want these to end up in my tests which are jar'ed together for
reuse in other artifacts.
So, what I want to achieve is:
target/test-classes (only .class files - to be added to
<myartifact>-<version>-tests.jar
target/some-test-resources (only available on classpath during execution
of tests).
(The same would hold for the main artifact and resources).
I assume you are talking about modifying the manifest Class-Path:
entry in the JAR plugin, which you can do either by:
a) filtering the manifest (this is already possible using normal
filters, it has nothing to do with the JAR plugin)
b) using ${project.*} variables or others in the manifest elements on
the jar plugin configuration.
The clue is to avoid these resources to end up in the archive - but
still have them available on the classpath while executing the tests.
--
Apache Maven - http://maven.apache.org/
Better Builds with Maven - http://library.mergere.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]