[MNG-7588] generate reader and some beans automatically for plugin#862
[MNG-7588] generate reader and some beans automatically for plugin#862
Conversation
|
@gnodet Do we need to keep the old beans in |
| </models> | ||
| <templates> | ||
| <template>src/main/mdo/model.vm</template> | ||
| <template>src/main/mdo/reader.vm</template> |
There was a problem hiding this comment.
should we generate a writer here or rather separately in m-plugin-tools?
We need to be very cautious for some time and avoid breaking compatibility as much as possible. The new api is still in alpha and we need to upgrade most plugins before even deprecating all the old parts. |
| <!-- remove those classes which need to ba maintained manually --> | ||
| <includes> | ||
| <include>MojoDescriptor.java</include> | ||
| <include>PluginDescriptor.java</include> |
There was a problem hiding this comment.
A better idea imho would be to tweak the src/mdo/model.vm to add a list of classes to not generate instead of generating them and removing them. A variable similar to packageModelV4 should work.
gnodet
left a comment
There was a problem hiding this comment.
The generated classes are incompatible with the existing ones, so I fear this is a big change. The maven-plugin-plugin will probably be broken by such a change.
That's why for the v4 api, I've rather created entirely new packages so that we can phase the old ones out while keeping compatibility.
Maybe I'm wrong, but I think the fact that the MojoDescriptor and PluginDescriptor inherits the plexus ComponentSetDescriptor is only used internally in maven. If that's actually the case, I would favor trying to build a brand new and clean object model (without plexus) and only create the plexus required classes from those generated classes when needed.
|
Ok, so when generating descriptor beans in a dedicated package, where should this live? IMHO it doesn't make sense to expose under https://github.com/apache/maven/tree/master/api/maven-api-core. This should rather be a private package (only for consumption of Maven Core and maybe Maven Plugin Tools). I don't think it would be useful to add this to the documented v4 API of Maven. So I am rather thinking about putting the new/clean/immutable plugin descriptor classes into |
Sounds good to me. |
7229cd1 to
4c71859
Compare
|
I would like to migrate all usage of Maven Core from the old |
|
Resolve #8933 |
|
@kwin do you want plan to work on it? |
|
Not in the near future I fear |
descriptor
WIP (i.e. Core module is currently broken)