Sonar-maven-plugin maven resume issue


(Federico Lenzi) #1

On the company we have a build that takes >~ 1:30 hours and sometimes it fails due to timeouts. So what we do is use the maven -rf, --resume-from to build again and continue starting from the last module that failed. The problem is using that it is giving this error:

[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin: (default-cli) on project och-batch-app: Maven session does not declare a top level project -> [Help 1]

For what I can see in the code on this line the session doesn’t have this root project that is built first when using the -rf argument.

I’m not familiar with maven plugin developement, but shouldn’t another method on the session be used?, seems a common scenario.
I can provide more information if needed.