0

I am trying to trigger sonar runner from java without plugin. I have created the directory structure and property files needed for sonar runner through code. I was planning to execute the .bat file through java. But I think thats wiered and found that there are apis to trigger the same from java.

The only solution I found was this one.But when tried that code, i found some dependencies with ant.So am confused if this correct.

I there any other means to do the same.

Community
  • 1
  • 1
Valath
  • 880
  • 3
  • 13
  • 35

1 Answers1

0

You can have a look to the source code of the SonarQube Ant task which relies on SonarRunner API : https://github.com/SonarSource/sonar-ant-task.

  • I tried that, but I was not able to get the associated jars or class included in them. I was not able to collect all the included classes. – Valath May 05 '14 at 13:42
  • As a work around, I called the windows command triggered from sonar-runner.bat file from my program by passing required params. It worked :). I know this is little wiered, but got a means to run it ;) – Valath May 05 '14 at 13:45
  • But in some machines, it is throwing error that org.sonar.runner.Main classNotFound. I tried by renaming the folder. But not worked :(. I am using runner2.3 with sonarQube3.7.4. – Valath May 05 '14 at 13:49