I'm not sure if it was already in 2.0, but in the latest version there is a parameter testSourceRoot you can add. This will add a directory to the test source directories.
Your configuration will look like this : <configuration> <tasks> <ant antfile="src/test/ant/build.xml" inheritRefs="true"/> </tasks> <testSourceRoot>target/generated-sources/nextmock</testSourceRoot> </configuration> > -----Original Message----- > From: Dennis Ho [mailto:[EMAIL PROTECTED] > Sent: 29 December 2005 01:52 > To: Maven Users List > Subject: RE: [m2] Migrating mockobject calls to Maven2 > > Hi, > > > > I managed to add the mock generator using the > maven-antrun-plugin but I am having trouble adding the generated test > sources to the test compile source directory. How can I make the > maven-compiler-plugin to compile both the src/test/java and > target/generated-test-src directories? > > > > Thanks, > > > > Dennis. > > > > -----Original Message----- > From: David Sag [mailto:[EMAIL PROTECTED] > Sent: Wednesday, December 28, 2005 2:48 AM > To: Maven Users List > Subject: Re: [m2] Migrating mockobject calls to Maven2 > > > > > We use EasyMock and all that needs is to put the folllowwing in the pom. > there are no generated files like with what you describe however. it > makes great little mockobjects though using the cglib. > > <dependency> > <groupId>easymock</groupId> > <artifactId>easymock</artifactId> > <version>1.2_Java1.3</version> > <scope>test</scope> > </dependency> > > <dependency> > <groupId>easymock</groupId> > <artifactId>easymockclassextension</artifactId> > <version>1.1</version> > <scope>test</scope> > </dependency> > > Kind regards, > Dave Sag > > > > > > > "Dennis Ho" <[EMAIL PROTECTED]> wrote on 28-12-2005 07:08:42: > > > Hi, > > > > I am in the process of migrating some existing maven tasks to > > use maven 2. We use mockobjects in our code for testing purposes, and > I > > would like to know if anyone has experience using maven2 with > > mockobjects can give me some pointer as to how the pom should look > like. > > > > When we did it with maven 1.x we have to use ant like the > > following: > > > > <ant:java > > classname="de.abstrakt.tools.codegeneration.file.MockCreatorFile" > > fork="yes" failonerror="true" > > classpathref="mockcreator.classpath"> > > > > <ant:arg line="-o ${maven.build.dir}/generated-sources/mocked"/> > > <!-- For each class to mock add one line with full > > classname --> > > > > <ant:arg value="SomeClass"/> > > > > <ant:classpath> > > <ant:pathelement path="${maven.build.dest}"/> > > </ant:classpath> > > </ant:java> > > > > Is there a more natural way to do it in Maven 2? I can't find > anything > > from the web so any advice is welcome. > > > > Thanks in advance for your help! > > > > Regards, > > > > Dennis Ho. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]