nielsbasjes commented on code in PR #104: URL: https://github.com/apache/maven-release/pull/104#discussion_r1128251823
########## maven-release-api/src/main/java/org/apache/maven/shared/release/config/ReleaseDescriptor.java: ########## @@ -426,6 +426,13 @@ */ String getProjectVersionPolicyId(); + /** + * Get the (optional) config for the VersionPolicy implementation used to calculate the project versions. + * + * @return The parsed XML of the provided config (an instance of XmlPlexusConfiguration) or null. + */ + Object getProjectVersionPolicyConfig(); + Review Comment: Trying to make it cleaner. Observations so far: - In the Modello of the `ModelloReleaseDescriptor` the config needs to be of type `DOM`. If it isn't then I have to wrap the config into CDATA which makes it a terrible developer experience. - This generated class contains: `private Object projectVersionPolicyConfig;` and the related getter and setter that go with this also use `Object` as the class. - I checked the Modello code and I do not see a way to let it return a different type (like a `VersionPolicyConfig`). - These getters and setters must be the same in the `ReleaseDescriptor` interface (i.e. also `Object`. This is the code you mentioned. If I simply change the return type then this results in a conflict with the generated code. I'm unable to change the generated code regarding this type. Note that the other reason for the way I have it now was that at some point the config is also stored in a Property ... which only accepts String. Please advise. I'm a bit stuck. -- 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: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org