maven icon indicating copy to clipboard operation
maven copied to clipboard

[MNG-7588] generate reader and some beans automatically for plugin

Open kwin opened this issue 3 years ago • 5 comments

descriptor

WIP (i.e. Core module is currently broken)

kwin avatar Oct 30 '22 08:10 kwin

@gnodet Do we need to keep the old beans in org.apache.maven.plugin.descriptor for backwards compatibility or is that not considered public API?

kwin avatar Oct 30 '22 08:10 kwin

@gnodet Do we need to keep the old beans in org.apache.maven.plugin.descriptor for backwards compatibility or is that not considered public API?

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.

gnodet avatar Oct 30 '22 19:10 gnodet

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 org.apache.maven.plugin.descriptor.v11. WDYT?

kwin avatar Oct 31 '22 11:10 kwin

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 org.apache.maven.plugin.descriptor.v11. WDYT?

Sounds good to me.

gnodet avatar Nov 07 '22 23:11 gnodet

I would like to migrate all usage of Maven Core from the old descriptor to the new immutabledescriptor package. But the question is again, do we consider interfaces like https://github.com/apache/maven/blob/master/maven-core/src/main/java/org/apache/maven/plugin/BuildPluginManager.java API, i.e. do we need to evolve it in a backwards-compatible way? If yes, should we introduce new interfaces relying on the immutable descriptor or just add new methods to the existing interfaces? @gnodet You changed org.apache.maven.plugin.lifecycle.Lifecycle in a backwards-incompatible way, as Maven 3 exposes setter methods (https://maven.apache.org/ref/3-LATEST/apidocs/org/apache/maven/plugin/lifecycle/Lifecycle.html).

kwin avatar Nov 09 '22 11:11 kwin