sonar-runner tries and analyzes the same module twice! Why?

49 views
Skip to first unread message

Francis Galiegue

unread,
Nov 11, 2015, 12:48:07 PM11/11/15
to SonarQube
Hello,

SonarQube 5.1.1, sonar-runner 2.4. I attempt to launch an analysis on a project with the following structure:

----
$ find -name sonar-project.properties 
./sonar-project.properties
./shared/sonar-project.properties
./other/sonar-project.properties
./WSO/sonar-project.properties
./ICA/sonar-project.properties
./HCA/sonar-project.properties

$ cat sonar-project.properties 
#Project root
#Wed Nov 11 18:16:08 CET 2015
sqca.rochedb.password=roche
sqca.rochedb.url=jdbc\:postgresql\://localhost/rochedb
sonar.sources=.
sqca.rochedb.user=roche
sonar.projectVersion=1
sonar.modules=shared,other,WSO,ICA,HCA
sonar.projectKey=FOO
sqca.workDir=/home/fge/tmp/TEST/work
sonar.projectName=FOO

#
# All other modules declared in the "root" sonar-project.properties have the same content
$ cat shared/sonar-project.properties 
#Module shared
#Wed Nov 11 18:16:08 CET 2015
sonar.modules=written,generated,javascript
----

When I run an analysis, I get this error:

----
org.sonar.runner.impl.RunnerException: Unable to execute Sonar
        at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91)
        at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
        at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
        at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
        at org.sonar.runner.api.Runner.execute(Runner.java:100)
        at org.sonar.runner.Main.executeTask(Main.java:70)
        at org.sonar.runner.Main.execute(Main.java:59)
        at org.sonar.runner.Main.main(Main.java:53)
Caused by: org.sonar.api.utils.SonarException: Can not add the same measure twice on org.sonar.api.resources.File@79024d4c[key=hca/chcaACK.cls,path=hca/chcaACK.cls,filename=chcaACK.cls etc etc
----

And there is this in the output:

----
$ grep "Base dir: " ~/tmp/OUT.txt
18:33:23.057 INFO  - Base dir: /home/fge/tmp/TEST/HCA/written
18:36:30.454 INFO  - Base dir: /home/fge/tmp/TEST/HCA/generated
18:36:41.331 INFO  - Base dir: /home/fge/tmp/TEST/HCA/javascript
18:36:41.454 INFO  - Base dir: /home/fge/tmp/TEST/shared
18:36:41.564 INFO  - Base dir: /home/fge/tmp/TEST/HCA/written
----

Why does it try and analyse HCA/written twice? It's the first time ever I have seen that...

Francis Galiegue

unread,
Nov 11, 2015, 12:56:04 PM11/11/15
to SonarQube
Side question...


On Wednesday, November 11, 2015 at 6:48:07 PM UTC+1, Francis Galiegue wrote:
----
$ grep "Base dir: " ~/tmp/OUT.txt
18:33:23.057 INFO  - Base dir: /home/fge/tmp/TEST/HCA/written
18:36:30.454 INFO  - Base dir: /home/fge/tmp/TEST/HCA/generated
18:36:41.331 INFO  - Base dir: /home/fge/tmp/TEST/HCA/javascript
18:36:41.454 INFO  - Base dir: /home/fge/tmp/TEST/shared
18:36:41.564 INFO  - Base dir: /home/fge/tmp/TEST/HCA/written
----

What is xxx/shared doing here?

Francis Galiegue

unread,
Nov 11, 2015, 1:01:52 PM11/11/15
to SonarQube
Aand, something else:

----
19:00:04.359 INFO  - Base dir: /home/fge/tmp/TEST/HCA/written
19:00:04.359 INFO  - Working dir: /home/fge/tmp/TEST/.sonar/FOO_shared_written
----

Wat? Why is the work directory not in accordance to the module?

Reply all
Reply to author
Forward
0 new messages