|
I posted my problem here but it is very urgent for me to get this working so I am posting this to here as well: http://jira.codehaus.org/browse/SONARPLUGINS-2129
The problem seems to be triggered by missing source files in Jenkins workspace but there are files generated from mvn clean install, so I have no idea why it can't find source files. Does it mean like no javascript files in that folder? |
|
I figured that maybe i need to configure sonar.sources for a Java project with heavy javascript development to point to a different place rather than the src/main/java....but I'm not sure how to configure that parameter in Jenkins Sonar plugin.
|
|
Hi,
You need to perform two different analyses to analyze the Java source code and the JavaScript one. You run the Java analysis as you did as it seems to work. Then, for the JavaScript analysis, you need to override some parameters by adding: -Dsonar.language=js -Dsonar.branch=javascript -Dsonar.sources=PATH_TO_YOUR_JAVASCRIPT_FILES
Regards,
David RACODON | SonarSource
Senior Consultant On 8 August 2012 03:38, ttback <[hidden email]> wrote: I figured that maybe i need to configure sonar.sources for a Java project |
|
This post was updated on .
Hi,
I followed by your solution to analyze java + javascript project and met one problem. My project is built by maven. In your solution, I should only make one pom.xml, right? In pom.xml, I didn't define soureDirectory. To analyze java source code, it is OK. But when I analyze javascript source code with "mvn sonar:sonar -Dsonar.language=js -Dsonar.branch=javascript -Dsonar.sources=src/main/js", the sonar result is not correct. There is only unit test metrices. Such as Lines of code and Violations ... weren't showed. Unless I define sourceDirectory in pom.xml. But sourceDirectory didn't support mutiple directory. How I define one pom.xml for mutiple languages? Best regards, Rella |
|
Hi Rella, Making it work with one pom is a kind of hack. So I won't go further into it. The proper way to do it is:
Regards,
David RACODON | SonarSource
Senior Consultant On 20 August 2012 10:48, Rella <[hidden email]> wrote: Hi, |
| Powered by Nabble | Edit this page |
