Closed noorul closed 2 years ago
I think maven has a bug. Their logic is defined here and I know what you are doing used to work. I tried a few different plugins with maven 3.8.1 and not a one works now unless owned by maven or mojohaus. There isn't anything special they define so I'm not sure if this is just an issue in 3.8.1 or how long its been a problem. To get around it, you can add the following to your settings.xml.
<pluginGroups>
<pluginGroup>com.github.spotbugs</pluginGroup>
</pluginGroups>
Other option which does work, add spotbugs to dependency management then it will also just work without having to mess with settings.xml.
@hazendaz Thank you, adding pluginGroups
to made it work. But normally we do not have settings.xml inside the source repository. Do you know whether there is an open bug for this?
I don't know if any defect is opened but seemed to recall maven changing in recent versions how resolutions worked. You can instead just list spotbugs in dependency management and that will also solve for it.
closing as work around present.
I have the below pom.xml in the parent folder and the command
mvn spotbugs:check
gives an error. The same plugin works with a simple project without modules.Error reported