A summary of building problems using Gradle in eclipse

Source: Internet
Author: User
Tags deprecated locale stack trace
Gradle Cleaneclipse Problem Description

A Gradle cleaneclipse task was inadvertently executed today, resulting in my project becoming a normal Java project:

Gradle dependence is gone, then right-clicking Build.gradle->run as also has no Gradle option:

Workaround

Project Right-click->config->convert to Gradle Project

merging multiple dependent libraries Problem Description

The Gradle project itself comes with a gradle dependencies dependent library, and sometimes the jar packages we add ourselves may produce a dependent library, how the two dependent libraries are merged. Workaround

Sonarrunner analyzing Jacoco data Problem Description

The following error occurs when you execute the gradle sonarrunner command:

: Sonarrunner SonarQube Runner 2.3 Java 1.7.0_79 Oracle Corporation (64-bit) Mac OS X 10.10.3 x86_64 info:runner Configura tion file:none info:project configuration file:/users/wuxian/documents/sourcecode/self/responsetimetool/build/tmp/ Sonarrunner/sonar-project.properties info:default locale: "ZH_CN", Source code encoding: "UTF-8" (Analysis is Platform de pendent) info:work directory:/users/wuxian/documents/sourcecode/self/responsetimetool/build/sonar info:sonarqube
Server 4.5.4 18:42:01.507 info-load Global referentials ... 18:42:01.771 info-load Global referentials done:266 ms 18:42:01.780 Info-user Cache:/users/wuxian/.sonar/cache 18:  42:01.791 info-install plugins 18:42:01.944 info-install jdbc driver 18:42:01.954 info-create jdbc DataSource for Jdbc:mysql://10.58.37.253:3306/sonar 18:42:03.486 info-initializing Hibernate 18:42:05.145 info-load Project Refere
Ntials ... 18:42:05.304 info-load Project Referentials done:159 Ms 18:42:05.305 Info-load Project Settings 18:42:05.650 info-loading Technical debt model ... 18:42:05.676 info-loading Technical Debt Model DONE:26 MS 18:42:05.678 info-apply Project exclusions 18:42:05.849 W
ARN-' sonar.dynamicanalysis ' is deprecated since version 4.3 and should no longer be used. 18:42:06.080 info--------------Scan responsetimetool 18:42:06.086 info-load module Settings 18:42:07.026 warn-s Onar.binaries and Sonar.libraries is deprecated since version 2.5 of Sonar-java-plugin, please use sonar.java.binaries an
D sonar.java.libraries instead 18:42:07.028 info-loading rules ... 18:42:07.739 info-loading rules done:711 ms 18:42:07.763 info-configure Maven plugins 18:42:07.879 info-no quali
Ty Gate is configured. 18:42:08.036 info-base dir:/users/wuxian/documents/sourcecode/self/responsetimetool 18:42:08.036 info-working dir: /users/wuxian/documents/sourcecode/self/responsetimetool/build/sonar 18:42:08.037 Info-source paths:src/main/ Resources, src/main/jAva 18:42:08.037 info-test paths:src/test/resources, Src/test/java 18:42:08.037 info-binary Dirs:build/classes/mai N, Build/resources/main 18:42:08.037 info-source encoding:utf-8, default locale:zh_cn 18:42:08.037 info-index file s 18:42:08.324 INFO-7 files indexed 18:42:08.709 info-quality profiles for java:android Lint 18:42:08.733 info-se
Nsor javasquidsensor ...
18:42:09.198 Info-java Main Files AST Scan ...  18:42:09.201 INFO-6 source files to be analyzed 18:42:09.654 Info-java Main files AST Scan done:456 ms 18:42:09.654
INFO-6/6 source files analyzed 18:42:09.656 Info-java bytecode scan ...
18:42:09.692 Info-java Bytecode scan done:36 ms 18:42:09.692 Info-java Test Files AST Scan ... 18:42:09.692 INFO-1 source files to be analyzed 18:42:09.709 Info-java Test files AST Scan done:17 ms 18:42:09.709
INFO-1/1 source files analyzed 18:42:09.712 info-package design analysis ... 18:42:09.755 info-package Design Analysis done:43 ms
18:42:09.760 info-sensor javasquidsensor done:1027 ms 18:42:09.769 info-sensor Qprofilesensor ...
18:42:09.773 info-sensor qprofilesensor done:4 ms 18:42:09.773 info-sensor Initialopenissuessensor ...
18:42:09.810 info-sensor initialopenissuessensor done:37 ms 18:42:09.810 info-sensor ProjectLinksSensor ...
18:42:09.824 info-sensor projectlinkssensor done:14 ms 18:42:09.831 info-sensor Versioneventssensor ...
18:42:09.855 info-sensor versioneventssensor done:24 ms 18:42:09.855 info-sensor Filehashsensor ...
18:42:09.857 info-sensor filehashsensor done:2 ms 18:42:09.857 info-sensor Surefiresensor ...
18:42:09.858 Info-parsing/users/wuxian/documents/sourcecode/self/responsetimetool/build/test-results
18:42:09.956 info-sensor surefiresensor done:99 ms 18:42:09.956 info-sensor Jacocooverallsensor ... Info:------------------------------------------------------------------------info:execution FAILURE INFO:------- -----------------------------------------------------------------Total time:9.187s Final memory:25m/538m error:error during Sonar runner execution Error:unable to execute Sonar INFO:------------------------------------------------------------------------ERROR: caused By:unable to read/users/wuxian/documents/sourcecode/self/responsetimetool/build/jacoco/test.exec ERROR:
caused by:incompatible version 1007.
ERROR:ERROR:To See the full stack trace of the errors, re-run SonarQube Runner with THE-E switch.
Error:re-run SonarQube Runner using the-x switch to enable full debug logging. : Sonarrunner FAILED

Unable to resolve test.exec file resolution

The reason for this problem is because jacoco own problems, resulting in and sonarrunner incompatible, we will Jacoco version to the following version is no problem:

jacoco{
    toolversion = "0.7.4.201502262128"  
    reportsdir = File ("$buildDir/jacocoreport")

}
sonarqube source file garbled Problem Description

We use Sonarrunner analysis of data, in the Sonarqube Web page to see the source code found in Chinese garbled, this problem how to solve. Workaround

First make sure that your various encode remain UTF-8, such as whether the editor is Utf-8,property "sonar.sourceencoding", "UTF-8" is UTF-8, and when these problems are not resolved, modify your " Sonar.jdbc.url "Property:

Sonarrunner {  
    Sonarproperties {property  
        ' Sonar.host.url ', ' http://10.58.37.253:9000/' property  
        ' Sonar.jdbc.url "," Jdbc:mysql://10.58.37.253:3306/sonar?useunicode=true&characterencoding=utf8 "Property  
        "Sonar.jdbc.driverClassName", "Com.mysql.jdbc.Driver" Property  
        "Sonar.jdbc.username", "sonar" property  
        " Sonar.jdbc.password "," sonar "property
        " Sonar.login "," admin "Property
        " Sonar.password "," admin "
        "Sonar.sourceencoding", "UTF-8" Property
        "Sonar.profile", "Sonar"}  
}  

More than the general configuration of one? Useunicode=true&characterencoding=utf8, this added, garbled on the solution.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.