I've run across multiple broken plugins that follow the deployAtEnd
implementation found in the deploy plugin. The intent is to delay an
action until the end of the aggregation cycle. In the current
implementation, there are multiple problems;
1. If one or more of the aggregated modules skip the plugin, the
counter will never reach the number of plugins
2. If the aggregated modules have different extensions enabled, the
different invocations will be in different ClassLoaders, therefore
different counters will be used.
A solution is to share state in the session userProperties. The
full details are in a github pull request 
Please validate that this is the best imlementation of the 'atEnd'
idiom. If this pull request is accepted, I will write up the details
for the Maven plugins Cookbook