Re: [java code coverage] jacoco-maven-plugin:prepare-agent with "excludes" parameter syntax !!!!

2016-10-14 Thread yajvane
Hi Marc,

1] The restriction on my side was , I can NOT change pom.xml's (there are 
100+ pom.xml's : multi-module maven project). I should use 
jacoco-maven-plugin and pass all parameters as command-line arguments for 
prepare-agent goal. Is it possible to pass "exclude" parameter 
via command-line rather configuring pom's ?

2] Also, can you please confirm me the below process ?? I am using 
pre-instrumented classes with jacoco-maven-plugin. (*ref:*
http://www.eclemma.org/jacoco/trunk/doc/offline.html. *paragraph*: "Using 
Pre-Instrumented Classes With the Java Agent"). 

steps followed:
-> compile - classes generated
-> instrument - replace generated-classes with instrumented-classes
-> test - perform unit tests using instrumented classes (ex: mvn 
org.jacoco:jacoco-maven-plugin:prepare-agent test)
-> restore-instrumented-classes - restore back to original classes on disk 
for further analysis 

I verified & looks fine to me for couple of projects (both 
testng/power-mock based test cases). it looks jacoco agent is identifying 
the pre-instrumented classes at run time and not-instrumenting the again. 

I hope there should NOT be any minute discrepancy with this process. Can 
you please confirm the steps once ? 

-Regards,
Kesav.

On Friday, October 14, 2016 at 11:40:20 AM UTC+5:30, Marc R. Hoffmann wrote:
>
> Hi Kesav,
>
> this should do the Job for the prepare-agent goal:
>
> 
>   
> *
>   
> 
>
> But if you use offline-instrumention there is no need for a agent, you can 
> simply put it on the classpath. See this example in our documentation:
>
> http://www.eclemma.org/jacoco/trunk/doc/examples/build/pom-offline.xml
>
> Regards,
> -marc
>
> On 12.10.16 13:01, yajvane wrote:
>
> Hi, 
>
> In order to get the coverage for power mock(mockito) based test cases ., 
> tried offline Instrumentation and looks it is working fine. However seeing 
> this exception multiple times on console (Caused by: 
> java.lang.IllegalStateException: Class x/y/z is already instrumented).
>
> As per the jacoco documentation related to offline instrumentation: ( 
> http://www.eclemma.org/jacoco/trunk/doc/offline.html) it looks there is 
> an optional parameter "excludes=*" that can be used to stop this exception 
> continuously getting popped-up on console.
>
> How to specify this optional parameter as part of 
> jacoco-maven-plugin:prepare-agent goal ?? (
> http://www.eclemma.org/jacoco/trunk/doc/prepare-agent-mojo.html) . I 
> tried different ways but any syntax is not working fine.
>
> command trying to use:
>  mvn org.jacoco:jacoco-maven-plugin:prepare-agent*["excludes=*]* test 
> -Dmaven.test.failure.ignore=true 
>
>
> Thanks for all the help.
>
> -Regards,
> kesav.
> -- 
> 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/81a09199-e8b9-489f-bcf0-74e1e4b98b83%40googlegroups.com
>  
> 
> .
> 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 jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/4f9fd339-1df7-4c6d-bc71-799612615d14%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] Can't find the correct syntax for parameter in jacoco:report-aggregate

2016-10-14 Thread chris . nehind
Marc,

I've decompiled a iPojo-modified class from the JaCoCo dumped classes and it 
contains iPojo code. If the report-aggregate uses the 'dumped classes' to build 
the report then that means that it compares the iPojo-modified classes to the 
ones located in the target/classes directory of the related project (these 
classes are not modified).
Is it possible to force the aggregate-report plugin to use the project bundles 
(OSGI jar) instead of its classes?
Regards.

Chris

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/9052bace-be0c-4f81-afc5-bf2b549d7cf6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] Can't find the correct syntax for parameter in jacoco:report-aggregate

2016-10-14 Thread chris . nehind
Hi,

Thanks for the examples!

In fact, my real problem is: some of our integration tests run in a OSGI 
context. We use the "maven-bundle-plugin" to build each module bundle and the 
"maven-ipojo-plugin" because ... we use iPojo :). This plugin modifies some 
classes of the bundle to add some byte code. When the report-aggregate runs, it 
displays that it can manage these modified classes because they do not match to 
execution data.
I've added the "classDumpDir" in the root project:
${project.build.directory}/classdumps
but it has not changed the result. It seems that the aggregate-report don't use 
the dumped classes. Did I forget something?
Thanks for all.

Chris

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/37accf76-a225-418c-8799-fc981ddde00e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.