We are in the process of moving to a Maven development architecture; where each component has it's own maven project. So far everything has been going well, and I have been developing a maven plug-in to allow integration with our companies specific requirements (obfuscation, together audits, etc...) which all developers would then use. However I have the following problem with unit-testing and the use of MockObjects...
The Problem A component would have two delivered Jar's, one containing the real implementation and the other containing the Mock implementation (to allow users of that component to create unit tests using the MockObjects within). This means that there would be two set's of dependencies, one for testing goals and the others for all other goals. I have been trying to figure out ways of implementing this with Maven, The Solution I have been thinking that the dependency list in the POM would have to include both versions of the jar and that pre and post goals could be created for the test:* goals. The pre Goal would remove all the Mock*.jar from the maven.dependency.classpath and the post goal will add them back in. So my questions are. Has anyone else come across this problem, or is there a standard way of doing what I am requesting? (i don't want to re-invent the wheel!) I have been looking at how to remove and add paths to the maven.dependency.classpath and I have seen the <maven:addpath > task... is there a corresponding maven:removetask ... or is there any documentation on the maven tag library? Cheers Ben ------------------------------- Ben Smith - [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
