Hi,
I’m using these versions to trigger maven sonar in jenkins
- SonarQube 7.9.3
- org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.0.2155
- maven 3.8.1 and JDK 11
I have this structure in my project:
-hsm
| - pom.xml
| - board-jdbc
| -- pom.xml
| - board-service
| -- pom.xml
The hsm (parent) pom xml has been configured with modules as per below :
< modules >
< module >board-jdbc</module>
< module >board-service</module>
< /modules>
But the artifact id in the submodule is different with the module / folder name :
board-jdbc > artifact id is hsm-board-jdbc
board-service > artifact id is hsm-board-service
When i’m running mvn clean install sonar:sonar in the local, there is no issue and successfully analyzed and uploaded. However, I always hit error below when i’m running using jenkins with the same command.
Blockquote
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.0.2155:sonar (default-cli) on project hsm: Unable to determine structure of project. Probably you use Maven Advanced Reactor Options with a broken tree of modules. “hsm-board-jdbc” is orphan
Would any of you have any idea on the issue?
FYI, i have tried to change the artifact id to match with module/folder name but the same error still appeared.