On Tue, Sep 15, 2020 at 1:12 PM Andreas Sewe <andreas_s...@buildingblobs.com>
wrote:

> My situation is unfortunately a bit more complex than that, as I have
> *two* <execution>s of the maven-enforcer-plugin, only one of which
> should be affected by -DskipChecks. The other simply uses the
> <requireMavenVersion> rule, which IMHO shouldn't easily be disabled (but
> should still respect -Denforcer.skip)
> [...]
> What I want is this:
> [...]

-Denforcer.skip, being the more direct option, should
> take precedence over -DskipChecks.
>

Just an idea:

<properties>
  <enforcer.skip>false</enforcer.skip>
  <skipChecks>${enforcer.skip}</skipChecks>
</properties>

This way if you set -DskipChecks=true, then only <id>checks</id> would be
skipped, but if you set -Denforcer.skip=true, it would also cause
skipChecks to be true, so both executions would be skipped. I haven't
actually tested it though.

--
Andy Feldman

Reply via email to