Is there a way to configure Maven duplicate-finder-maven-plugin plugin to scan only specific location and excluding everything else? Because in this moment, the results shows myriads of conflict that come from project dependencies.
From the configuration, it looks that the way to do it is explicitly excluding every dependency I don't want to scan.
Question: Is there a better practice? How to scan - for example - only the code that is under my direct responsibility, like com.my-company.my-project
?
From the official documentation your case is already documented as following:
Ignore all classes that aren't from my company:
<configuration> <ignoredClassPatterns> <ignoredClassPattern>^((?!com[/.]mycompany).*)$</ignoredClassPattern> </ignoredClassPatterns> </configuration>
Note that the configuration option above is only available from plugin version 1.2.1 and later.