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

   This adds a profile called bootstrap. This profile is not run by default. 
When it is activated, the module `maven-plugin-plugin-bootstrap` is built. It 
is composed of all the sources of `maven-plugin-plugin` module and two 
additional files: the 
`org/apache/maven/plugin/plugin/StandaloneDescriptorGenerator.java` and its 
unit test.
   This is basically a class that uses already built modules to generate a 
minimal plugin descriptor plugin.xml, which allows this module to be run as 
maven plugin. Its packaging is `jar` in order to avoid the lifecycles that come 
with the `maven-plugin` packaging. Once this is built, the module 
`maven-plugin-plugin` will use it for the generation of its HelpMojo.java and 
its descriptors.
   This uses the fact that maven is able to use its own reactor modules in the 
build of further modules. The mojos run from this bootstrap plugin will be the 
same mojos that will be called and the generated xml files and the 
HelpMojo.java will be identical to ones that would be generated by a 
non-bootstrap plugin. The `maven-plugin-report-plugin` will then use the 
non-bootstrap plugin for its own lifecycle.
   The `maven-plugin-plugin-bootstrap` artifact is guarded against installation 
to the local maven repository and against publishing or deployment. It is 
purely useful for the bootstrapping. And bootstrapping it does indeed. I 
checked, when using this bootstrap profile with clean local maven repository, 
none of the `maven-plugin-tools` artifacts were installed. All were compiled 
without needing any of their older version.
   The StandaloneDescriptorGenerator class contains only code that is needed 
for generating a plugin descriptor that allows the bootstrap plugin to be ran. 
With a notable exception that I left in methods that allow generation of the V4 
index and the mojo factory classes, if once it is needed so that nobody needs 
to reinvent a wheel that I already invented.
   


-- 
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