I created a performance test as a maven submodule for my main module. All test classes are written in the src / main / java section, not src / test / java
I can pack the project as a jar and run it to test the performance of my project.
I wanted to run mvn test . For mvn test to work, I must have a value of <testSourceDirectory> . As in this case, I have the code in src / main / java that I installed for this:
<testSourceDirectory>src/main/java</testSourceDirectory>
Now mvn test works.
But the problem is that building a sonar is not a mistake: can't be indexed twice . Which is obvious, since my pom testSourceDirectory and sourceDirectory same.
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.5:sonar (default-cli) on project Blah: File [relative=XYZ.java, abs=/Path/XYZ.java] can't be indexed twice. Please check that inclusion/exclusion patterns produce disjoint sets for main and test files ->
How to fix this problem?
source share