Errors during Jenkins-Sonar-JDepend execution
Hi
I have created a Jenkins job that runs SONAR (5.6 LTS) for a specific project. JDepend rules have been activated and included to the active Quality profile. However, Jenkins job can't be executed successfully:
11:01:45.484 INFO: No information about coverage per test. 11:01:45.484 INFO: Sensor JaCoCoOverallSensor (wrapped) (done) | time=257ms 11:01:45.484 INFO: Sensor SonarJavaXmlFileSensor (wrapped) 11:01:45.488 INFO: Sensor SonarJavaXmlFileSensor (wrapped) (done) | time=4ms 11:01:45.488 INFO: Sensor jDepend sensor (wrapped) 11:01:45.497 INFO: Analysing classes in target/classes 11:01:45.502 INFO: ------------------------------------------------------------------------ 11:01:45.502 INFO: EXECUTION FAILURE 11:01:45.502 INFO: ------------------------------------------------------------------------ 11:01:45.503 INFO: Total time: 1:23.732s 11:01:45.698 INFO: Final Memory: 126M/4668M 11:01:45.698 INFO: ------------------------------------------------------------------------ 11:01:45.698 ERROR: Error during SonarQube Scanner execution java.lang.IllegalStateException: Could not analyse classes in target/classes at nl.futureedge.sonar.plugin.jdepend.sensor.JdependSensor.execute(JdependSensor.java:56) at org.sonar.batch.sensor.SensorWrapper.analyse(SensorWrapper.java:57) at org.sonar.batch.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:58) at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:50) at org.sonar.batch.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:83) at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:192)
Do I miss something?
Solved it by executing that shell as extra step before sonar scanner run:
mkdir -p target/classes