Sanner fails with "Orphan Module" Error on maven project

Hi,

There is error occuring after scan on a maven project.

Error:  Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:5.1.0.4751:sonar (default-cli) on project trino-root: Unable to determine structure of project. Probably you use Maven Advanced Reactor Options with a broken tree of modules. "trino-cli" is orphan -> [Help 1]
Error:  
Error:  To see the full stack trace of the errors, re-run Maven with the -e switch.
Error:  Re-run Maven using the -X switch to enable full debug logging.
Error:  
Error:  For more information about the errors and possible solutions, please read the following articles:
Error:  [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Error: Process completed with exit code 1.

and this is github action file context

name: Sonarqube Build

on:
  push:
    branches:
      - "release**"
      - "custom**"

  pull_request:
    types: [opened, synchronize, reopened]


jobs:
  build:
    name: Build and analyze
    runs-on: runner-ubuntu-medium-ondemand-amd64

    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0  # Shallow clones should be disabled for a better relevancy of analysis
      - name: Set up JDK
        uses: actions/setup-java@v4
        with:
          java-version: 22
          distribution: 'zulu' # Alternative distribution options are available.
          cache: maven
      - name: Set up Maven
        run: |
          sudo apt install -y maven
      - name: Echo $JAVA_HOME
        run: echo $JAVA_HOME
      - name: Echo $MVN
        run: mvn -v
      - name: Cache SonarQube packages
        uses: actions/cache@v4
        with:
          path: ~/.sonar/cache
          key: ${{ runner.os }}-sonar
          restore-keys: ${{ runner.os }}-sonar
      - name: Cache Maven packages
        uses: actions/cache@v4
        with:
          path: ~/.m2
          key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
          restore-keys: ${{ runner.os }}-m2
      - name: Build and analyze
        env:
          SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
          SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
        run: |
            mvn -B -T 2C verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \
            -pl '!:trino-server-rpm,!:trino-docs,!:trino-proxy,!:trino-verifier,!:trino-benchto-benchmarks,!:trino-tests' \
            -Dsonar.inclusions=**/*.java -Dsonar.exclusions=trino-client/**,**/src/test/**,client/** \
            -Dair.check.skip-all -DskipTests -Denforcer.fail=false -Denforcer.skip=true \
            -Dsonar.projectKey=projectKey \
            -Dsonar.projectName='trino'

the project is this. GitHub - trinodb/trino: Official repository of Trino, the distributed SQL query engine for big data, formerly known as PrestoSQL (https://trino.io)

I’ve found a similar issue discussed here: Maven Advanced Reactor Options with a broken tree of modules - #6 by Shriram_Venkatasubra

and I assume removing dependeny-reduced pom might help to solve the error but because of side effect of doing that we can’t remove that .

I wonder if there’s other ways to solve this issue.

Thank you.