maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jerome Lacoste" <jerome.laco...@gmail.com>
Subject Re: integration-test practices
Date Wed, 28 May 2008 05:19:50 GMT
On Tue, May 27, 2008 at 11:34 PM, Wendy Smoak <wsmoak@gmail.com> wrote:
> On Tue, May 27, 2008 at 1:57 PM, Jerome Lacoste
> <jerome.lacoste@gmail.com> wrote:
>> On Mon, May 26, 2008 at 1:41 AM, Kaizer H. Sogiawala <kaizers@gmail.com> wrote:
>>> A while back I came across a note about integration test - From a
>>> single project POM you can only choose to execute either unit or the
>>> integration test, not both. Could that be a factor in the outcome you
>>> see?
>>
>> Are you sure of that ? Maven doesn't limit you. You can attach your
>> mojos to the phase you want.
>>
>> I have a project under my eyes that binds surefire to the test phase,
>> and easyb tests to the integration-test one.
>
> The limitation is that there is only one testSourceDirectory in the
> pom.  If you use Surefire in both the test and integration-test
> phases, you have to configure includes and excludes to get it to use
> the right code for each set of tests.

You're right: there's at least one big limitation is the compiler
plugin. testCompile only uses the test source directory defined in the
POM:

    /**
     * The source directories containing the test-source to be compiled.
     *
     * @parameter expression="${project.testCompileSourceRoots}"
     * @required
     * @readonly
     */
    private List compileSourceRoots;

> My guess is that 'easyb' is using a different default or configuration
> for its test source directory.

yep. And all tools I've used for integration-tests had their own source dirs.

So the problem is probably not that you can chose to execute it or
unit test, it's that you can only compile one of them easily.

Cheers,

Jerome

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


Mime
View raw message