[MNG-6336] Aggregator Mojo should be executed only once even when part of the lifecycle
- Dominant language
- Java
- Stars
- 5.3k
- Forks
- 3.1k
- Avg merge
- 20h 40m
- Merged PRs (30d)
- 275
Description
**[Francois MAROT](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=fmarot)** opened **[MNG-6336](https://issues.apache.org/jira/browse/MNG-6336?redirect=false)** and commented
Currently aggregator Mojo (annotated with `@Mojo`(aggregator=true, ...) ) are used to define Mojo whose goal whould be called directly, not bound to a lifecycle phase.
This is the case for release:prepare / release:perform for exemple.
I would be good if such aggregator Mojo ware also executed only once when part of a lifecycle. Currently we have to specify \false\ in the pom.
It would comply to the principle of least surprise because it seems every doc I found just say something "like these Mojo will be executed only once", and do not specify "in the case of direct invocation".
I first reported this behavior on the mailing list: http://maven.40175.n5.nabble.com/Make-custom-plugin-executed-only-once-in-multimodule-inherited-false-aggregator-td5921630.html
This JIRA may be related to improvement in the lifecycle ( MNG-5665 ) as suggested by [Robert Scholte](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=rfscholte)
---
**Affects:** 3.5.2
**Issue Links:**
- [MNG-7991](https://issues.apache.org/jira/browse/MNG-7991) refactor "aggregator" goal feature
(_**"is part of"**_)
1 votes, 2 watchers
Contributor guide
Assessment
This issue has not been assessed yet.