无法从jenkins

时间:2017-03-16 21:57:37

标签: maven jenkins sonarqube

Jenkins version -  2.15
SonarQube version - 2.6.1

我想在Jenkins控制台上显示SonarQube链接,这样,如果有人点击它,那么它应该重定向到sonarqube网站中的确切分析。

执行的步骤:

  1. 配置独有的Jenkins作业以运行pom文件并将“sonar:sonar”作为目标。

  2. 它向我显示了日志,如果我点击日志中的链接,它会重定向到我公司的SonarQube帐户。但我希望这就像Jenkins控制台中的超链接一样。

  3. 在maven settings.xml文件中,声纳配置正确,在管理Jenkins->configure系统时它是正确的。

  4. 来自maven repo的管理jenkins->global tool configuration-> i have checked "install automatically"版本2.6.1。

  5. 我在Jenkins作业post-build step->execute sonar scanner中添加了配置。

  6. 但如果我运行这项工作,我会收到以下错误。

    Started by user xyz
    [EnvInject] - Loading node environment variables.
    Building on master in workspace /var/lib/jenkins/workspace/appname
     > /usr/bin/git rev-parse --is-inside-work-tree # timeout=10
    Fetching changes from the remote Git repository
     > /usr/bin/git config remote.origin.url reponame.git # timeout=10
    Fetching upstream changes from reponame.git
     > /usr/bin/git --version # timeout=10
    using GIT_ASKPASS to set credentials 
     > /usr/bin/git fetch --tags --progress reponame.git +refs/heads/*:refs/remotes/origin/*
     > /usr/bin/git rev-parse feature/branchname^{commit} # timeout=10
     > /usr/bin/git rev-parse refs/remotes/origin/feature/branchname^{commit} # timeout=10
    Checking out Revision afe1ab9f98e98223d9e8a9b6af4ee28282a2b2f7 (refs/remotes/origin/feature/branchname)
     > /usr/bin/git config core.sparsecheckout # timeout=10
     > /usr/bin/git checkout -f afe1ab9f98e98223d9e8a9b6af4ee28282a2b2f7
     > /usr/bin/git rev-list afe1ab9f98e98223d9e8a9b6af4ee28282a2b2f7 # timeout=10
    Parsing POMs
    Modules changed, recalculating dependency graph
    Established TCP socket on 46418
    [jobname] $ /usr/lib/jvm/java-openjdk/bin/java -cp /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven32-agent-1.7.jar:/opt/maven/apache-maven-3.3.3/boot/plexus-classworlds-2.5.2.jar:/opt/maven/apache-maven-3.3.3/conf/logging jenkins.maven3.agent.Maven32Main /opt/maven/apache-maven-3.3.3 /var/cache/jenkins/war/WEB-INF/lib/remoting-2.60.jar /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven32-interceptor-1.7.jar /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.7.jar 46418
    <===[JENKINS REMOTING CAPACITY]===>channel started
    Executing Maven:  -B -f /var/lib/jenkins/workspace/appname/pom.xml sonar:sonar -DskipTests -Dsonar.branch=feature/branchname
    [INFO] Scanning for projects...
    [INFO]                                                                         
    [INFO] ------------------------------------------------------------------------
    [INFO] Building Appname 0.0.1-SNAPSHOT
    [INFO] ------------------------------------------------------------------------
    [INFO] 
    [INFO] --- sonar-maven-plugin:3.2:sonar (default-cli) @ Appname2 ---
    [INFO] User cache: /home/jenkins/.sonar/cache
    [INFO] Load global repositories
    [INFO] Load global repositories (done) | time=224ms
    [WARNING] Property 'sonar.jdbc.url' is not supported any more. It will be ignored. There is no longer any DB connection to the SQ database.
    [WARNING] Property 'sonar.jdbc.username' is not supported any more. It will be ignored. There is no longer any DB connection to the SQ database.
    [WARNING] Property 'sonar.jdbc.password' is not supported any more. It will be ignored. There is no longer any DB connection to the SQ database.
    [INFO] User cache: /home/jenkins/.sonar/cache
    [INFO] Load plugins index
    [INFO] Load plugins index (done) | time=50ms
    [INFO] SonarQube version: 5.6.1
    [INFO] Default locale: "en_US", source code encoding: "UTF-8"
    [INFO] Process project properties
    [INFO] Load project repositories
    [INFO] Load project repositories (done) | time=147ms
    [INFO] Execute project builders
    [INFO] Execute project builders (done) | time=1ms
    [INFO] Load quality profiles
    [INFO] Load quality profiles (done) | time=60ms
    [INFO] Load active rules
    [INFO] Load active rules (done) | time=229ms
    [INFO] Publish mode
    [INFO] -------------  Scan Appname feature/branchname
    [INFO] Load server rules
    [INFO] Load server rules (done) | time=93ms
    [INFO] Base dir: /var/lib/jenkins/workspace/jobname
    [INFO] Working dir: /var/lib/jenkins/workspace/jobname/target/sonar
    [INFO] Source paths: pom.xml, src/main/java
    [INFO] Test paths: src/test/java
    [INFO] Source encoding: UTF-8, default locale: en_US
    [INFO] Index files
    [INFO] 49 files indexed
    [INFO] Quality profile for java: Sonar way
    [INFO] JaCoCoSensor: JaCoCo report not found : /var/lib/jenkins/workspace/jobname/target/jacoco.exec
    [INFO] JaCoCoItSensor: JaCoCo IT report not found: /var/lib/jenkins/workspace/jobname/target/jacoco-it.exec
    [WARNING] ----------------------------------------------------------------
    [WARNING] Sonargraph: Skipping projectAppname feature/branchname [com.companyname.xyz:Appname2:feature/branchname], since no Sonargraph rules are activated in current SonarQube quality profile.
    [WARNING] ----------------------------------------------------------------
    [INFO] Sensor JavaSquidSensor
    [INFO] Configured Java source version (sonar.java.source): 7
    [INFO] JavaClasspath initialization...
    [INFO] JavaClasspath initialization done: 29 ms
    [INFO] JavaTestClasspath initialization...
    [INFO] JavaTestClasspath initialization done: 10 ms
    [INFO] Java Main Files AST scan...
    [INFO] 48 source files to be analyzed
    [ERROR] Class not found: javax.annotation.Nullable
    [ERROR] Class not found: org.springframework.data.mongodb.MongoDbFactory
    [ERROR] Class not found: org.springframework.amqp.rabbit.connection.ConnectionFactory
    [ERROR] Class not found: org.springframework.data.redis.connection.RedisConnectionFactory
    [ERROR] Class not found: lombok.NonNull
    [ERROR] Class not found: lombok.NonNull
    [ERROR] Class not found: lombok.NonNull
    [ERROR] Class not found: lombok.NonNull
    [ERROR] Class not found: lombok.NonNull
    [ERROR] Class not found: lombok.NonNull
    [ERROR] Class not found: lombok.NonNull
    [INFO] Java Main Files AST scan done: 2767 ms
    [INFO] 48/48 source files have been analyzed
    [INFO] Java bytecode scan...
    [WARNING] Class 'com/companyname/xyz/abcs/xyzabcTransactionApp' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/Exceptions/xyzBusinessException' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/Exceptions/ErrorResponse' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/Exceptions/InvalidRequestException' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/Exceptions/ResourceNotFoundException' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/RandomIdGenerator' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/XmlParser' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/config/AbstractLocalDataSourceConfig' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/config/DefaultPropertiesConfig' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/config/MySqlLocalDataSourceConfig' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/config/RelationalCloudDataSourceConfig' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/config/SpringApplicationContextInitializer' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/controller/xyzAuditEventController' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/controller/xyzabcEventsController' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/controller/xyzabcTransactionController' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/controller/ErrorHandlingController' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/controller/WorkItemController' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/domain/xyzAuditEvent' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/domain/xyzClient' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/domain/xyzPayor' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/domain/xyzProperties' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/domain/xyzTransaction' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/domain/xyzTransactionDetails' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/domain/xyzTransactionRTPC' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/dto/AuditInfoRequest' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/dto/PatchabcSource' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/dto/PatchTransactionInfoRequest' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/dto/PatchTransactionInfoResponse' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/dto/abcSource' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/dto/RtpcAlipRequest' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/dto/TransactionInfo' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/dto/WorkItemRequest' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/repository/xyzClientRepository' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/repository/xyzEventAuditRepository' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/repository/xyzPayorRepository' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/repository/xyzPropertiesRepository' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/repository/xyzRtpcTransactionRepository' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/repository/xyzTransactionDetailsRepository' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/repository/xyzTransactionRepository' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/service/AuditEventService' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/service/TransactionService' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/service/WorkItemService' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/service/impl/AuditEventServiceImpl' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/service/impl/TransactionServiceImpl' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/service/impl/WorkItemServiceImpl' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/test/abcControllerMockTest' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/util/abcEventConstants' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/util/TransactionInfoBuilder' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/xyzabcTransactionApp' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/Exceptions/xyzBusinessException' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/Exceptions/ErrorResponse' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/Exceptions/InvalidRequestException' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/Exceptions/ResourceNotFoundException' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/RandomIdGenerator' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/XmlParser' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/config/AbstractLocalDataSourceConfig' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/config/DefaultPropertiesConfig' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/config/MySqlLocalDataSourceConfig' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/config/RelationalCloudDataSourceConfig' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/config/SpringApplicationContextInitializer' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/controller/xyzAuditEventController' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/controller/xyzabcEventsController' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/controller/xyzabcTransactionController' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/controller/ErrorHandlingController' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/controller/WorkItemController' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/domain/xyzAuditEvent' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/domain/xyzClient' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/domain/xyzPayor' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/domain/xyzProperties' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/domain/xyzTransaction' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/domain/xyzTransactionDetails' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/domain/xyzTransactionRTPC' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/dto/AuditInfoRequest' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/dto/PatchabcSource' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/dto/PatchTransactionInfoRequest' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/dto/PatchTransactionInfoResponse' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/dto/abcSource' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/dto/RtpcAlipRequest' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/dto/TransactionInfo' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/dto/WorkItemRequest' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/repository/xyzClientRepository' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/repository/xyzEventAuditRepository' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/repository/xyzPayorRepository' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/repository/xyzPropertiesRepository' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/repository/xyzRtpcTransactionRepository' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/repository/xyzTransactionDetailsRepository' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/repository/xyzTransactionRepository' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/service/AuditEventService' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/service/TransactionService' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/service/WorkItemService' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/service/impl/AuditEventServiceImpl' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/service/impl/TransactionServiceImpl' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/service/impl/WorkItemServiceImpl' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/test/abcControllerMockTest' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/util/abcEventConstants' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/util/TransactionInfoBuilder' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/xyzabcTransactionApp' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/Exceptions/xyzBusinessException' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/Exceptions/ErrorResponse' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/Exceptions/InvalidRequestException' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/Exceptions/ResourceNotFoundException' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/RandomIdGenerator' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/XmlParser' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/config/AbstractLocalDataSourceConfig' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/config/DefaultPropertiesConfig' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/config/MySqlLocalDataSourceConfig' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/config/RelationalCloudDataSourceConfig' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/config/SpringApplicationContextInitializer' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/controller/xyzAuditEventController' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/controller/xyzabcEventsController' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/controller/xyzabcTransactionController' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/controller/ErrorHandlingController' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/controller/WorkItemController' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/domain/xyzAuditEvent' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/domain/xyzClient' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/domain/xyzPayor' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/domain/xyzProperties' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/domain/xyzTransaction' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/domain/xyzTransactionDetails' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/domain/xyzTransactionRTPC' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/dto/AuditInfoRequest' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/dto/PatchabcSource' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/dto/PatchTransactionInfoRequest' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/dto/PatchTransactionInfoResponse' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/dto/abcSource' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/dto/RtpcAlipRequest' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/dto/TransactionInfo' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/dto/WorkItemRequest' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/repository/xyzClientRepository' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/repository/xyzEventAuditRepository' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/repository/xyzPayorRepository' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/repository/xyzPropertiesRepository' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/repository/xyzRtpcTransactionRepository' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/repository/xyzTransactionDetailsRepository' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/repository/xyzTransactionRepository' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/service/AuditEventService' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/service/TransactionService' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/service/WorkItemService' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/service/impl/AuditEventServiceImpl' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/service/impl/TransactionServiceImpl' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/service/impl/WorkItemServiceImpl' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/test/abcControllerMockTest' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/util/abcEventConstants' is not accessible through the ClassLoader.
    [WARNING] Class 'com/companyname/xyz/abcs/util/TransactionInfoBuilder' is not accessible through the ClassLoader.
    [INFO] Java bytecode scan done: 56 ms
    [INFO] Java Test Files AST scan...
    [INFO] 1 source files to be analyzed
    [INFO] Java Test Files AST scan done: 16 ms
    [INFO] 1/1 source files have been analyzed
    [INFO] Package design analysis...
    [INFO] Package design analysis done: 6 ms
    [INFO] Sensor JavaSquidSensor (done) | time=3277ms
    [INFO] Sensor Lines Sensor
    [INFO] Sensor Lines Sensor (done) | time=3ms
    [INFO] Sensor SurefireSensor
    [INFO] parsing /var/lib/jenkins/workspace/jobname/target/surefire-reports
    [INFO] Sensor SurefireSensor (done) | time=1ms
    [INFO] Sensor SCM Sensor
    [INFO] Sensor SCM Sensor (done) | time=5ms
    [INFO] Sensor Zero Coverage Sensor
    [INFO] Sensor Zero Coverage Sensor (done) | time=31ms
    [INFO] Sensor Code Colorizer Sensor
    [INFO] Sensor Code Colorizer Sensor (done) | time=1ms
    [INFO] Sensor CPD Block Indexer
    [INFO] JavaCpdBlockIndexer is used for java
    [INFO] Sensor CPD Block Indexer (done) | time=64ms
    [INFO] Calculating CPD for 34 files
    [INFO] CPD calculation finished
    [INFO] Analysis report generated in 86ms, dir size=327 KB
    [INFO] Analysis reports compressed in 90ms, zip size=169 KB
    [INFO] Analysis report uploaded in 79ms
    [INFO] ANALYSIS SUCCESSFUL, you can browse https://sonar.digital.companyname.net/dashboard/index/com.companyname.xyz:Appname2:feature%2Fbranchname
    [INFO] Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
    [INFO] More about the report processing at https://sonar.digital.companyname.net/api/ce/task?id=AVrZFBRyedSPsp5e-zRe
    [INFO] Executing post-job org.sonar.plugins.stash.StashIssueReportingPostJob
    [INFO] Executing post-job org.sonar.plugins.buildbreaker.AlertBreaker
    [INFO] Executing post-job org.sonar.plugins.buildbreaker.ForbiddenConfigurationBreaker
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESS
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 9.646 s
    [INFO] Finished at: 2017-03-16T16:44:17-05:00
    [INFO] Final Memory: 39M/642M
    [INFO] ------------------------------------------------------------------------
    [JENKINS] Archiving /var/lib/jenkins/workspace/jobname/pom.xml to com.companyname.xyz/Appname2/0.0.1-SNAPSHOT/Appname2-0.0.1-SNAPSHOT.pom
    channel stopped
    ERROR: Failed to parse POMs
    java.io.IOException: Failed to install https://repo1.maven.org/maven2/org/sonarsource/scanner/cli/sonar-scanner-cli/2.6.1/sonar-scanner-cli-2.6.1.zip to /var/lib/jenkins/tools/hudson.plugins.sonar.SonarRunnerInstallation/SonarQube_Scanner_261
        at hudson.FilePath.installIfNecessaryFrom(FilePath.java:860)
        at hudson.FilePath.installIfNecessaryFrom(FilePath.java:768)
        at hudson.tools.DownloadFromUrlInstaller.performInstallation(DownloadFromUrlInstaller.java:76)
        at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:68)
        at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109)
        at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206)
        at hudson.plugins.sonar.SonarRunnerInstallation.forNode(SonarRunnerInstallation.java:102)
        at hudson.plugins.sonar.SonarRunnerInstallation.forNode(SonarRunnerInstallation.java:64)
        at hudson.plugins.sonar.utils.BuilderUtils.getBuildTool(BuilderUtils.java:66)
        at hudson.plugins.sonar.SonarRunnerBuilder.performInternal(SonarRunnerBuilder.java:228)
        at hudson.plugins.sonar.SonarRunnerBuilder.perform(SonarRunnerBuilder.java:270)
        at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
        at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
        at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.build(MavenModuleSetBuild.java:919)
        at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:870)
        at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
        at hudson.model.Run.execute(Run.java:1720)
        at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531)
        at hudson.model.ResourceController.execute(ResourceController.java:98)
        at hudson.model.Executor.run(Executor.java:404)
    Caused by: java.net.SocketTimeoutException: connect timed out
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
        at java.net.Socket.connect(Socket.java:589)
        at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:668)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
        at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264)
        at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367)
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1138)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1032)
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
        at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:153)
        at hudson.FilePath.installIfNecessaryFrom(FilePath.java:781)
        ... 19 more
    [BFA] Scanning build for known causes...
    [BFA] No failure causes found
    [BFA] Done. 0s
    Sending e-mails to: xyz.com
    Finished: FAILURE
    

1 个答案:

答案 0 :(得分:0)

这里有很多事情发生了

  1. 您无法链接到&#34;确切的分析&#34;,只能链接到项目空间,显示最新分析的结果。

    (请注意,它计划添加一些&#34;精确分析&#34;功能 今年,但它不会显示项目主页 在给定分析后立即,我怀疑你想要。)

  2. 最新版本的Jenkins插件应自动提供指向作业主页上项目仪表板的链接。 SonarQube扫描仪(几乎)总是在分析日志的末尾包含指向项目的链接。

  3. 从控制台看,您实际上已配置了两个分析。第一个与Maven一起运行并成功完成

      

    [信息]分析成功,您可以浏览https://sonar.digital.companyname.net/dashboard/index/com.companyname.xyz:Appname2:feature%2Fbranchname

    然后第二个尝试自动安装SonarQube扫描仪并失败。

  4. 首先,我建议删除第二次分析的配置。然后我将调查导致下载失败的基础架构问题 - 假设您可能希望将来某个时间安装自动工具。