This is mainly question about Maven and not about JaCoCo, because message
"No plugin found for prefix '...' in the current project and in the plugin groups"
is not generated by jacoco-maven-plugin, but by Maven in case when you do "mvn <plugin>:<goal>" and Maven can't find declaration of "<plugin>" in project.
Without having access to your environment, one can only guess why so:
- maybe you forgot to activate profile where plugin declared?
- maybe parent not declared correctly in all projects?
- maybe declaration of plugin is incorrect?
- etc...
Or provide complete, yet minimal example that demonstrates your problem, or we can only advice to double check your POMs. You can also try "mvn help:effective-pom".
Also why not define execution completely in POM and not in command line, especially that you anyway have profile for that. And then check projects where it is not executed.
On Tuesday, June 19, 2018 at 3:20:50 PM UTC+2, Mrinmoy Chakraborty wrote:
I have the below scenario -
I have a POM project which has a profile with activation criteria. The profile has jacoco plugin used. This project is maintained as a parent project of several other maven projects (not maven modules). We use this POM project to maintain consistency of dependency and build plugins across our various project.
Please note that all projects are maven project with parent set as the POM project. But they are not maven modules.
In this scenario when I trigger my jenkins build I get the error - No plugin found for prefix 'jacoco' in the current project and in the plugin groups
The goals we trigger is - clean jacoco:prepare-agent install pmd:pmd findbugs:findbugs
I tried various approach but the maven project don't inherit jacoco plugin from parent project at all.
PS : The plugin works for multi-module maven project perfectly. Used it in a different scenario. .
Any help / direction will be helpful
-Mrinmoy