maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Broyer <t.bro...@gmail.com>
Subject Re: Skipping tests
Date Mon, 18 May 2015 08:33:40 GMT
Because maven.test.skip takes precedence over skipTests (i.e. means the
same thing for plugins that support both; maven.test.skip being understood
by more plugins –e.g. maven-compiler-plugin–, that don't support
skipTests), maybe you could define the skipTest property defaulting to
maven.test.skip?

    <maven.test.skip>false</maven.test.skip>
    <skipTests>${maven.test.skip}</skipTests>

and then configure your plugins with:

   <skip>${skipTests}</skip>

That way, -Dmaven.test.skip=true will set skipTests to true and skip your
plugins (in addition to compiler:testCompile and surefire:test, et al.),
and -DskipTests=true too (in addition to surefire:test et al. but not
compiler:testCompile)

On Mon, May 18, 2015 at 10:24 AM Sander Verhagen <sander@sanderverhagen.net>
wrote:

> Hi group,
>
>
> When test execution is being skipped, I would also like to skip some other
> plugin execution as well. As it happens, I can pass that other plugin's
> configuration a "skip" parameter. Now, skipping test execution can be
> achieved in two ways: using skipTests and using maven.test.skip. That makes
> me feel as if my other plugin can either be configured as like:
>
> <skip>${skipTests}</skip>
>
> Or:
>
> <skip>${maven.test.skip}</skip>
>
> But what I'd need is something like this:
>
> <skip>${skipTests} || ${maven.test.skip}</skip>
>
> But the latter I just made up... how to do this?
>
> Thanks, Sander.
>
>
>
> Sander Verhagen
> [  sander@sanderverhagen.net<mailto:sander@sanderverhagen.net>  ]
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message