0

I did a git clone from github git://github.com/netty/netty.git followed by mvn clean install. However I got the following errors from maven checkstyle plugin

C:\git\netty\common\src\main\java\io\netty\util\UniqueName.java:106: Line matches the illegal pattern '\r'.
C:\git\netty\common\src\main\java\io\netty\util\UniqueName.java:107: Line matches the illegal pattern '\r'.
C:\git\netty\common\src\main\java\io\netty\util\UniqueName.java:108: Line matches the illegal pattern '\r'.
C:\git\netty\common\src\main\java\io\netty\util\UniqueName.java:109: Line matches the illegal pattern '\r'.
....
Audit done.

I use a windows 7 machine with java version "1.7.0_06". How do prevent these errors and get a good compile?

parsley72
  • 8,449
  • 8
  • 65
  • 98
Abe
  • 8,623
  • 10
  • 50
  • 74

2 Answers2

1

You'll need to configure git to use lf only: https://help.github.com/articles/dealing-with-line-endings#platform-windows

trustin
  • 12,231
  • 6
  • 42
  • 52
  • Shouldn't the .gitattributes file for Netty also be checked in to git in this case? – Abe Sep 06 '12 at 05:01
0

You may just edit these files and replace \r to \n.

Or if you want just compile project and ignore all messages from checkstyle, I suggest to set properties failsOnError and failOnViolation to false (in code: https://github.com/netty/netty/blob/master/pom.xml#L311) In this case checkstyle still will check the sources, but will not fail it when find something.

Slava Semushin
  • 14,904
  • 7
  • 53
  • 69