I have a few problems I need to work through before the next enforcer release.
First is that the enforce-once mojo declares @aggregator but still executes for all children. (MENFORCER-12) Is this a bug in maven or are aggregators still supposed to be inherited and executed? It doesn't seem to make sense that you would want to aggregate at each level every time even for things like site or archetypeNG:create-from-project. If this is how it's supposed to work, then I need to come up with another solution to make enforce-once only run once each build. This should be able to be set at the top parent but execute once and only once no matter where you run the build (parent, child,grandchild etc) I'm thinking that I might need to mess with the execution params in the generated plexus config for the plugin. Any ideas? The next one is sorta related to the first. I've added some rules that require dependency resolution. Since there's currently no easy way to resolve dependencies inside the mojo besides @requiresDependencyResolution, I just set that. Unfortunately the combination of aggregator and dependencyResolution is broken in maven and causes all kinds of havoc (MNG-2277 / MENFORCER-11). One way I thought to work around this is to make another enforcer goal like enforce:dependencies and then allow the rules to declare they need dependencies resolved and then warn and skip if they are configured to execute inside the regular enforce-once goal. This workaround seems kinda lame but even fixing MNG-2277 in 2.0.8 means it's still broken for those with older versions which isn't good either. Suggestions? Thanks, Brian