mojohaus / flatten-maven-plugin

Flatten Maven Plugin
https://www.mojohaus.org/flatten-maven-plugin/
Apache License 2.0
205 stars 84 forks source link

pomElements co-filtering #56

Open Andrei-Pozolotin opened 7 years ago

Andrei-Pozolotin commented 7 years ago

1) when using flatten with:

<pomElements>
   <build>keep</build>
   <profiles>keep</profiles>
   <pluginManagement>resolve</pluginManagement>

2) flatten will resolve and keep all inherited from parent(s) plugins, regardless of what is actually used by other sections such as <build> and <profiles> of the pom

3) expected behavior is to filter out non-relevant plugins, otherwise resulting pom is littered with spurious entries

hohwille commented 5 years ago

I do not see how to do this without artificial intelligence or lots of work. This is IMHO more complex as it looks in the first place. PR is welcome of course...