Skip to content
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

Multiple executions of display-X-updates overwrite outputFile #979

Open
ctubbsii opened this issue Jun 28, 2023 · 4 comments
Open

Multiple executions of display-X-updates overwrite outputFile #979

ctubbsii opened this issue Jun 28, 2023 · 4 comments

Comments

@ctubbsii
Copy link

Executing multiple goals in a single command-line causes the most recent one to clobber the selected output file instead of append to it, or add a unique identifier name.

Example:

mvn clean verify versions:display-parent-updates versions:display-property-updates versions:display-plugin-updates -Dversions.outputFile=target/versions-output.txt

In order to get the output for all executions, you must run multiple executions of the plugin with different config, which you can either do with separate command-line executions, or you have to specify different executions in the POM file.

Also, the contents of the file wrap according to the outputLineWidth, when it should not wrap at all when written to a file.

It would be good to have an option for an output file format that is computer-readable, not subject to line width wrapping issues, and such that subsequent executions will append/modify the file, rather than clobber it (they would only clobber the section applicable to that taskk... whether it's properties, plugins, parent, or dependencies).

@slawekjaranowski
Copy link
Member

@ctubbsii Thanks for report, I see many issues here:

  • overwriting outputFile
  • wrap according to the outputLineWidth in output files
  • output report in computer-readable format

@ctubbsii
Copy link
Author

@slawekjaranowski That's a good summary. Having a computer readable output that always appends and never wraps would satisfy all three. Something with a comma-delimited format like the following might work:

versionPluginGoal,groupId:artifactId:classifier:type,currentVersion,newVersion

Example:

parent,org.apache:apache:pom,20,29
property,org.apache.maven.plugins:maven-surefire-plugin:jar,2.20.0,3.1.0
property,org.apache.maven.plugins:maven-failsafe-plugin:jar,2.20.0,3.1.0
plugin,org.apache.maven.plugins:maven-enforcer-plugin:jar,1.2.0,3.0.0
dependency,commons-codec:commons-codec:jar,1.0,2.5

Could also use XML or JSON as the output format, but that'd be harder to parse with simple command-line tools.

Copy link

This issue is stale because it has been open 365 days with no activity. Remove stale label or comment or this will be closed in 30 days.

@github-actions github-actions bot added the Stale label Sep 11, 2024
@ctubbsii
Copy link
Author

This is still relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants