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:22.214.171.1244:sonar (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 https://github.com/SonarSource/sonar-scanner-maven/blob/master/src/main/java/org/sonarsource/scanner/maven/bootstrap/ScannerBootstrapper.java#L93 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.