Can you use Jacoco prepare-agent with maven without installing the jacoco agent on the remote server first?

25 views
Skip to first unread message

kry...@gmail.com

unread,
Mar 26, 2020, 5:03:24 AM3/26/20
to JaCoCo and EclEmma Users
Is it possible to use jacoco plugin with maven, and a goal like prepare-agent which will then upload this agent through maven to the server and then dump the report into a local folder?

Or in all cases, to generate a report, do you need a jacoco agent running on the server side (remotely) to connect to locally with e.g. maven?

Marc Hoffmann

unread,
Mar 26, 2020, 6:55:28 AM3/26/20
to jac...@googlegroups.com
Hi,

the agent needs to be configured for the JVM where your code under test is executed. If this is on a remote server the jacocoagent.jar needs to be on that server and the server JVM must be started with the respective command line options.

Our Maven goal only supports configuration of JVMs startet within the local Maven build. Upload of the agent to a remote server is not supported by our built-in tools.

Regards,
-marc

On 26. Mar 2020, at 10:03, kry...@gmail.com wrote:

Is it possible to use jacoco plugin with maven, and a goal like prepare-agent which will then upload this agent through maven to the server and then dump the report into a local folder?

Or in all cases, to generate a report, do you need a jacoco agent running on the server side (remotely) to connect to locally with e.g. maven?

--
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/069fc616-7c95-40de-bec6-1ec0919646fe%40googlegroups.com.

kry...@gmail.com

unread,
Mar 26, 2020, 7:04:06 AM3/26/20
to JaCoCo and EclEmma Users
Thank you for a quick reply. 


Den torsdag 26 mars 2020 kl. 11:55:28 UTC+1 skrev Marc R. Hoffmann:
Hi,

the agent needs to be configured for the JVM where your code under test is executed. If this is on a remote server the jacocoagent.jar needs to be on that server and the server JVM must be started with the respective command line options.

Our Maven goal only supports configuration of JVMs startet within the local Maven build. Upload of the agent to a remote server is not supported by our built-in tools.

Regards,
-marc
On 26. Mar 2020, at 10:03, kry...@gmail.com wrote:

Is it possible to use jacoco plugin with maven, and a goal like prepare-agent which will then upload this agent through maven to the server and then dump the report into a local folder?

Or in all cases, to generate a report, do you need a jacoco agent running on the server side (remotely) to connect to locally with e.g. maven?

--
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 jac...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages