2011-02-24 2 views
2

maven을 사용하여 프로젝트를 빌드하면 javac로 직접 컴파일 한 것보다 인쇄가 적어 지지만 실패 할 수 있습니다. NetBeans를 사용하여 디버깅을하면 주석 처리를하지 않고 인쇄물을 볼 수 있다면 도움이 될 것입니다.모든 Java 컴파일러 출력을 어떻게 인쇄합니까?

> <plugin> 
>     <artifactId>maven-compiler-plugin</artifactId> 
>     <version>2.3.2</version> 
>     <dependencies> 
>      <dependency> 
>       <groupId>org.codehaus.plexus</groupId> 
>       <artifactId>plexus-compiler-javac</artifactId> 
>       <version>1.6</version> 
>      </dependency> 
>     </dependencies> 
>     <configuration> 
>      <source>1.6</source> 
>      <target>1.6</target> 
>      <encoding>${project.build.sourceEncoding}</encoding> 
>      <compilerId>javac</compilerId> 
>      <verbose>true</verbose> 
>      <showWarnings>true</showWarnings> 
>     </configuration> ... 

답변

0

받는다는 사이트에 example 당신이 사용하는 것을 다른 형태를 보인다 :

내 설정이다. "compilerArgument"또는 "compilerArguments"태그가 있습니다. 어쩌면 그것이 문제일까요?

+0

구성에 중복이 있습니다. http://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#showWarnings. – simpatico

0

Maven 컴파일러 플러그인은 내부적으로 plexus-compiler-javac wrapper 라이브러리를 사용하여 javac을 호출합니다. plexus-compiler-javac는 컴파일러 출력을 구문 분석하여 오류 및 경고 만 남겨 둡니다.

plexus-compiler-javac 라이브러리의 기본 개념은 표준 인터페이스를 구현하고 동일한 인터페이스를 사용하여 기본 C++ 컴파일러 또는 C# 컴파일러 ...

관련 문제