Gradle Plugin for SonarQube fails with error related to accessExternalSchema - gradle

For several of our projects, we get the following error, when using the Sonar Gradle plugin (http://docs.sonarqube.org/display/SONAR/Analyzing+with+Gradle).
11:26:16.744 ERROR - Error parsing XML: XML InputStream(5) schema_reference: Failed to read schema document 'persistence_1_0.xsd', because 'http' access is not allowed due to restriction set by the accessExternalSchema property.
We have run into this previously when running xjc tasks, and I tried to adapt the solution there, resulting in the following:
sonarqube {
System.setProperty('javax.xml.accessExternalSchema', 'all')
}
This however, didn't appear to have any effect.
Any suggestions on how to fix the problem?
Thanks!

You could maybe try to apply same workaround than How to surpass gradle wsimport task JDK 8 access restrictions?
Anyway in SonarQube 5.2 there will be no more database connection so no more persistence.xml.

Related

SonarQube configuration in the Oracle Jet project

I'm trying to configure my Oracle JET based project to the sonar qube. On executing sonar-scanner command I ended up with following error:
ERROR: Language of file 'src\js\path_mapping.json' can not be decided as the file matches patterns of both sonar.lang.patterns.gscan.t13y : **/*.wptg,**/*.properties,**/*.rts,**/*.xlf,**/*.xliff,**/*.xrts,**/*.dlf,**/*.msg,**/*.resx,**/*.rc,**/*.yaml,**/*.yml,**/*.json,**/*.txt,**/*.strings and sonar.lang.patterns.json : **/*.json
I tried to override the files association by setting up the following in project properties file:
sonar.json.file.suffixes=.json
This couldn't help either. Getting the same error again.
As I don't have access to sonar admin module, I need to achieve it though project properties only.
Is there any other way to fix it? I did not find any concrete answer anywhere.

Unable to generate allure report in jenkins

getting the following error.
screenshot is also attached.
basically .bat is not getting generated.
ERROR: Step ‘Allure Report’ aborted due to exception:
java.io.IOException: Failed to rename C:\Users\dell\.jenkins\tools\ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation\allure2\allure-2.4.1 to C:\Users\dell\.jenkins\tools\ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation\allure2\allure-2.4.1.__rename
Now its working.
There is problem in allure command installation.
Maven central installer is giving error
Tried by giving link in jenkins global tool configuration and its working
Link : https://bintray.com/qameta/generic/download_file?file_path=io%2Fqameta%2Fallure%2Fallure%2F2.4.1%2Fallure-2.4.1.zip
I faced the same issue when configured with the latest version of Maven under Jenkins->Global Tool Configurations->Allure Commandline. Once i downgraded the Maven version I was able to generate allure reports successfully.
I had the same problem. In my case it was enough to delete allure-jenkins plugin from the list of plugins in Jenkins.

Error during SonarQube Scanner execution

I'm running sonar-runner inside my project folder
I have put and configured the sonar-runner.properties in my project as well. But still the execution Sonar failed. Any idea as to what could be the problem ?
If project configuration file(sonar-project-properties) is being ignored then what is the workaround. Pl suggest asap.
This error is telling you that the Scanner is not finding your project properties. That is likely because the default name of the file is not sonar-runner.properties, nor sonar-project-properties, but sonar-project.properties.

Running mule application in MuleStudio

While running mule application in MuleStudio, I see 2 options.
Run As > Mule Application
Run As > Mule Application with Maven
I always used first option which worked fine, until a point of time when I defined maven filter. Using the first option the filters were not getting resolved, so I tried to run using second option which resulted in the following error --
[12:04:57] Starting build...
Error: Could not find or load main class local
I created a test project for sharing this problem and uploaded it on github https://github.com/hshira/mule-mvn-filter
pom.xml > https://github.com/hshira/mule-mvn-filter/blob/master/pom.xml
Please suggest me, what is the right way to resolve filters in MuleStudio.
FYI ... the filtered property is resolved correctly if I build on terminal using mvn command
it could be issue with maven setup on your local machine.

set configuration properties in sonar

Maybe, this question is silly but I'm very new. I try to search without luck.
I got two errors when building maven project with sonar:
No information about coverage per test.
Although I had test code and these testing classes cover the code.
The global property 'sonar.doxygen.deploymentPath' is not set. Set it in SONAR and run another analysis.
I dont know it should be set where in sonar server. I set in web.xml or sonar-server.properties but it does not work.
Thanks.
About the first warning message this is not an error but a warning : since Sonar 3.5 this is possible to get the code coverage relating to each unit test. Here the message just says that this feature is not activated which is expected by default. Nevertheless I do agree that this warning message can be misleading.
About the second error message, I don't know the doxygen plugin but the message seems to be pretty clear : the sonar.doxygen.deploymentPath property has not be defined. See the plugin documentation : http://docs.codehaus.org/display/SONAR/Doxygen+Plugin.
Two things:
There is no war folder anymore since the sonarqube has given up tomcat support
The doxygen plugin is not implemented to upload the files in to the sonarqube server &/ installation, which means it only can be done by referencing the path inside your installation, e.g.:
run "mvn install sonar:sonar" in your project "/root/test.example.sonar.com"
in sonarqube set the cfg-key "sonar.doxygen.deploymentPath" the value: "/root/sonarqube-4.1.1/web/" and the cfg-key "sonar.doxygen.deploymentUrl" the value: "http://:9000"
have fun with your doxygen
Remember that the plugin will only be run through your mvn cmd, refreshing the page only will not do the job, you will have to analyse again after each cfg set :/
Check the file system and folder permission

Resources