Playframework 如何配置Travis CI在SonarQube上测试sbt项目?

Playframework 如何配置Travis CI在SonarQube上测试sbt项目?,playframework,configuration,sbt,sonarqube,travis-ci,Playframework,Configuration,Sbt,Sonarqube,Travis Ci,***更新的问题(于2017年2月9日编辑)************************** 如何配置Travis CI在SonarQube上测试sbt项目(Play Framework)?到目前为止,我所做的是: .travis.yml(节选): 为什么会跳过SonarQube扫描仪?我可以做些什么来避免跳过 ***原始问题日期为2017年2月1日************************** 如何配置Travis CI在SonarQube上测试sbt项目(Play Frame

***更新的问题(于2017年2月9日编辑)**************************


如何配置Travis CI在SonarQube上测试sbt项目(Play Framework)?到目前为止,我所做的是:

.travis.yml(节选):

为什么会跳过SonarQube扫描仪?我可以做些什么来避免跳过


***原始问题日期为2017年2月1日**************************


如何配置Travis CI在SonarQube上测试sbt项目(Play Framework)?到目前为止,似乎还没有一个全面的网站或张贴这样的配置。到目前为止,我所做的是:

.travis.yml(节选):

因此,我在日志中主要看到3个问题:

  • 错误:1407742E:SSL例程:SSL23\u GET\u SERVER\u HELLO:tlsv1警报 协议版本
  • 解压:无法找到或打开/home/travis/.sonar/cache//build-wrapper-linux-x86.zip
  • 您指定的目标需要执行一个项目,但此目录(/home/travis/build/companyname/projectname)中没有POM
  • (解决第三个问题:当然没有POM,因为这是一个sbt项目,而不是Maven项目。)


    我完全不知道该怎么办。是否有一个魔术可以解决我日志中显示的所有问题?

    您提供了一个Maven分析命令和一个(非Maven)属性文件。这是一个Maven项目吗?如果没有,那么您的问题是分析命令。谢谢,@G.Ann-SonarSourceTeam。我已经删除了mvn命令,并在我的plugins.sbt中添加了
    addSbtPlugin(“de.johoop“%”jacoco4sbt“%”2.2.0”)
    。虽然这种构建没有错误,但它不会触发sonarQube测试。要进行sonarQube扫描,我需要添加什么?再次感谢@G.Ann-SonarSourceTeam。我已经更新了问题,请看顶部。还没有扫描。我已经搜索了解决此问题的方法,但只找到了问题,没有找到答案。为什么同时使用Maven分析(
    mvn…sonar:sonar
    )和SonarQube扫描仪分析
    sonar Scanner
    ?您提供了一个Maven分析命令和一个(非Maven)属性文件。这是一个Maven项目吗?如果没有,那么您的问题是分析命令。谢谢,@G.Ann-SonarSourceTeam。我已经删除了mvn命令,并在我的plugins.sbt中添加了
    addSbtPlugin(“de.johoop“%”jacoco4sbt“%”2.2.0”)
    。虽然这种构建没有错误,但它不会触发sonarQube测试。要进行sonarQube扫描,我需要添加什么?再次感谢@G.Ann-SonarSourceTeam。我已经更新了问题,请看顶部。还没有扫描。我一直在寻找解决方法,但只找到了问题,没有找到答案。为什么您同时使用Maven分析(
    mvn…sonar:sonar
    )和SonarQube扫描仪分析
    sonar扫描仪
        cache:
          directories:
          - $HOME/.ivy2/cache
          - $HOME/.sonar/cache
        addons:
          sonarqube:
            token:
              secure: "<mySecureTokenHere>"
        after_script:
          - sonar-scanner
        branches:
          only:
            - master
    
        sonar.projectKey=<myProjectKeyHere>
        sonar.projectName=<myProjectNameHere>
        sonar.projectVersion=1.0
        sonar.sources=app,import,migrate,public,scripts,test
        sonar.host.url=https://sonarcube.com
    
        1250: $ sonar-scanner
        1251: INFO: Scanner configuration file: /home/travis/.sonarscanner/sonar-scanner-2.8/conf/sonar-scanner.properties
        1252: INFO: Project root configuration file: /home/travis/build/hbz/oerworldmap/sonar-project.properties
        1253: INFO: SonarQube Scanner analysis skipped
    
        cache:
          directories:
          - $HOME/.sonar/cache
        script:
          - mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent package sonar:sonar
        addons:
          sonarqube: true
        env:
          global:
            secure: "<mySecureTokenHere>"
            secure: "<myGitHubSecureTokenHere>"
    
        sonar.projectKey=<myProjectKeyHere>
        sonar.projectName=<myProjectNameHere>
        sonar.projectVersion=1.0
        sonar.sources=app,import,migrate,public,scripts,test
        sonar.host.url=https://sonarcube.com
    
        Preparing build wrapper for SonarSource C/C++ plugin
        curl: (35) error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
        The command "eval curl -sSLo $sq_build_wrapper_dir/build-wrapper-linux-x86.zip https://sonarqube.com/static/cpp/build-wrapper-linux-x86.zip " failed. (3 times)
    
        unzip:  cannot find or open /home/travis/.sonar/cache//build-wrapper-linux-x86.zip, /home/travis/.sonar/cache//build-wrapper-linux-x86.zip.zip or /home/travis/.sonar/cache//build-wrapper-linux-x86.zip.ZIP.
    
        Preparing SonarQube Scanner parameters
        $ cp conf/travis.conf conf/test.conf
        $ node node/json-frame/frame.js 8080 && sleep 5s
        Listening on port 8080
    
        $ mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent package sonar:sonar
        [INFO] Scanning for projects...
        [INFO] ------------------------------------------------------------------------
        [INFO] BUILD FAILURE
        [INFO] ------------------------------------------------------------------------
        [INFO] Final Memory: 13M/491M
        [ERROR] The goal you specified requires a project to execute but there is no POM in this directory (/home/travis/build/companyname/projectname). Please verify you invoked Maven from the correct directory. -> [Help 1]