Unable to get Jacoco work in My scenario

1,316 views
Skip to first unread message

Mrinmoy Chakraborty

unread,
Jun 19, 2018, 9:20:50 AM6/19/18
to JaCoCo and EclEmma Users
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

Evgeny Mandrikov

unread,
Jun 19, 2018, 1:58:51 PM6/19/18
to JaCoCo and EclEmma Users
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.

Mrinmoy Chakraborty

unread,
Jun 20, 2018, 3:56:41 AM6/20/18
to jac...@googlegroups.com, mand...@gmail.com
Thanks for your response Evgeny, I completely agree that it's not really a jacoco issue. BUt as I said I am unable to get jacoco work in the above scenario.
I am attaching two files here - The effective POM a module which has the POM project as parent and the profile configuration of the global parent.
Please highlight if you see any issue.

Also execution are not completely in POM bcoz we want to control which plugins run on a application from Jenkins (e.g. Development build, Test Build, Daily Build, Release build etc)

-Mrinmoy


--
You received this message because you are subscribed to the Google Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jacoco+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/407ca153-92fd-49ec-9a1b-081113c86989%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
effective_pom.txt
profile-in-parent.txt

Evgeny Mandrikov

unread,
Jun 26, 2018, 12:05:31 PM6/26/18
to JaCoCo and EclEmma Users

On Wednesday, June 20, 2018 at 9:56:41 AM UTC+2, Mrinmoy Chakraborty wrote:
Thanks for your response Evgeny, I completely agree that it's not really a jacoco issue. BUt as I said I am unable to get jacoco work in the above scenario.
I am attaching two files here - The effective POM a module which has the POM project as parent and the profile configuration of the global parent.
Please highlight if you see any issue.

I wouldn't name attached files a "complete reproducer".
And they look ok.

Could you please provide full output of a failing executing in a debug mode - "mvn -X" ?

 
Also execution are not completely in POM bcoz we want to control which plugins run on a application from Jenkins (e.g. Development build, Test Build, Daily Build, Release build etc)

You can control executions fully specified in POM by properties and/or activation/deactivation of profiles.

 

-Mrinmoy


On Tue, Jun 19, 2018 at 11:28 PM Evgeny Mandrikov <mand...@gmail.com> wrote:
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

--
You received this message because you are subscribed to the Google Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jacoco+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages