You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Brandon Enochs <en...@itd.nrl.navy.mil> on 2007/10/25 21:52:20 UTC

Generating Test Sources

Where should plugins place generated test sources?

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


Re: Generating Test Sources

Posted by Tomasz Pik <to...@gmail.com>.
On 10/25/07, Brandon Enochs <en...@itd.nrl.navy.mil> wrote:
> Where should plugins place generated test sources?

Choose an arbitrary named directory under
${project.build.directory,  (${project.build.directory/generated/myplugin
for example), put tests there  and then add this directory to compileSourceRoot.
See:
http://mojo.codehaus.org/build-helper-maven-plugin/add-test-source-mojo.html
and maybe
http://mojo.codehaus.org/script-maven-plugin/examples/test-generation-simple.html
(second one is an example for unreleased plugin).

HTH,
Regards,
Tomek

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


Re: Generating Test Sources

Posted by Insitu <ab...@oqube.com>.
This is not generally a good idea, as pointed out by Brandon, to p ut
generated things under src/. The basic contract, I think,is that src/
is immutable and never written to by maven: everything is put in build
directory; 

Regards,
-- 
OQube < software engineering \ génie logiciel >
Arnaud Bailly, Dr.
\web> http://www.oqube.com


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


Re: Generating Test Sources

Posted by Brandon Enochs <en...@itd.nrl.navy.mil>.
Lee Meador wrote:
> I would use src/test/generated-source. But as Tomasz mentioned you have to
> add that folder to compileSourceRoot. (The antrun plugin will let you do
> that.) You can only add one folder to compileSourceRoot as I remember.
>
> On 10/25/07, Brandon Enochs <en...@itd.nrl.navy.mil> wrote:
>   
>> Where should plugins place generated test sources?
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>>     
>
>
>   
Will it be deleted by clean?

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


Re: Generating Test Sources

Posted by Lee Meador <le...@leemeador.com>.
I would use src/test/generated-source. But as Tomasz mentioned you have to
add that folder to compileSourceRoot. (The antrun plugin will let you do
that.) You can only add one folder to compileSourceRoot as I remember.

On 10/25/07, Brandon Enochs <en...@itd.nrl.navy.mil> wrote:
>
> Where should plugins place generated test sources?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
-- Lee Meador
Sent from gmail. My real email address is lee AT leemeador.com

Re: Generating Test Sources

Posted by Brandon Enochs <en...@itd.nrl.navy.mil>.
Michael McCallum wrote:
> why are you generating tests?
>
> On Friday 26 October 2007 08:52, Brandon Enochs wrote:
>   
>> Where should plugins place generated test sources?
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>     
>
>   
I need to generate files that support my unit tests.

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


Re: Generating Test Sources

Posted by Michael McCallum <gh...@apache.org>.
why are you generating tests?

On Friday 26 October 2007 08:52, Brandon Enochs wrote:
> Where should plugins place generated test sources?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org

-- 
Michael McCallum
Enterprise Engineer
mailto:gholam@apache.org

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