Quick summary:  It appears that the Maven test module in Maven 1.1 beta 3 is
adding, among other things, log4j and Xerces to my classpath before running
unit tests.  Can I get it to stop?  I tried setting
maven.test.excludeXmlApis to "yes" but that had no effect.

Why do I want to do this?

I do most of my development using Eclipse, and had an existing project which
uses Maven 1.1 to build.  I ran "maven eclipse", loaded it up, and then ran
the unit tests, which failed with an error indicating that a class in Apache
commons-logging was missing.  But at the command line, the unit tests
succeeded without error.

After doing some digging, I added explicit dependencies on commons-logging
and log4j to my project.xml, re-ran "maven eclipse", and now the tests run
fine in Eclipse.

Here's my concern.  I didn't list these packages as dependencies in my
project, but Maven added them to my classpath anyway when running unit
tests.  However, this code is going to get eventually deployed in an
environment where those packages may or may not be present, in versions
which may or may not be compatible with the ones Maven so helpfully added
for me.   So now I don't entirely trust my unit tests -- I would much rather
have them fail if they need a jar not explicitly listed in the project
dependencies to run.

Can anyone help me out here?  The only knobs I see in the test plugin
documentation which seem relevant are maven.junit.fork and
maven.test.excludeXmlApis -- I tried all 4 combinations of "yes" and "no"
for those two values and still see the problem occuring.  I'm using Java
1.4.2.

Thanks,

-- 
David G. Paschich
[EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to