3 votes

Formatting Maven Errors

Maven conveniently puts all errors at the end of a build.

However, the error messages are not formatted. The errors messages are presented as once giant line via word wrap.

I'm on a windows box, using Git Bash to run maven.

I could futz around and make a macro in Notepad++ for formatting the error messages into a more readable format.

Before I go that route I was wondering if maven had any handy settings or if there is some handy utility that will do that for me.

2 comments

  1. [2]
    davek804
    Link
    Can you paste an error in the format you see it? When I look at maven errors, I think they're fantastically clear. I deal with a lot of multi-modules projects wherein one module is NodeJS, and the...

    Can you paste an error in the format you see it? When I look at maven errors, I think they're fantastically clear. I deal with a lot of multi-modules projects wherein one module is NodeJS, and the rest are Java. Both spit out pretty clear/useful stack traces.

    1 vote
    1. BeanBurrito
      Link Parent
      I don't have any such errors at the moment. My problem is that when you reach the bottom of the maven build output each error is appended to '[ERROR]'. That message can be very long and is just...

      I don't have any such errors at the moment.

      My problem is that when you reach the bottom of the maven build output each error is appended to '[ERROR]'. That message can be very long and is just word wrapped

      [ERROR]1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
      [ERROR]22222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222

      I'm looking for something that will format it to make it readable and more quickly discernable:

      [ERROR] Target XYZ failed. Failed to obtaim org.acme.build.snapshot:
      Failure 1
      jar1
      jar 2
      jar 3
      Failure 2
      pom1.xml
      pom2.xml

      1 vote