0
我跑聲納時,遇到下列埃羅:聲納,什麼是Java目標
[11:32:40]: [:sonarTask] 11:32:40.862 [QUIET] [system.out] INFO: EXECUTION FAILURE
[11:32:40]: [:sonarTask] 11:32:40.862 [QUIET] [system.out] INFO: ------------------------------------------------------------------------
[11:32:40]: [:sonarTask] 11:32:40.862 [QUIET] [system.out] Total time: 1.031s
[11:32:40]: [:sonarTask] 11:32:40.956 [QUIET] [system.out] Final Memory: 1M/15M
[11:32:40]: [:sonarTask] 11:32:40.956 [QUIET] [system.out] INFO: ------------------------------------------------------------------------
[11:32:40]: [:sonarTask] 11:32:40.956 [ERROR] [system.err] ERROR: Error during Sonar runner execution
[11:32:40]: [:sonarTask] 11:32:40.956 [ERROR] [system.err] ERROR: Unable to execute Sonar
[11:32:40]: [:sonarTask] 11:32:40.956 [ERROR] [system.err] ERROR: Caused by: The plugin python is not supported with Java 1.6.0_21
[11:32:40]: [:sonarTask] 11:32:40.956 [ERROR] [system.err] ERROR: Caused by: org/sonar/plugins/python/PythonPlugin : Unsupported major.minor version 51.0
[11:32:40]: [:sonarTask] 11:32:40.956 [ERROR] [system.err] ERROR:
[11:32:40]: [:sonarTask] 11:32:40.956 [ERROR] [system.err] ERROR: To see the full stack trace of the errors, re-run SonarQube Runner with the -e switch.
[11:32:40]: [:sonarTask] 11:32:40.956 [ERROR] [system.err] ERROR: Re-run SonarQube Runner using the -X switch to enable full debug logging.
[11:32:41]: [:sonarTask] 11:32:41.096 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: FAILED
它已經失敗,因爲Java 1.6的不與蟒蛇插件兼容,但我需要保持這一點。 我的java源代碼是1.6,它必須是這個。
在我的聲納性能我有以下幾點:
sonar.java.source=1.6
sonar.java.target=1.6
我會有什麼樣的變化做什麼呢?將java目標更改爲1.7? java是否在運行聲納時使用java版本?
我可以在sonar-runner.properties或sonar.properties中指定要運行的Java版本嗎?升級它可能會導致其他問題。 – user3809938
想一想。在讀取這些屬性時,該過程已經開始。 –