can't be indexed twice - testSourceDirectory and sourceDirectory are same

后端 未结 4 863
执笔经年
执笔经年 2021-01-03 21:05

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

4条回答
  •  囚心锁ツ
    2021-01-03 21:59

    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

提交回复
热议问题