0

Im using Sonar with Sonar Runner and Jenkins. Strange thing is that when i start the job manually everything works fine but on the periodic nightly builds it fails and says:

org.sonar.runner.RunnerException: No files matching pattern "java" in directory

So i understand that Sonar Runner cant find my source files. But why is that so? I mean when i start it manually Sonar is working fine and using source files. i didn't change anything. Its the exact same job...

Hannes
  • 442
  • 1
  • 6
  • 23
  • Sounds like Jenkins is running from a different directory. Are the java files located within the Jenkins project workspace? – Mark O'Connor Feb 27 '13 at 21:19
  • Jenkins is downloading all java files in the project workspace folder in the Jenkins folder. Thats were im pointing at. Ok now I get the same error when i start it manually. Last week it worked.. didn't change anything... strange thing – Hannes Feb 28 '13 at 10:19

1 Answers1

0

If I generalize your question to "What should I do if my Jenkins job fails at random times after working other times?" one of the first steps I always do is delete the workspace and rerun the build. You can also usually configure the SCM plugin to do a clean checkout of the source rather than an update. That has solved issues for me in the past.

  • Sometimes actually deleting the workspace solves weird issues for me. It is sort of like "reboot Windows" -- a catch-all solution. But granted I don't have a specific reason to think it will solve your issue. – ProgrammerGuy May 05 '13 at 01:07