Good to hear! Note that append=true is the default anyways.
On 25.08.17 16:04, Naveen Gupta wrote:
Hi Marc, Thanks for valauble advise, please review below mentioned pom.xml <plugin> <groupId>org.jacoco</groupId> <artifactId>jacoco-maven-plugin</artifactId> <version>0.7.9</version> <configuration> <skip>${maven.test.skip}</skip> <!--<output>file</output> --> <append>true</append> </configuration> <executions> <execution> <id>jacoco-initialize</id> <goals> <goal>prepare-agent</goal> </goals> <configuration> <!-- Sets the path to the file which contains the execution data. --> <destFile>${project.build.directory}/target/jacoco.exec</destFile> </configuration> </execution> <execution> <id>jacoco-site</id> <phase>verify</phase> <goals> <goal>report</goal> </goals> <configuration> <!-- Sets the path to the file which contains the execution data. --> <destFile>${project.build.directory}/target/jacoco.exec</destFile> </configuration> </execution> </executions>undefined</plugin>undefined<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.12.2</version> <configuration> <includes> <include>**/${testGroup}/*Test.java</include> </includes> <systemPropertyVariables> <jacoco-agent.destfile>web/target/jacoco.exec</jacoco-agent.destfile> </systemPropertyVariables> <argLine>-Xms256m -Xmx2048m -XX:MaxPermSize=2048m</argLine> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.2</version> <configuration> <source>${java.version}</source> <target>${java.version}</target> </configuration> </plugin> This is actually works for me. Regards NaveenOn Fri, Aug 25, 2017 at 7:02 PM, Marc R. Hoffmann <[email protected] <mailto:[email protected]>> wrote:Hi, it is not possible to merge already generated coverage reports. But you can (re-)create a coverage report based on execution data from multiple runs. There are multiple ways to do this: * Merge multiple exec files into a single one (see merge goal) * Create the report with multiple exec files as input * Let the JaCoCo agent append exec data to a single file (this is how you already configured your agent) However it is not possible to merge execution data when class files have been changed between the individual test runs. Regards, -marc On 25.08.17 12:10, [email protected] <mailto:[email protected]> wrote:How to append existing coverage report in new coverage report Hi All, I am working on application, where after every 2 hours we need to update the build means need to replace ROOT.war in tomcat/webapps. Is there any way append existing report in new coverage report. Changes in POM.xml: <plugin> <groupId>org.jacoco</groupId> <artifactId>jacoco-maven-plugin</artifactId> <version>0.7.9</version> <configuration> <skip>${maven.test.skip}</skip> <!--<output>file</output> --> <append>true</append> </configuration> <executions> <execution> <id>jacoco-initialize</id> <goals> <goal>prepare-agent</goal> </goals> <configuration> <!-- Sets the path to the file which contains the execution data. --> <destFile>${project.build.directory}/target/jacoco.exec</destFile> </configuration> </execution> <execution> <id>jacoco-site</id> <phase>verify</phase> <goals> <goal>report</goal> </goals> <configuration> <!-- Sets the path to the file which contains the execution data. --> <destFile>${project.build.directory}/target/jacoco.exec</destFile> </configuration> </execution> </executions> </plugin> Changes in Catlina.sh: set JAVA_OPTS=%JAVA_OPTS% %LOGGING_MANAGER% -javaagent:D:\jacoco-0.7.9\lib\jacocoagent.jar=destfile=D:\jacoco\jacoco.exec,append=true,includes=*,output=file Please suggest if there is any way to do that-- 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/mG6nkrcnVdE/unsubscribe <https://groups.google.com/d/topic/jacoco/mG6nkrcnVdE/unsubscribe>. To unsubscribe from this group and all its topics, send an email to [email protected] <mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/4f4a009c-a1da-117f-73da-a47e0ac52160%40mountainminds.com <https://groups.google.com/d/msgid/jacoco/4f4a009c-a1da-117f-73da-a47e0ac52160%40mountainminds.com?utm_medium=email&utm_source=footer>. For more options, visit https://groups.google.com/d/optout<https://groups.google.com/d/optout>. -- 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 [email protected] <mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/CA%2Bqs%2BRJqtNfLea1mSM9vRvZ6knaM5dJfM%2BBe12oFsUXEXKTiuw%40mail.gmail.com <https://groups.google.com/d/msgid/jacoco/CA%2Bqs%2BRJqtNfLea1mSM9vRvZ6knaM5dJfM%2BBe12oFsUXEXKTiuw%40mail.gmail.com?utm_medium=email&utm_source=footer>. For more options, visit https://groups.google.com/d/optout.
-- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/e7321e05-dab5-5023-eb65-854bdfabc8b5%40mountainminds.com. For more options, visit https://groups.google.com/d/optout.
