Ekryd / sortpom

Maven plugin that helps the user sort pom.xml.
https://github.com/Ekryd/sortpom/wiki/
BSD 3-Clause "New" or "Revised" License
334 stars 178 forks source link

Tone down sortpom output #338

Closed gnodet closed 1 year ago

gnodet commented 1 year ago

When using spotless to format a number of POMs, I end up with:

[INFO] --- spotless:2.28.0:apply (default) @ core-it-suite ---
[INFO] Up-to-date checking enabled
[INFO] Index file does not exist. Fallback to an empty index
[INFO] Sorting file /var/folders/27/cvb78knj3xbdvty_5406llg40000gn/T/pom5965351127772285323.xml
[INFO] Pom file is already sorted, exiting
[INFO] Sorting file /var/folders/27/cvb78knj3xbdvty_5406llg40000gn/T/pom2262155197844819727.xml
[INFO] Pom file is already sorted, exiting
[INFO] Sorting file /var/folders/27/cvb78knj3xbdvty_5406llg40000gn/T/pom15172041996443537493.xml
[INFO] Pom file is already sorted, exiting
[INFO] Sorting file /var/folders/27/cvb78knj3xbdvty_5406llg40000gn/T/pom16267362389972598028.xml
[INFO] Pom file is already sorted, exiting
[INFO] Sorting file /var/folders/27/cvb78knj3xbdvty_5406llg40000gn/T/pom7652642504318211203.xml
[INFO] Pom file is already sorted, exiting
[INFO] Sorting file /var/folders/27/cvb78knj3xbdvty_5406llg40000gn/T/pom11256884799925871044.xml
[INFO] Pom file is already sorted, exiting
[INFO] Sorting file /var/folders/27/cvb78knj3xbdvty_5406llg40000gn/T/pom17508744454483620454.xml
[INFO] Pom file is already sorted, exiting
[INFO] Sorting file /var/folders/27/cvb78knj3xbdvty_5406llg40000gn/T/pom5276297680844189648.xml
[INFO] Pom file is already sorted, exiting
[INFO] Sorting file /var/folders/27/cvb78knj3xbdvty_5406llg40000gn/T/pom8221381498996836063.xml
[INFO] Pom file is already sorted, exiting
[INFO] Sorting file /var/folders/27/cvb78knj3xbdvty_5406llg40000gn/T/pom15758736795576591383.xml
[INFO] Pom file is already sorted, exiting
...

I'd like to introduce a flag to done down the log to debug instead of info.

Ekryd commented 1 year ago

Sounds reasonable. Maybe a flag “quiet” that removes all output from the plugin?

Ekryd commented 1 year ago

Hi! Just wanted to say that I have not forgotten this issue. I’m away at a family vacation at the moment, and so far programming has not been on the menu.

gnodet commented 1 year ago

Hi! Just wanted to say that I have not forgotten this issue. I’m away at a family vacation at the moment, and so far programming has not been on the menu.

No problem, enjoy your vacation time !

create-issue-branch[bot] commented 1 year ago

Branch issue-338-Tone_down_sortpom_output created!

Ekryd commented 1 year ago

I created a branch for the quiet flag. (I refactored the code a bit) @gnodet, can you submit a PR for the branch with an integration test? Similar functionality as maven-plugin/src/it/four-spaces-indent

Ekryd commented 1 year ago

Hi @gnodet ! I have just released version 3.3.0 of the plugin with the new quiet flag. Please try it out and see if it works for you