You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by rking999 <ri...@hotmail.com> on 2006/11/24 15:46:20 UTC

Test Classpath Order Problems

Hi,

The module that I am compiling has a dependancy on resin-x.x.jar which it
needs in order to compile the java source.  When running unit tests,
however, it is accessing the DoucmentBuilderFactory in the resin jar instead
of the one in the xmlParserAPIs jar.  

I cant exclude the resin jar as it is needed to compile the java source. 
There doesnt seem to be a way to change the order of the test classpath to
move the xmlParserApis jar above the resin one....  

Any help would be greatly appreciated. thanks in advance. 
-- 
View this message in context: http://www.nabble.com/Test-Classpath-Order-Problems-tf2699502s177.html#a7527451
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Test Classpath Order Problems

Posted by Mark Hobson <ma...@gmail.com>.
On 27/11/06, rking999 <ri...@hotmail.com> wrote:
> Thank you for the reply.  I tried changing the scope to provided for the
> resin jar, but it still seems to be used in the test classpath.  What would
> be nice is if I could actually remove it completelt from the test classpath
> - is there a way to do this with Maven?

As you've found, classpath ordering can be a problem when searching
for named resources such as service configuration files.  You may be
interested in the following issue I raised when having similar
problems with log4j.properties:

http://http://jira.codehaus.org/browse/MNG-1412jira.codehaus.org/browse/MNG-1412

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Test Classpath Order Problems

Posted by rking999 <ri...@hotmail.com>.
Hi,

Thank you for the reply.  I tried changing the scope to provided for the
resin jar, but it still seems to be used in the test classpath.  What would
be nice is if I could actually remove it completelt from the test classpath
- is there a way to do this with Maven?

thanks
-- 
View this message in context: http://www.nabble.com/Test-Classpath-Order-Problems-tf2699502s177.html#a7558741
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Test Classpath Order Problems

Posted by franz see <fr...@gmail.com>.
Good day to you, rking999,

You may want to try and set your xmlParserAPIs dependency to "test", while
the dependency from resin to "compile" or "provided".

Cheers,
Franz

[1]
http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html

rking999 wrote:
> 
> Hi,
> 
> The module that I am compiling has a dependancy on resin-x.x.jar which it
> needs in order to compile the java source.  When running unit tests,
> however, it is accessing the DoucmentBuilderFactory in the resin jar
> instead of the one in the xmlParserAPIs jar.  
> 
> I cant exclude the resin jar as it is needed to compile the java source. 
> There doesnt seem to be a way to change the order of the test classpath to
> move the xmlParserApis jar above the resin one....  
> 
> Any help would be greatly appreciated. thanks in advance. 
> 

-- 
View this message in context: http://www.nabble.com/Test-Classpath-Order-Problems-tf2699502s177.html#a7555769
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org