CruiseControl doesn't support the property tag within a maven tag (like
it does for ant). One workaround would be to use a different
mavenscript value for those builds. You could create a different batch
file that calls into the normal maven.bat and adds the system properties
on the command line.
For example:
mymaven.bat:
E:\\Maven 1.0.2\\bin\\maven.bat
-Dtest.run.type=integration %*
then put this in your config.xml:
<maven mavenscript="E:\\mymaven.bat"
projectfile="checkout/trunk/project.xml"
goal="scm:update clean test" multiple="1">
</maven>
-----Original Message-----
From: Guy Davis [mailto:[EMAIL PROTECTED]
Sent: Monday, June 20, 2005 2:41 PM
To: Maven Users List
Subject: Re: How to split unit and acceptance tests apart (both use
Junit framework)
Hi Marcell,
Thanks for the tip. I've already done this so that 'maven clean test'
is the same as 'maven -Dtest.run.type=unit clean test'. However, for
the two other possibilities (integration and system), I can't rely on
the default as you describe.
Here's my Maven tag in CC's config.xml:
<maven mavenscript="E:\\Maven 1.0.2\\bin\\maven.bat"
projectfile="checkout/trunk/project.xml"
goal="scm:update clean test" multiple="1">
</maven>
Unfortunately, there either is a bug or no support for adding the
following:
<maven mavenscript="E:\\Maven 1.0.2\\bin\\maven.bat"
projectfile="checkout/trunk/project.xml"
goal="scm:update clean test" multiple="10">
<property name="test.run.type" value="integration">
</maven>
I'm trying to do this all from a single Cruise Control project with
multiple <maven> builders in my main <schedule>. As such, there is only
one checked out sandbox and thus only one project.properties with the
default "test.run.type=unit" set.
To clarify your suggestion, are you saying I should somehow specify
different project.properties files within the same project. What CC
config.xml syntax would you use?
Thanks,
Guy
Marcell Manfrin Barbacena wrote:
> Define at project.properties the default value of test.run.type to
> unit. This way CruiseControl will use the default value.
>
> []'s
>
> On 6/20/05, Guy Davis <[EMAIL PROTECTED]> wrote:
>
>>Thanks, Justin. This approach should meet our needs for now. Now I
>>just have to figure out how to configure CruiseControl to pass a
>>system property to Maven.
>>
>>Guy
>>
>>[EMAIL PROTECTED] wrote:
>>
>>>here's our project dir structure:
>>>
>>>src/
>>>test/
>>> +- unit/
>>> +- integration/
>>> +- system/
>>>
>>>with the following project.xml entry:
>>>
>>><unitTestSourceDirectory>test/${test.run.type}</unitTestSourceDirecto
>>>ry>
>>>
>>>then it's just a matter of setting the appropriate run type (default
>>>is
>>>unit) prior to executing the test goal.
>>
>>
>>
>>---------------------------------------------------------------------
>>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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]