Closed zenglian closed 5 years ago
only throw in root project, works in sub modules
I am running into the same issue with a multi-project setup. How do I run this from the root directory on the subprojects without error?
@jscancella without any further information, it is hard for me to provide a solution. The error messages says that there are no repositories defined, have you check that?
I am using it in a multi-project setup and checking cpd in the root directory at junit-dataprovider
, see https://github.com/TNG/junit-dataprovider/blob/main/build.gradle.kts. Maybe this might help.
Yeah I had to add repositories - but what is strange is with other community plugins I didn't need to. Is there a reason you don't package all your dependencies into a single jar and rely on that so that you don't have to specify repositories?
Yes, because different people want to use different versions of cpd ;-)
Interesting. I can change the version in spotbugs but don't need to specify a repository for that plugin. I wonder what they are doing that allows them to be able to do that? Anyways, thank you for the help and a great plugin, please keep up the great work!
hm ... maybe I can improve or there is difference between internal and external plugins ;-)
spotbugs is an external plugin https://github.com/spotbugs/spotbugs-gradle-plugin
Right, mixed it up with old FindBugs integrated plugin 🙊
Thanks for the hint, so this could be used as template (if they not just add some repo by default like maven central by default, but some users might prefer using their own proxy artifact repository...)
yeah, not sure to be honest. But maybe worth a look. Makes the build.gradle a little cleaner as I don't need to specify stuff twice.
build.gradle
run
gradle cpdCheck
, got