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.