apache / apache/maven

[MNG-7426] Allow condition (like <activation>) on mojo executions

Open
#9,153 1 comment 0 reactions 0 assignees View on GitHub
enhancement priority:major
Dominant language
Java
Stars
5.3k
Forks
3.1k
Avg merge
20h 42m
Merged PRs (30d)
297

Description

**[Mickael Istria](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=mickael.istria)** opened **[MNG-7426](https://issues.apache.org/jira/browse/MNG-7426?redirect=false)** and commented

There are some goals that are only expected to run under some circumstances (eg a file exists, we're running on a particular OS...). The current solution to implement that is to create profiles and profiles are great particularly when multiple invocations or other configurations are involved as they allow to group things into a meaningful block; however in many cases, one can want to just decide to enable/disable 1 particular mojo execution. For those cases where only 1 execution is conditional, profiles seem like a lot of boilerplate and complexity.

Instead, we could imagine to add to `` element some `` (or whatever other meaningful name) child that would allow similar evaluations as what's possible with profile execution. When the activation condition is set and returns false, then the execution would be simply skipped.

---

1 votes, 2 watchers

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.