I have created performance test as a maven submodule to my main module. All the test classes are written under src/main/java and not src/test
This is not a standard Maven usage but you can easily fix SonarQube analysis using exclusions. sonar.exclusions=src/main/java/** or sonar.test.exclusions=src/main/java/**
depending on whether you want your source files to be considered as tests or main files.
But the proper Maven way would be to put your tests in src/test/java and ackage your tests: https://maven.apache.org/guides/mini/guide-attached-tests.html