-
Notifications
You must be signed in to change notification settings - Fork 271
#979: overhaul of the updates logger #1284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
versions-common/src/main/java/org/codehaus/mojo/versions/recording/ChangeRecorderRenderer.java
Show resolved
Hide resolved
7925f48 to
b9e1ff6
Compare
1b35363 to
8bdc23a
Compare
8bdc23a to
76a08c2
Compare
dc693cf to
c12f66e
Compare
|
Will add an example of change recorder logs to DisplayDependencyUpdates. |
9228a70 to
cb4f410
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR comprehensively overhauls the updates logger by extending the API and introducing new serialization formats. The key changes include:
- Migration from Modello to JAXB for XML schema generation, enabling multi-format serialization
- Introduction of new XML schema (3.0) with appendable execution records
- Addition of JSON and CSV output formats alongside the existing XML format
- Refactoring of change recording from a single
ChangeRecorderinterface to a factory-basedVersionChangeRecorderFactorypattern - Deprecation of old API while maintaining backwards compatibility
Reviewed Changes
Copilot reviewed 149 out of 150 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| versions-model/src/main/resources/xsd/updates-3.0.xsd | New XSD schema v3.0 supporting appendable execution logs with metadata |
| versions-model/src/main/resources/xsd/bindings.xjb | JAXB bindings configuration for schema-to-Java generation |
| versions-model/src/main/java/org/codehaus/mojo/versions/model/xjb/ZonedDateTimeXmlAdapter.java | Custom JAXB adapter for ZonedDateTime serialization |
| versions-test/src/main/java/org/codehaus/mojo/versions/utils/TestVersionChangeRecorder.java | Refactored test recorder implementing new VersionChangeRecorder interface |
| versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/AbstractVersionsUpdaterMojo.java | Updated to use factory pattern and support multiple output formats |
| versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UseLatestVersionsMojoBase.java | Refactored to use new DependencyVersionChange model |
| versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/DisplayPropertyUpdatesMojo.java | Added change recording for display mojos |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
versions-model/src/main/java/org/codehaus/mojo/versions/model/xjb/ZonedDateTimeXmlAdapter.java
Show resolved
Hide resolved
versions-test/src/main/java/org/codehaus/mojo/versions/utils/CloseableTempFile.java
Show resolved
Hide resolved
versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UnlockSnapshotsMojo.java
Outdated
Show resolved
Hide resolved
versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/SetMojo.java
Show resolved
Hide resolved
...plugin/src/main/java/org/codehaus/mojo/versions/internal/DependencyUpdatesLoggingHelper.java
Outdated
Show resolved
Hide resolved
27cce9f to
5648831
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 149 out of 150 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
versions-model/src/main/java/org/codehaus/mojo/versions/model/xjb/ZonedDateTimeXmlAdapter.java
Show resolved
Hide resolved
versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/SetMojo.java
Outdated
Show resolved
Hide resolved
versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UseDepVersionMojo.java
Show resolved
Hide resolved
versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/AbstractVersionsUpdaterMojo.java
Outdated
Show resolved
Hide resolved
0ff5bdf to
2c1f1f3
Compare
|
Maybe we can use jakarta instead of javax? If it's not a big deal now? |
I tried, but I think that is not possible: we still support Java 8. https://github.com/andrzejj0/versions-maven-plugin/actions/runs/18996348155/job/54256770147 javax.xml.bind:jaxb-api:2.3.1 is the last version that supports Java 8, but it is only compatible with javax. |
|
However, it's easy to do it when we eventually drop Java 8 support (some day). Your Copilot PR would still need to use this new change recorder to record changes, but that's pretty straightforward (a prompt away). |
6626116 to
e4e2939
Compare
…new appendable xml which records multiple executions Added changeRecorder to display-property-updates, display-parent-updates, display-dependency-updates, display-extension-updates, display-plugin-updates; Added changeRecorder to display-property-updates, display-parent-updates, display-dependency-updates, display-extension-updates
e4e2939 to
70c1930
Compare
The change logger updates are now generated using an XSD schema rather than using Modello. The primary reason was the ability to easily (de)serialize using multiple formats + extensibility.
The ultimate goal of this is to use this change logger model to actually transmit updates in "display" targets as well, so that both "display" and "change" targets share the common backend.
I know it's going to be a large one, so I'm doing this in stages. First stage is this updates overhaul.
@slawekjaranowski please review
Edit: it's actually not breaking since the old API is made deprecated, but is still there, to be retired.
Edit2: I did test the site. ;)