Сонар Maven HTTP ошибка: 401 - PullRequest
0 голосов
/ 21 мая 2018

Нужна помощь.В настоящее время пишу пользовательские правила для моей компании.Но во время тестирования я столкнулся с проблемой.Когда я запускаю локальный сонар и пытаюсь запустить проект на нем, чтобы проверить новые правила, я получаю BUILD FAILURE.Вот что я вижу при запуске проекта:

C:\Users\tgriusys\eclipse-workspace\simpleProject>mvn sonar:sonar
14:37:12:900 [INFO] Scanning for projects...
14:37:13:353 [INFO]
14:37:13:353 [INFO] ------------------------------------------------------------------------
14:37:13:353 [INFO] Building simpleProject 0.0.1-SNAPSHOT
14:37:13:353 [INFO] ------------------------------------------------------------------------
14:37:13:451 [INFO]
14:37:13:451 [INFO] --- sonar-maven-plugin:3.4.0.905:sonar (default-cli) @ simpleProject ---
14:37:13:815 [INFO] User cache: C:\Users\tgriusys\.sonar\cache
14:37:13:897 [INFO] SonarQube version: 6.7.1
14:37:13:916 [INFO] Default locale: "en_US", source code encoding: "windows-    1257" (analysis is platform dependent)
14:37:14:178 [INFO] Publish mode
14:37:14:317 [INFO] Load global settings
14:37:14:388 [INFO] Load global settings (done) | time=72ms
14:37:14:396 [INFO] Server id: AWDU5v5flIPWulLSdQv7
14:37:14:405 [INFO] User cache: C:\Users\tgriusys\.sonar\cache
14:37:14:682 [INFO] Load plugins index
14:37:14:736 [INFO] Load plugins index (done) | time=54ms
14:37:15:313 [INFO] Process project properties
14:37:15:383 [INFO] Load project repositories
14:37:15:917 [INFO] Load project repositories (done) | time=534ms
14:37:16:027 [INFO] Load quality profiles
14:37:16:267 [INFO] Load quality profiles (done) | time=240ms
14:37:16:287 [INFO] Load active rules
14:37:16:498 [INFO] Load active rules (done) | time=211ms
14:37:16:502 [INFO] Load metrics repository
14:37:16:526 [INFO] Load metrics repository (done) | time=25ms
14:37:16:539 [INFO] Project key: simpleProject:simpleProject
14:37:16:540 [INFO] -------------  Scan simpleProject
14:37:16:641 [INFO] Base dir: C:\Users\tgriusys\eclipse-workspace\simpleProject
14:37:16:641 [INFO] Working dir: C:\Users\tgriusys\eclipse-workspace\simpleProject\target\sonar
14:37:16:644 [INFO] Source paths: pom.xml, src/main/java
14:37:16:644 [INFO] Test paths: src/test/java
14:37:16:645 [INFO] Source encoding: windows-1257, default locale: en_US
14:37:16:679 [INFO] Load server rules
14:37:16:798 [INFO] Load server rules (done) | time=119ms
14:37:16:905 [INFO] Index files
14:37:16:922 [INFO] 7 files indexed
14:37:16:923 [INFO] Quality profile for java: Exigen Coverage
14:37:16:924 [INFO] Quality profile for xml: Sonar way
14:37:17:054 [INFO] Sensor JavaSquidSensor [java]
14:37:17:189 [INFO] Configured Java source version (sonar.java.source): 5
14:37:17:222 [INFO] JavaClasspath initialization
14:37:17:238 [INFO] JavaClasspath initialization (done) | time=16ms
14:37:17:239 [INFO] JavaTestClasspath initialization
14:37:17:242 [INFO] JavaTestClasspath initialization (done) | time=3ms
14:37:17:508 [INFO] Java Main Files AST scan
14:37:17:509 [INFO] 6 source files to be analyzed
14:37:17:948 [INFO] Java Main Files AST scan (done) | time=439ms
14:37:17:948 [INFO] 6/6 source files have been analyzed
14:37:17:948 [INFO] Java Test Files AST scan
14:37:17:949 [INFO] 0 source files to be analyzed
14:37:17:950 [INFO] Java Test Files AST scan (done) | time=2ms
14:37:17:950 [INFO] 0/0 source files have been analyzed
14:37:17:951 [INFO] Sensor JavaSquidSensor [java] (done) | time=897ms
14:37:17:952 [INFO] Sensor FindBugs Sensor [findbugs]
14:37:19:188 [INFO] Loading findbugs plugin: C:\Users\tgriusys\eclipse-workspace\simpleProject\target\sonar\findbugs\findsecbugs-plugin.jar
14:37:19:207 [INFO] Findbugs output report: C:\Users\tgriusys\eclipse-workspace\simpleProject\target\sonar\findbugs-result.xml
14:37:20:931 [INFO] Sensor FindBugs Sensor [findbugs] (done) | time=2979ms
14:37:20:932 [INFO] Sensor SurefireSensor [java]
14:37:20:933 [INFO] parsing [C:\Users\tgriusys\eclipse-workspace\simpleProject\target\surefire-reports]
14:37:20:935 [INFO] Sensor SurefireSensor [java] (done) | time=3ms
14:37:20:935 [INFO] Sensor JaCoCoSensor [java]
14:37:20:938 [INFO] Sensor JaCoCoSensor [java] (done) | time=3ms
14:37:20:938 [INFO] Sensor SonarJavaXmlFileSensor [java]
14:37:20:950 [INFO] 1 source files to be analyzed
14:37:21:577 [INFO] Sensor SonarJavaXmlFileSensor [java] (done) | time=639ms
14:37:21:578 [INFO] 1/1 source files have been analyzed
14:37:21:578 [INFO] Sensor XML Sensor [xml]
14:37:21:719 [INFO] Sensor XML Sensor [xml] (done) | time=141ms
14:37:21:719 [INFO] Sensor Zero Coverage Sensor
14:37:21:737 [INFO] Sensor Zero Coverage Sensor (done) | time=18ms
14:37:21:738 [INFO] Sensor CPD Block Indexer
14:37:21:757 [INFO] Sensor CPD Block Indexer (done) | time=19ms
14:37:21:758 [INFO] SCM Publisher is disabled
14:37:21:759 [INFO] 6 files had no CPD blocks
14:37:21:759 [INFO] Calculating CPD for 0 files
14:37:21:760 [INFO] CPD calculation finished
14:37:21:889 [INFO] Analysis report generated in 112ms, dir size=19 KB
14:37:21:931 [INFO] Analysis reports compressed in 41ms, zip size=15 KB
14:37:21:956 [INFO] Analysis report uploaded in 24ms
14:37:21:957 [INFO] ANALYSIS SUCCESSFUL, you can browse http://localhost:9000/dashboard/index/simpleProject:simpleProject
14:37:21:958 [INFO] Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
14:37:21:959 [INFO] More about the report processing at http://localhost:9000/api/ce/task?id=AWOCfVUd_KYAMsLyvlL2
14:37:21:962 [INFO] Executing post-job org.sonar.report.pdf.batch.PDFPostJob
14:37:21:963 [INFO] Executing decorator: PDF Report
14:37:21:972 [INFO] Team workbook report type selected
14:37:22:058 [INFO] Retrieving project info for simpleProject:simpleProject
14:37:22:234 [INFO] ------------------------------------------------------------------------
14:37:22:234 [INFO] BUILD FAILURE
14:37:22:235 [INFO] ------------------------------------------------------------------------
14:37:22:236 [INFO] Total time: 9.616 s
14:37:22:237 [INFO] Finished at: 2018-05-21T14:37:22+03:00
14:37:22:369 [INFO] Final Memory: 27M/981M
14:37:22:369 [INFO] ------------------------------------------------------------------------
14:37:22:373 [ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar (default-cli) on project simpleProject: HTTP error: 401, msg: , query: org.apache.commons.httpclient.methods.GetMethod@5d957cf0 -> [Help 1]
14:37:22:374 [ERROR]
14:37:22:375 [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
14:37:22:375 [ERROR] Re-run Maven using the -X switch to enable full debug logging.
14:37:22:376 [ERROR]
14:37:22:376 [ERROR] For more information about the errors and possible solutions, please read the following articles:
14:37:22:377 [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

После этого я могу проверить анализ и проверить, работают ли правила должным образом, но мне интересно, почему сборка не работает и что я могу сделать, чтобы решить ее?

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...