Can Maven be made less verbose?

后端 未结 8 2115
遥遥无期
遥遥无期 2020-12-13 08:42

Maven spews out far too many lines of output to my taste (I like the Unix way: no news is good news).

I want to get rid of all [INFO] lines, but I couldn

相关标签:
8条回答
  • 2020-12-13 09:15

    My problem is that -q is too quiet. I'm running maven under CI

    With Maven 3.6.1 (April 2019), you now have an option to suppress the transfer progress when downloading/uploading in interactive mode.

    mvn --no-transfer-progress ....
    

    or in short:

    mvn -ntp ... ....
    

    That is what Ray proposed in the comments with MNG-6605 and PR 239.

    0 讨论(0)
  • 2020-12-13 09:15

    If you only want to get rid of the [INFO] messages you also could do:

    mvn ... | fgrep -v "[INFO]"
    

    To suppress all outputs (except errors) you could redirect stdout to /dev/null with:

    mvn ... 1>/dev/null
    

    (This only works if you use bash (or similar shells) to run the Maven commands.)

    0 讨论(0)
提交回复
热议问题