2017-05-04 2 views
0

MVN 깨끗한 나는 이러한 오류 받고 있어요 내 프로젝트에 설치 사용하려고 : 해당 파일의 끝 부분에 단락 또는 \ n을 넣기파일은 줄 바꿈 [NewlineAtEndOfFile] 끝나지 않습니다

[ERROR] C:\Users\lob\Downloads\zanata-platform-platform-4.0.0\zanata-platform-platform-4.0.0\parent\eclipse-code-formatter-js.xml:0: File does not end with a newline. [NewlineAtEndOfFile] 
[ERROR] C:\Users\lob\Downloads\zanata-platform-platform-4.0.0\zanata-platform-platform-4.0.0\parent\eclipse-code-formatter.xml:0: File does not end with a newline. [NewlineAtEndOfFile] 
[ERROR] C:\Users\lob\Downloads\zanata-platform-platform-4.0.0\zanata-platform-platform-4.0.0\parent\pom.xml:0: File does not end with a newline. [NewlineAtEndOfFile] 
[ERROR] C:\Users\lob\Downloads\zanata-platform-platform-4.0.0\zanata-platform-platform-4.0.0\parent\README.txt:0: File does not end with a newline. [NewlineAtEndOfFile] 
Audit done. 
[INFO] There are 4 errors reported by Checkstyle 7.2 with zanata-build-tools/checkstyle.xml ruleset. 
[ERROR] eclipse-code-formatter-js.xml:[0] (misc) NewlineAtEndOfFile: File does not end with a newline. 
[ERROR] eclipse-code-formatter.xml:[0] (misc) NewlineAtEndOfFile: File does not end with a newline. 
[ERROR] pom.xml:[0] (misc) NewlineAtEndOfFile: File does not end with a newline. 
[ERROR] README.txt:[0] (misc) NewlineAtEndOfFile: File does not end with a newline. 

을하지 않습니다 이 문제를 해결하십시오. Eclipse에서 Window >> Preferences >> Checkstyle >> Select the configuration file >> 아래의 파일은 나열되지 않습니다.

사용 :

  • Windows가 10
  • 자바 8
  • 이클립스 Neon.1 (4.6.1)
  • 메이븐 3.0.4
+0

편집 : 그것은 리눅스 프로젝트의 – lob

답변

1

원인은 checkstyle입니다 규칙NewlineAtEndOfFile을 호출하면 프로젝트의 파일 중 하나에 새 행이없는 경우 빌드가 성공하지 못합니다. 끝에서.

규칙은 말한다 :

이론적 근거 : 일반적으로 모든 소스 파일과 텍스트 파일을 쉽게 다른하자 파일의 마지막에 새로운 내용을 추가하고 "DIFF"명령을 수행하는 라인 분리기로 끝나야합니다 이전 행을 변경된 것으로 표시하지 않습니다.

:

그래서 수행을해야하는지, 위의 로그에 언급 된 각 파일의 끝에 새 줄을 추가하는 것입니다. eclipse-code-formatter-js.xml

. eclipse-code-formatter.xml

. pom.xml

. 이 규칙에 대한 자세한 정보를 정기적으로 들어

을 README.TXT : checkstyle-NewlineAtEndOfFile-rule