2016-10-12 21 views
0

私のようなエラーを取得しています:誰もがそのエラーについて知っている場合は親切に私を助けてSonarqubeインストール

"E:\Heena\Software\sonar-scanner\bin..
INFO: Scanner configuration file: E:\Heena\Software\sonar-scanner\bin..\conf\so nar-scanner.properties
INFO: Project root configuration file: NONE
INFO: SonarQube Scanner 2.8
INFO: Java 1.8.0_101 Oracle Corporation (64-bit)
INFO: Windows 7 6.1 amd64
INFO: User cache: C:\Users\ADMIN.sonar\cache
INFO: Load global repositories
INFO: Load global repositories (done) | time=779ms INFO: User cache: C:\Users\ADMIN.sonar\cache
INFO: Load plugins index
INFO: Load plugins index (done) | time=35ms
INFO: SonarQube server 5.6.3
INFO: Default locale: "en_US", source code encoding: "windows-1252" (analysis is platform dependent)
INFO: Process project properties
INFO: ------------------------------------------------------------------------ INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------ INFO: Total time: 11.028s
INFO: Final Memory: 39M/84M
INFO: ------------------------------------------------------------------------ ERROR: Error during SonarQube Scanner execution
ERROR: You must define the following mandatory properties for 'Unknown': sonar.projectKey, sonar.projectName, sonar.projectVersion, sonar.sources
ERROR:
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging . E:\Heena\Software\sonar-scanner\bin>"

。私はWindows 7 OSを使用しています。

ERROR: You must define the following mandatory properties for 'Unknown': sonar.projectKey, sonar.projectName, sonar.projectVersion, sonar.sources

分析は、このような何かを起動する必要がありそうです:ここ

> sonar-runner -Dsonar.projectKey=myProjectKey -Dsonar.projectName="My Project" -Dsonar.projectVersion=1 -Dsonar.sources=. 

詳細情報: Analysis Parameters - SonarQube Documentation - SonarQube

そして、ここで: Analyzing with SonarQube Scanner - Scanners - SonarQubeログメッセージを見てみると

+0

これは 'git'の質問ですか? – JARO

+0

いいえ、それは実行中のsonarscannerに関するものでした。されております。混乱は、私がsonarqubeに関するすべてのフォルダをCに入れたときに動作し、別のディレクトリから上記のerroeを試してみたとき –

答えて

1

I see two problems in your case.

  • あなたは
    フォルダをインストールsonar-scannerからsonar-scannerを実行しているA.。 (E:¥Heena¥Software¥sonar-scanner¥bin)。
  • B. sonar-scannerの必須プロジェクトプロパティを実行するように設定していません。

Following are the typical steps you can follow here.

  1. システムPATHにフォルダ (あなたのケースでE:\Heena\Software\sonar-scanner\bin)をインストールsonar-scannerます。
  2. プロジェクトのルートフォルダとプロパティファイルsonar-project.propertiesに移動します。 sonar-project.propertiesファイルには必須プロパティが定義されている必要があります。
  3. 4つの必須プロパティは、プロジェクトのルートフォルダからsonar.projectKeysonar.projectNamesonar.projectVersionsonar.sources
  4. 実行sonar-scannerです。

Refer the attached screen shot here enter image description here

+1

ありがとう、それは今働いています。 –