fridrich commented on PR #1189:
URL: 
https://github.com/apache/maven-plugin-tools/pull/1189#issuecomment-5596486795

   > What problem do you try to resolve?
   > 
   > What is a use case for it?
   
   As a distro packager, I come to this kind of situation when a package has 
circular dependency on itself, like maven-plugin-plugin module has. In a 
situation when one can download the whole internet, those kind of things are 
solvable by using an artifact with lower version. But this self-reference is a 
complete nightmare for distro packagers. It was a spine in my heel for quite a 
long time. So, once I decided to tackle it and came with this solution that has 
several arguments for itself:
   - It's fully opt-in: -Pbootstrap profile, extra module only added to the 
reactor under that profile. It has zero impact on the default build, release 
process, or DescriptorGeneratorMojo/HelpGeneratorMojo themselves.
   - It solves a genuine problem. Any distro/packaging system doing 
from-scratch bootstrap of the Maven plugin ecosystem hits the exact same 
maven-plugin-plugin self-reference wall. This isn't openSUSE specific, so 
Fedora or other RPM-based distros doing similar work would likely find it 
useful too.
   - The mechanism is clever but not exotic or hacky. Reactor-plugin-resolution 
across sibling modules is a real Maven feature, not a hack against Maven's 
internals.
   
   I had also other version of the standalone generator where I was able to 
reproduce almost 1:1 identical plugin.xml and completely identical 
HelpMojo.java as well as the V4 factories and indices. But that would be more 
intrusive and I preferred to trim it down to this, since inside xmvn context, I 
am able to build a random plugin by a generated ant build and generate the 
HelpMojo.java by running plugin:helpmojo outside of maven lifecycle and after 
the build generate the descriptors by running plugin:descriptor outside of the 
lifecycle too.
   
   I know that this is a long shot with trying to upstream it, but I tried to 
make it as minimal as possible.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to