Is there a way to run jacoco:check outside of a maven project?

已查看 13 次
跳至第一个未读帖子

mark.va...@unisys.com

未读,
2017年1月12日 11:17:362017/1/12
收件人 JaCoCo and EclEmma Users
Is there a way to run jacoco:check outside of a maven project?

For example, I can run jacoco:dump outside of a maven project by specifying parameters on the command line.
Is there a way to do something similar for jacoco:check?

Regards.
Mark K Vallevand

Evgeny Mandrikov

未读,
2017年1月13日 11:33:432017/1/13
收件人 JaCoCo and EclEmma Users、mark.va...@unisys.com
Hi Mark,

This is not possible as stated in documentation of "jacoco:check" ( http://www.jacoco.org/jacoco/trunk/doc/check-mojo.html ) - "Requires a Maven project to be executed."
Mainly because its configuration that is in pom.xml can be quite complex to be specified in command-line - http://www.jacoco.org/jacoco/trunk/doc/check-mojo.html#rules
However you can place this configuration into "separate-pom.xml" and execute "mvn -f separate-pom.xml".
Also there are other ways to integrate such checks - see JaCoCo APIs ( http://www.jacoco.org/jacoco/trunk/doc/api/index.html ), Ant Task ( http://www.jacoco.org/jacoco/trunk/doc/ant.html ), etc.

Hope this helps.

Regards,
Evgeny

mark.va...@unisys.com

未读,
2017年1月13日 11:41:452017/1/13
收件人 JaCoCo and EclEmma Users、mark.va...@unisys.com
Thank you very much.
It is a great help.
I did not consider a separate pom file. Excellent.
I have been studying the API. I'm trying to avoid writing my own program and using things already working. But, if the boss wants more detailed information about coverage results, he will need to make time for it.
I don't think Ant is an option, but I'll take another look.

Regards.
Mark K Vallevand

Evgeny Mandrikov

未读,
2017年1月13日 12:32:032017/1/13
收件人 JaCoCo and EclEmma Users、mark.va...@unisys.com
Forgot to mention that separate pom is not a recommendation, but just my crazy idea of possible workarounds for you ;)
Also should be noted that other integrations of JaCoCo such as Jenkins Plugin, SonarQube Plugin, etc. might be useful on a field of automatic checks.
回复全部
回复作者
转发
此会话已锁定
您无法回复已锁定的会话,亦不可对其执行其他操作。
0 个新帖子