Jacoco - Enhancement to dump jacoco.exec from more than one host in a single maven command

482 views
Skip to first unread message

manmo...@gmail.com

unread,
Jan 17, 2014, 5:49:38 PM1/17/14
to jac...@googlegroups.com
Hello,

I would like to dump jacoco exec file from different hostnames and merge it to a single file to generate report in a single maven command. Can you add a list of string type for accepting more than one host name so that i can pass multiple host names to dump goal to download the exec files from more than one hosts?

For example,

mvn -Djacoco.address=192.162.1.1,192.162.1.2 -Djacoco.port=9100 jacoco:dump jacoco:report

Above command wouldn't work because you can pass only one hostname which is a string type.

I'm not sure who implemented the jacoco maven plug-in. Let me know if you know the contact or if i'm not posting this to the right forum

Btw, jacoco is an excellant tool.


Thanks
ManMohan Veettil

Marc R. Hoffmann

unread,
Jan 19, 2014, 6:48:25 AM1/19/14
to jac...@googlegroups.com
Hi ManMohan,

I see more scenarios here:

* Mutiple VMs running on the same host on different ports
* Combination of both

So I wonder whether the proposed change helps in a specific use case
only. Alternatively you can configure multiple executions or wrap a
script around the mvn call. The current dump goal already appends the
data to a single *.exec file if appens=true (whch is default).

Cheers,
-marc

Manmohan

unread,
Jan 20, 2014, 12:10:20 AM1/20/14
to jac...@googlegroups.com
ya, i'm planning to use "dump" goal and use appends=true to pull the data from multiple hostnames. Thanks for the details. Also to use reset if i would want to reset the counter.

Thanks
Manmohan



--
You received this message because you are subscribed to a topic in the Google Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jacoco/t-s-WXDPNY8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jacoco+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
-thanks
http://www.jaxtr.com/manmohanpv

Krishna Aiyamperumal

unread,
Jun 18, 2015, 12:45:39 AM6/18/15
to jac...@googlegroups.com, manmo...@gmail.com
Hi Team,

I have three hosts and I need to capture the code coverage results 

<plugin>

                <groupId>org.jacoco</groupId>

                <artifactId>jacoco-maven-plugin</artifactId>

                <version>0.7.4.201502262128</version>

                <configuration>

                    <destFile>${basedir}/target/coverage-reports/jacoco-it.exec</destFile>

                    <dataFile>${basedir}/target/coverage-reports/jacoco-it.exec</dataFile>

                    <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>

                </configuration>

                <executions>

                    <execution>

                        <id>dump</id>

                        <phase>post-integration-test</phase>

                        <goals>

                            <goal>dump</goal>

                        </goals>

                        <configuration>

                            <address>192.162.1.1,192.162.1.2,192.162.1.3</address>

                            <port>6300</port>

                            <dump>true</dump>

                        </configuration>

                    </execution>

                    <execution>

                        <id>default-report-integration</id>

                        <goals>

                            <goal>report-integration</goal>

                        </goals>

                    </execution>

                </executions>

            </plugin>


This is not working. Please provide solution to solve this

Thanks,
Krishna.A

Manmohan

unread,
Jun 18, 2015, 12:49:11 AM6/18/15
to Krishna Aiyamperumal, jac...@googlegroups.com

You have to add goal merge so that the dumped files are merged and then generate report on the merged file.

Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages