2016-08-24 6 views
1

현재 Eclipse Neo와 STS Gradle Plugin을 통해 Gradle 2.x/3.x 빌드를 실행 중입니다. 건물에 문제가있는 경우 (예 : compileJava 작업에서 무엇이 잘못 되었는가에 대한 자세한 정보를 얻습니다. (이클립스 콘솔 탭에서 이클립스의 콘솔 탭에 인쇄 된 다음 빌드 예외에 대한 일종의 stacktrace가 출력됩니다. 콘솔 탭을 stdoutin으로 인쇄했습니다.)STS Gradle에서 stracktrace/BuildException 출력을 비활성화합니다.

여기

는 예를 들어 출력이다.

[sts] ----------------------------------------------------- 
[sts] Starting Gradle build for the following tasks: 
[sts]  compileJava 
[sts] ----------------------------------------------------- 
[...] 
1 error 

FAILURE: Build failed with an exception. 

* What went wrong: 
Execution failed for task ':compileJava'. 
> Compilation failed; see the compiler error output for details. 

* Try: 
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. 
[sts] Build failed 
org.gradle.tooling.BuildException: Could not execute build using Gradle distribution 'https://services.gradle.org/distributions/gradle-2.14-bin.zip'. 
at org.gradle.tooling.internal.consumer.ResultHandlerAdapter.onFailure(ResultHandlerAdapter.java:57) 
at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(DefaultAsyncConsumerActionExecutor.java:57) 
at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:64) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) 
at java.lang.Thread.run(Unknown Source) 
at org.[...] 

스택 트레이스는 [STS]와 함께 제공 그래서 나는 그것이 Gradle을 직접 아니라고 생각 스택 트레이스의 인쇄를 억제하는 방법이 있나요

답변

1

? gradles STS 빌드 플러그인이 스택 추적을 해제하는 방법을 제공하지 않습니다 pr inting.
how this stack trace printing is implemented in the plugin source을 통해 확인할 수 있습니다.
모든 출력이 동일한 인쇄 스트림으로 보내 지므로 인쇄되는 내용을 세부적으로 제어 할 수있는 로깅 프레임 워크 나 구성 옵션이 없습니다.
그것은이 플러그인이 buildship plugin에 찬성 사용되지 않습니다 (그리고 최소한으로 유지되고) 있음을 주목할 필요가있다.
buildship 플러그인이 동일한 스택 추적 인쇄 동작을 나타내지 않습니다.

+0

소스 코드를 알려 주셔서 감사합니다! –