Details
Description
In our Java project, we have in src/main/java a package x.y.z that contains a file 'package-info.java' for Java doc purposes.
There's also a package x.y.z (i.e. of same name) in src/test/java which contains the related tests. There's also a file 'package-info.java' there.
After doing a 'mvn clean install', running 'mvn sonar:sonar' with version 2.4.1 of the Sonar Maven Plugin worked fine for this project.
However, we have upgraded to version 2.7, and now we get
org.sonar.api.resources.DuplicatedSourceException: x.y.z.package-info
at org.sonar.batch.index.SourcePersister.saveSource(SourcePersister.java:45)
(see attachment for full stacktrace) on 'mvn sonar:sonar' when the 'Sensor JavaSourceImporter' runs.
Where's the problem here?
Issue Links
- depends upon
-
SONAR-1078
General exclusion patterns
-
-
SONAR-3758
Make it possible to define some dedicated exclusion patterns on unit test source files
-
- is related to
-
SONARPLUGINS-1682
Sonar analysis should not fail when a project contains duplicate source files
-