Problem running Sonarqube analysis from Maven in combination with flatten-maven-plugin

I have a multi-module project that uses the flatten-maven-plugin. One of the modules is using a non-standard pom file name and is references in the parent module as

<modules>
  <module>child/pom-non-standard.xml</module>
  ...
</modules>

Using the flatten-maven-plugin the effective pom will be child/.flattened-pom.xml. The combination of both these non-standard pom files names leads to a problem in org.sonarsource.scanner.maven.bootstrap.MavenProjectConverter.findMavenProject (version 3.6.0.1398 but it’s still present in the current master). The canonical file of the module path is child/pom-non-standard.xml, which is not a directory. Hence the method tries to find a matching pom file name among the modules but doesn’t find a match against child/.flattened-pom.xml.
The fix is simple and is attached as a patch (715 Bytes) .
I know this is a real corner case but it breaks our system. Since the fix is trivial I would appreciate if it could be included in one of the next release.

Hi,
I’ve created a ticket to cover that limitation: https://jira.sonarsource.com/browse/MSONAR-173

As noted there, I wonder why we don’t have the same problem with some other plugins such as the maven shade plugin. They might also change the links to the children in the parent pom file.