I could see that reactor could be used to compile both the Mock and real jars simultaniously. However I cannot see how it would help a user of that jar to switch the dependency from the Real to the Mock when unit-testing? But then I hadn't heard of reactor until five minutes ago and I could be missing something!?
Ben >> -----Original Message----- >> From: Jeffrey D. Brekke [mailto:[EMAIL PROTECTED]] >> Sent: Thursday, January 30, 2003 2:41 PM >> To: Turbine Maven Users List >> Subject: Re: Testing, dependencies and MockObjects >> >> >> >> Would you be able to have a subproject under each project >> and the subproject would hold the mocks and generate a jar. >> Then each parent could be using the reactor to build the >> mock subproject? >> >> "Ben Smith" <[EMAIL PROTECTED]> writes: >> >> > 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? >> >> -- >> ===================================================================== >> Jeffrey D. Brekke [EMAIL PROTECTED] >> Wisconsin, USA [EMAIL PROTECTED] >> [EMAIL PROTECTED] >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: >> [EMAIL PROTECTED] >> For additional commands, e-mail: >> [EMAIL PROTECTED] >> >> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
