Using Gradle in Eclipse to build issues summary

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

I accidentally performed a gradle cleaneclipse task today, resulting in my project becoming an ordinary Java project:

Gradle dependence is gone, then right click Build.gradle->run as there is no gradle option:

Solving Method

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

merging multiple dependent libraries Problem Description

The Gradle project itself has a gradle dependencies dependent library, and sometimes the jar packages we add ourselves may produce a dependent library of how the two dependent libraries are merged. Solving Method

Sonarrunner Analysis Jacoco Data Problem Description

When you execute the gradle sonarrunner command, you receive the following error:

: 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 jdbc Info-create 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 to 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 are 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 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 profile for java:android Lint 18:42:08.733
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 ...
18:42:09.773 info-sensor qprofilesensor done:4 ms 18:42:09.773 Info-sensor ...
18:42:09.810 info-sensor initialopenissuessensor done:37 ms 18:42:09.810 Info-sensor ...
18:42:09.824 info-sensor projectlinkssensor done:14 ms 18:42:09.831 Info-sensor ...
18:42:09.855 info-sensor versioneventssensor done:24 ms 18:42:09.855 Info-sensor ...
18:42:09.857 info-sensor filehashsensor done:2 ms 18:42:09.857 Info-sensor ...
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 ... 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 the full stack trace of the errors, re-run Sonarqube Runner with THE-E switch.
The Error:re-run sonarqube Runner using the-x switch to enable the full debug logging. : Sonarrunner FAILED

Unable to parse test.exec file resolution

The reason for this problem is because of Jacoco's own problems, causing 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 Files garbled Problem Description

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

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/"  
        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"  
        Sonar.jdbc.password "," sonar "property
        " Sonar.login "," admin "Property
        " Sonar.password "," admin "
        Property "Sonar.sourceencoding", "UTF-8" Property
        "Sonar.profile", "Sonar Way"

    }  
}  

One more than the general configuration? Useunicode=true&characterencoding=utf8, this plus, 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.