[MNG-7588] generate reader and some beans automatically for plugin
descriptor
WIP (i.e. Core module is currently broken)
@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?
@gnodet Do we need to keep the old beans in
org.apache.maven.plugin.descriptorfor 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.
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?
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.
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).