You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Chad Woolley <li...@thewoolleyweb.com> on 2003/12/08 22:06:03 UTC
Is it possible to keep unit tests in the same directories as production
classes?
Hello,
I want to implement maven on an existing project, which has the unit
tests in the same directories as the classes they test.
Is this supported with maven? I read the test plugin docs, but I don't
see any properties or any info there...
Thanks,
Chad
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Is it possible to keep unit tests in the same directories as
production classes?
Posted by Tim Chen <tc...@tampabay.rr.com>.
hehe i did offer a disclaimer ;)
Jason van Zyl wrote:
>On Mon, 2003-12-08 at 16:20, Tim Chen wrote:
>
>
>>I'm sure that it's not recommened but you can achieve that using a few
>>changes in your project.xml setup.
>>
>>use:
>><sourceModifications>
>> <excludes>
>> <exclude>**/Test*.java</exclude>
>> </excludes>
>> </sourceModifications>
>>to prevent building ur test classes into your src.
>>then for ur unitTest declaration do something like:
>>
>> <unitTest>
>> <includes>
>> <include>**/Test*.java</include>
>> </includes>
>> </unitTest>
>>
>>along with a unitTestSourceDirectory that matches ur sourceDirectory.
>>
>>
>
>Now I'm going to have add something that halts the build if any
>derivatives of org.junit.Test* are found in the source directory :-)
>
>
>
>>-Tim
>>
>>Chad Woolley wrote:
>>
>>
>>
>>>Hello,
>>>
>>>I want to implement maven on an existing project, which has the unit
>>>tests in the same directories as the classes they test.
>>>
>>>Is this supported with maven? I read the test plugin docs, but I
>>>don't see any properties or any info there...
>>>
>>>Thanks,
>>>Chad
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>>>
>>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>For additional commands, e-mail: users-help@maven.apache.org
>>
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Is it possible to keep unit tests in the same directories as
production classes?
Posted by Jason van Zyl <jv...@maven.org>.
On Mon, 2003-12-08 at 16:20, Tim Chen wrote:
> I'm sure that it's not recommened but you can achieve that using a few
> changes in your project.xml setup.
>
> use:
> <sourceModifications>
> <excludes>
> <exclude>**/Test*.java</exclude>
> </excludes>
> </sourceModifications>
> to prevent building ur test classes into your src.
> then for ur unitTest declaration do something like:
>
> <unitTest>
> <includes>
> <include>**/Test*.java</include>
> </includes>
> </unitTest>
>
> along with a unitTestSourceDirectory that matches ur sourceDirectory.
Now I'm going to have add something that halts the build if any
derivatives of org.junit.Test* are found in the source directory :-)
> -Tim
>
> Chad Woolley wrote:
>
> > Hello,
> >
> > I want to implement maven on an existing project, which has the unit
> > tests in the same directories as the classes they test.
> >
> > Is this supported with maven? I read the test plugin docs, but I
> > don't see any properties or any info there...
> >
> > Thanks,
> > Chad
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
--
jvz.
Jason van Zyl
jason@zenplex.com
http://tambora.zenplex.org
In short, man creates for himself a new religion of a rational
and technical order to justify his work and to be justified in it.
-- Jacques Ellul, The Technological Society
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Is it possible to keep unit tests in the same directories as
production classes?
Posted by Tim Chen <tc...@tampabay.rr.com>.
I'm sure that it's not recommened but you can achieve that using a few
changes in your project.xml setup.
use:
<sourceModifications>
<excludes>
<exclude>**/Test*.java</exclude>
</excludes>
</sourceModifications>
to prevent building ur test classes into your src.
then for ur unitTest declaration do something like:
<unitTest>
<includes>
<include>**/Test*.java</include>
</includes>
</unitTest>
along with a unitTestSourceDirectory that matches ur sourceDirectory.
-Tim
Chad Woolley wrote:
> Hello,
>
> I want to implement maven on an existing project, which has the unit
> tests in the same directories as the classes they test.
>
> Is this supported with maven? I read the test plugin docs, but I
> don't see any properties or any info there...
>
> Thanks,
> Chad
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Is it possible to keep unit tests in the same directories as
production classes?
Posted by Martin van den Bemt <ml...@mvdb.net>.
Don't know if it is possible, but I know that some report plugins will
not work correctly if you have them together...
Mvgr,
Martin
On Mon, 2003-12-08 at 22:06, Chad Woolley wrote:
> Hello,
>
> I want to implement maven on an existing project, which has the unit
> tests in the same directories as the classes they test.
>
> Is this supported with maven? I read the test plugin docs, but I don't
> see any properties or any info there...
>
> Thanks,
> Chad
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
--
Martin van den Bemt <ml...@mvdb.net>
mvdb.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Is it possible to keep unit tests in the same directories as
production classes?
Posted by Jason van Zyl <jv...@maven.org>.
On Mon, 2003-12-08 at 16:06, Chad Woolley wrote:
> Hello,
>
> I want to implement maven on an existing project, which has the unit
> tests in the same directories as the classes they test.
No, not supported directly and won't be.
> Is this supported with maven? I read the test plugin docs, but I don't
> see any properties or any info there...
Move, them into a separate directory and make your life easier. Having
them in the same directory makes everything a complete drag and
unmanageable as reporting accurately on application code vs test code.
> Thanks,
> Chad
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
--
jvz.
Jason van Zyl
jason@zenplex.com
http://tambora.zenplex.org
In short, man creates for himself a new religion of a rational
and technical order to justify his work and to be justified in it.
-- Jacques Ellul, The Technological Society
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org