AnjaliW
asked on
maven cobertura plugin
i am running JUNIT test and want code coverage for those testcase .
added "cobertura-maven-plugin" for code coverage and used following command
Command used: "mvn clean test cobertura:cobertura -X >>out.log" .
it is created cobeture folder inside target folder.
But don't see any reports generated which says your % of code is covered....
WHere should I check these reports..
POM>xml is attached.
pom.xml
added "cobertura-maven-plugin" for code coverage and used following command
Command used: "mvn clean test cobertura:cobertura -X >>out.log" .
it is created cobeture folder inside target folder.
But don't see any reports generated which says your % of code is covered....
WHere should I check these reports..
POM>xml is attached.
pom.xml
ASKER
I have checked here " ${project.basedir}/target/ cobertura ".Nothing available here..
there is no site directory in my project since i am just running JUNIT and using code coverage on it.
here are logs which says "cobertura.ser " couln't find...
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 38.579 sec
Results :
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] <<< cobertura-maven-plugin:2.5 :cobertura (default-cli) @ com.ofss.fc.junit.originat ion <<<
[INFO]
[INFO] --- cobertura-maven-plugin:2.5 :cobertura (default-cli) @ com.ofss.fc.junit.originat ion ---
[DEBUG] Configuring mojo org.codehaus.mojo:cobertur a-maven-pl ugin:2.5:c obertura from plugin realm ClassRealm[plugin>org.code haus.mojo: cobertura- maven-plug in:2.5, parent: sun.misc.Launcher$AppClass Loader@123 60be0]
[DEBUG] Setting property: classpath.resource.loader. class => 'org.codehaus.plexus.veloc ity.Contex tClassLoad erResource Loader'.
[DEBUG] Setting property: site.resource.loader.class => 'org.codehaus.plexus.veloc ity.SiteRe sourceLoad er'.
[DEBUG] Setting property: velocimacro.messages.on => 'false'.
[DEBUG] Setting property: resource.loader => 'classpath,site'.
[DEBUG] Setting property: runtime.log.invalid.refere nces => 'false'.
[DEBUG] Setting property: resource.manager.logwhenfo und => 'false'.
[DEBUG] Setting property: velocimacro.permissions.al low.inline .to.replac e.global => 'true'.
[DEBUG] ************************** ********** ********** ********** ********** *
[DEBUG] Starting Apache Velocity v1.5 (compiled: 2007-02-22 08:52:29)
[DEBUG] RuntimeInstance initializing.
[DEBUG] Default Properties File: org\apache\velocity\runtim e\defaults \velocity. properties
[DEBUG] LogSystem has been deprecated. Please use a LogChute implementation.
[DEBUG] Default ResourceManager initializing. (class org.apache.velocity.runtim e.resource .ResourceM anagerImpl )
[DEBUG] ResourceLoader instantiated: org.codehaus.plexus.veloci ty.Context ClassLoade rResourceL oader
[DEBUG] ResourceLoader instantiated: org.codehaus.plexus.veloci ty.SiteRes ourceLoade r
[DEBUG] ResourceCache: initialized (class org.apache.velocity.runtim e.resource .ResourceC acheImpl)
[DEBUG] Default ResourceManager initialization complete.
[DEBUG] Loaded System Directive: org.apache.velocity.runtim e.directiv e.Literal
[DEBUG] Loaded System Directive: org.apache.velocity.runtim e.directiv e.Macro
[DEBUG] Loaded System Directive: org.apache.velocity.runtim e.directiv e.Parse
[DEBUG] Loaded System Directive: org.apache.velocity.runtim e.directiv e.Include
[DEBUG] Loaded System Directive: org.apache.velocity.runtim e.directiv e.Foreach
[DEBUG] Created '20' parsers.
[DEBUG] Velocimacro : initialization starting.
[DEBUG] Velocimacro : allowInline = true : VMs can be defined inline in templates
[DEBUG] Velocimacro : allowInlineToOverride = true : VMs defined inline may replace previous VM definitions
[DEBUG] Velocimacro : allowInlineLocal = false : VMs defined inline will be global in scope if allowed.
[DEBUG] Velocimacro : autoload off : VM system will not automatically reload global library macros
[DEBUG] Velocimacro : Velocimacro : initialization complete.
[DEBUG] RuntimeInstance successfully initialized.
[DEBUG] Configuring mojo 'org.codehaus.mojo:cobertu ra-maven-p lugin:2.5: cobertura' with basic configurator -->
[DEBUG] (f) aggregate = false
[DEBUG] (f) dataFile = D:\code\project\testprojec ts\com.ofs s.fc.junit .\target\c obertura\c obertura.s er
[DEBUG] (f) encoding = ISO-8859-1
[DEBUG] (f) formats = [html, xml]
[DEBUG] (f) maxmem = 1024m
[DEBUG] (f) omitGplFiles = false
[DEBUG] (f) outputDirectory = D:\code\project\testprojec ts\com.ofs s.fc.junit .originati on\target\ site\cober tura
[DEBUG] (f) pluginClasspathList = [org.codehaus.mojo:cobertu ra-maven-p lugin:mave n-plugin:2 .5:, net.sourceforge.cobertura: cobertura: jar:1.9.4. 1:compile, oro:oro:jar:2.0.8:compile, asm:asm:jar:3.0:compile, asm:asm-tree:jar:3.0:compi le, log4j:log4j:jar:1.2.9:comp ile, org.apache.ant:ant:jar:1.7 .0:compile , org.apache.ant:ant-launche r:jar:1.7. 0:compile, net.sourceforge.cobertura: cobertura- runtime:po m:1.9.4.1: compile, urbanophile:java-getopt:ja r:1.0.9:co mpile, org.apache.maven.reporting :maven-rep orting-api :jar:2.0.6 :compile, org.apache.maven.doxia:dox ia-sink-ap i:jar:1.0- alpha-7:co mpile, org.apache.maven.reporting :maven-rep orting-imp l:jar:2.0. 4.2:compil e, commons-validator:commons- validator: jar:1.2.0: compile, commons-beanutils:commons- beanutils: jar:1.7.0: compile, commons-digester:commons-d igester:ja r:1.6:comp ile, commons-logging:commons-lo gging:jar: 1.0.4:comp ile, xml-apis:xml-apis:jar:1.0. b2:compile , org.apache.maven.doxia:dox ia-core:ja r:1.0:comp ile, org.apache.maven.doxia:dox ia-site-re nderer:jar :1.0:compi le, org.codehaus.plexus:plexus -i18n:jar: 1.0-beta-7 :compile, org.codehaus.plexus:plexus -velocity: jar:1.1.7: compile, org.apache.velocity:veloci ty:jar:1.5 :compile, org.apache.maven.doxia:dox ia-decorat ion-model: jar:1.0:co mpile, commons-collections:common s-collecti ons:jar:3. 2:compile, org.apache.maven.doxia:dox ia-module- apt:jar:1. 0:compile, org.apache.maven.doxia:dox ia-module- fml:jar:1. 0:compile, org.apache.maven.doxia:dox ia-module- xdoc:jar:1 .0:compile , org.apache.maven.doxia:dox ia-module- xhtml:jar: 1.0:compil e, commons-lang:commons-lang: jar:2.4:co mpile, org.codehaus.plexus:plexus -utils:jar :2.0.2:com pile, org.apache.maven.shared:ma ven-invoke r:jar:2.0. 11:compile ]
[DEBUG] (f) project = MavenProject: ngp.flexcube.com.ofss.fc.c z.nab.appl ication:co m.ofss.fc. junit.:1.0 @ D:\code\project\testprojec ts\com.ofs s.fc.junit \pom.xml
[DEBUG] (f) quiet = false
[DEBUG] (f) reactorProjects = [MavenProject: com.ofss.fc.cz.nab.applica tion:com.o fss.fc.cz. nab.applic ation:1.0 @ D:\code\pom.xml, MavenProject: ngp.flexcube.com.ofss.fc.c z.nab.appl ication:co m.ofss.fc. junit.orig ination:1. 0 @ D:\code\project\testprojec ts\com.ofs s.fc.junit \pom.xml]
[DEBUG] -- end configuration --
[INFO] Not executing cobertura:report as the cobertura data file (D:\code\project\testproje cts\target \cobertura \cobertura .ser) could not be found
[INFO] -------------------------- ---------- ---------- ---------- ---------- ------
[INFO] Reactor Summary:
[INFO]
[INFO] CZ NGP Artifacts .......................... ........ SUCCESS [1:41.647s]
[INFO] CZ Artifact: com.ofss.fc.junit........ SUCCESS [1:45.704s]
[INFO] -------------------------- ---------- ---------- ---------- ---------- ------
[INFO] BUILD SUCCESS
[INFO] -------------------------- ---------- ---------- ---------- ---------- ------
[INFO] Total time: 3:27.647s
[INFO] Finished at: Mon May 21 16:12:00 IST 2012
[INFO] Final Memory: 49M/199M
[INFO] -------------------------- -----
there is no site directory in my project since i am just running JUNIT and using code coverage on it.
here are logs which says "cobertura.ser " couln't find...
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 38.579 sec
Results :
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] <<< cobertura-maven-plugin:2.5
[INFO]
[INFO] --- cobertura-maven-plugin:2.5
[DEBUG] Configuring mojo org.codehaus.mojo:cobertur
[DEBUG] Setting property: classpath.resource.loader.
[DEBUG] Setting property: site.resource.loader.class
[DEBUG] Setting property: velocimacro.messages.on => 'false'.
[DEBUG] Setting property: resource.loader => 'classpath,site'.
[DEBUG] Setting property: runtime.log.invalid.refere
[DEBUG] Setting property: resource.manager.logwhenfo
[DEBUG] Setting property: velocimacro.permissions.al
[DEBUG] **************************
[DEBUG] Starting Apache Velocity v1.5 (compiled: 2007-02-22 08:52:29)
[DEBUG] RuntimeInstance initializing.
[DEBUG] Default Properties File: org\apache\velocity\runtim
[DEBUG] LogSystem has been deprecated. Please use a LogChute implementation.
[DEBUG] Default ResourceManager initializing. (class org.apache.velocity.runtim
[DEBUG] ResourceLoader instantiated: org.codehaus.plexus.veloci
[DEBUG] ResourceLoader instantiated: org.codehaus.plexus.veloci
[DEBUG] ResourceCache: initialized (class org.apache.velocity.runtim
[DEBUG] Default ResourceManager initialization complete.
[DEBUG] Loaded System Directive: org.apache.velocity.runtim
[DEBUG] Loaded System Directive: org.apache.velocity.runtim
[DEBUG] Loaded System Directive: org.apache.velocity.runtim
[DEBUG] Loaded System Directive: org.apache.velocity.runtim
[DEBUG] Loaded System Directive: org.apache.velocity.runtim
[DEBUG] Created '20' parsers.
[DEBUG] Velocimacro : initialization starting.
[DEBUG] Velocimacro : allowInline = true : VMs can be defined inline in templates
[DEBUG] Velocimacro : allowInlineToOverride = true : VMs defined inline may replace previous VM definitions
[DEBUG] Velocimacro : allowInlineLocal = false : VMs defined inline will be global in scope if allowed.
[DEBUG] Velocimacro : autoload off : VM system will not automatically reload global library macros
[DEBUG] Velocimacro : Velocimacro : initialization complete.
[DEBUG] RuntimeInstance successfully initialized.
[DEBUG] Configuring mojo 'org.codehaus.mojo:cobertu
[DEBUG] (f) aggregate = false
[DEBUG] (f) dataFile = D:\code\project\testprojec
[DEBUG] (f) encoding = ISO-8859-1
[DEBUG] (f) formats = [html, xml]
[DEBUG] (f) maxmem = 1024m
[DEBUG] (f) omitGplFiles = false
[DEBUG] (f) outputDirectory = D:\code\project\testprojec
[DEBUG] (f) pluginClasspathList = [org.codehaus.mojo:cobertu
[DEBUG] (f) project = MavenProject: ngp.flexcube.com.ofss.fc.c
[DEBUG] (f) quiet = false
[DEBUG] (f) reactorProjects = [MavenProject: com.ofss.fc.cz.nab.applica
[DEBUG] -- end configuration --
[INFO] Not executing cobertura:report as the cobertura data file (D:\code\project\testproje
[INFO] --------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] CZ NGP Artifacts ..........................
[INFO] CZ Artifact: com.ofss.fc.junit........ SUCCESS [1:45.704s]
[INFO] --------------------------
[INFO] BUILD SUCCESS
[INFO] --------------------------
[INFO] Total time: 3:27.647s
[INFO] Finished at: Mon May 21 16:12:00 IST 2012
[INFO] Final Memory: 49M/199M
[INFO] --------------------------
you need to specifically mention within the cobetura code where the .ser file is, that might allow the vm to find it.
currently, its looking at this location:
D:\code\project\testprojec ts\com.ofs s.fc.junit .\target\c obertura\c obertura.s er
maybe try inserting a <property> element within the pom.xml, inside the cobertura section and specify the exact path to the .ser file. That should solve this issue.
currently, its looking at this location:
D:\code\project\testprojec
maybe try inserting a <property> element within the pom.xml, inside the cobertura section and specify the exact path to the .ser file. That should solve this issue.
ASKER
But .ser file should automatically placed with the help of cobetura plugin ...isn't it?
If not then where do i get that .ser file and how to put that..
If not then where do i get that .ser file and how to put that..
this .ser file will be created when cobetura is successfully able to instrument the compiled classes. i am assuming that you are using maven 2, so please have a look at this tutorial which should give you help:
http://mojo.codehaus.org/cobertura-maven-plugin/index.html
http://mojo.codehaus.org/cobertura-maven-plugin/index.html
ASKER
well I have Maven 3.. in D drive "apache-maven-3.0.4".
Does it require target path which says which classes need to do code coverage or JUNIT has to cover???
Does it require target path which says which classes need to do code coverage or JUNIT has to cover???
Try including the maven-site plugin as well within the pom.xml, see the below link:
http://stackoverflow.com/questions/6931360/what-is-the-proper-way-to-use-cobertura-with-maven-3-0-2
http://stackoverflow.com/questions/6931360/what-is-the-proper-way-to-use-cobertura-with-maven-3-0-2
ASKER
I have tried above site plugin...And it is creating site folder with this structure:"target\site\cob ertura"
.
But doesn't creat report.
Well in my scenario:
I am just compiling JUNIT java class and target_classes/**/*.class hass been generated after JUNIT compile and runs and get JUNIT repot.Whatever main jave sources required to run tests ,it is provided by jars.So there are no classes available in target/classes folder.
So does it mean to run code coverage we need target/classes/... /*.class .
Or it coverage can use jars also to do code coverage reports????????
Thanks!
[INFO]
[INFO] <<< cobertura-maven-plugin:2.4 :cobertura (default-cli) @ com.ofss.fc.junit.originat ion <<<
[INFO]
[INFO] --- cobertura-maven-plugin:2.4 :cobertura (default-cli) @ com.ofss.fc.junit.originat ion ---
[DEBUG] Configuring mojo org.codehaus.mojo:cobertur a-maven-pl ugin:2.4:c obertura from plugin realm ClassRealm[plugin>org.code haus.mojo: cobertura- maven-plug in:2.4, parent: sun.misc.Launcher$AppClass Loader@123 60be0]
[DEBUG] Configuring mojo 'org.codehaus.mojo:cobertu ra-maven-p lugin:2.4: cobertura' with basic configurator -->
[DEBUG] (f) dataFile = D:\code\project\testprojec ts\com.ofs s.fc.junit .originati on\target\ cobertura\ cobertura. ser
[DEBUG] (f) encoding = ISO-8859-1
[DEBUG] (f) maxmem = 1024m
[DEBUG] (f) outputDirectory = D:\\code\project\testproje cts\com.of ss.fc.juni t.originat ion\target \site\cobe rtura
[DEBUG] (f) pluginClasspathList = [org.codehaus.mojo:cobertu ra-maven-p lugin:mave n-plugin:2 .4:, net.sourceforge.cobertura: cobertura: jar:1.9.4. 1:compile, oro:oro:jar:2.0.8:compile, asm:asm:jar:3.0:compile, asm:asm-tree:jar:3.0:compi le, log4j:log4j:jar:1.2.9:comp ile, org.apache.ant:ant:jar:1.7 .0:compile , org.apache.ant:ant-launche r:jar:1.7. 0:compile, net.sourceforge.cobertura: cobertura- runtime:po m:1.9.4.1: compile, urbanophile:java-getopt:ja r:1.0.9:co mpile, org.apache.maven.reporting :maven-rep orting-api :jar:2.0:c ompile, doxia:doxia-sink-api:jar:1 .0-alpha-4 :compile, org.apache.maven.reporting :maven-rep orting-imp l:jar:2.0: compile, commons-validator:commons- validator: jar:1.1.4: compile, doxia:doxia-core:jar:1.0-a lpha-4:com pile, commons-lang:commons-lang: jar:2.4:co mpile, org.codehaus.plexus:plexus -utils:jar :2.0.2:com pile]
[DEBUG] (f) project = MavenProject: .com.ofss.fc.cz.nab.applic ation:com. ofss.fc.ju nit.origin ation:1.0 @ D:\\code\project\testproje cts\com.of ss.fc.juni t.originat ion\pom.xm l
[DEBUG] (f) quiet = false
[DEBUG] -- end configuration --
[INFO] Not executing cobertura:report as the cobertura data file (D:\code\project\testproje cts\com.of ss.fc.juni t.originat ion\target \cobertura \cobertura .ser) could not be found
[INFO] -------------------------- ---------- ---------- ---------- ---------- ------
[INFO] Reactor Summary:
[INFO]
[INFO] CZ NGP Artifacts .......................... ........ SUCCESS [1.163s]
[INFO] CZ Artifact: com.ofss.fc.junit.originat ion ........ SUCCESS [59.986s]
[INFO] -------------------------- ---------- ---------- ---------- ---------- ------
[INFO] BUILD SUCCESS
[INFO] -------------------------- ---------- ---------- ---------- ---------- ------
[INFO] Total time: 1:01.510s
[INFO] Finished at: Tue May 22 09:32:18 IST 2012
[INFO] Final Memory: 32M/337M
.
But doesn't creat report.
Well in my scenario:
I am just compiling JUNIT java class and target_classes/**/*.class hass been generated after JUNIT compile and runs and get JUNIT repot.Whatever main jave sources required to run tests ,it is provided by jars.So there are no classes available in target/classes folder.
So does it mean to run code coverage we need target/classes/... /*.class .
Or it coverage can use jars also to do code coverage reports????????
Thanks!
[INFO]
[INFO] <<< cobertura-maven-plugin:2.4
[INFO]
[INFO] --- cobertura-maven-plugin:2.4
[DEBUG] Configuring mojo org.codehaus.mojo:cobertur
[DEBUG] Configuring mojo 'org.codehaus.mojo:cobertu
[DEBUG] (f) dataFile = D:\code\project\testprojec
[DEBUG] (f) encoding = ISO-8859-1
[DEBUG] (f) maxmem = 1024m
[DEBUG] (f) outputDirectory = D:\\code\project\testproje
[DEBUG] (f) pluginClasspathList = [org.codehaus.mojo:cobertu
[DEBUG] (f) project = MavenProject: .com.ofss.fc.cz.nab.applic
[DEBUG] (f) quiet = false
[DEBUG] -- end configuration --
[INFO] Not executing cobertura:report as the cobertura data file (D:\code\project\testproje
[INFO] --------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] CZ NGP Artifacts ..........................
[INFO] CZ Artifact: com.ofss.fc.junit.originat
[INFO] --------------------------
[INFO] BUILD SUCCESS
[INFO] --------------------------
[INFO] Total time: 1:01.510s
[INFO] Finished at: Tue May 22 09:32:18 IST 2012
[INFO] Final Memory: 32M/337M
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Yes i did added ...instrumentation part ..but it says no classes for instrumentations::followin g code is there:::: it is looking instumentation here "Basedir: D:\code\project\testprojec ts\com.ofs s.fc.junit .origin\ta rget\generated-classes\cobertura" .
But my test classes are in" target/testclasses/com.... ./*.class " here.
Code and logs are given:
plugin>
<groupId>org.codehaus.mojo </groupId>
<artifactId>cobertura-mave n-plugin</ artifactId >
<version>2.3</version>
<configuration>
<instrumentation>
<includes>
<include>${project.build.d irectory}/ test-class es/**/*.cl ass</inclu de>
</includes>
</instrumentation>
</configuration>
<executions>
<execution>
<id>clean</id>
<phase>pre-site</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
<execution>
<id>instrument</id>
<phase>site</phase>
<goals>
<goal>instrument</goal>
<goal>cobertura</goal>
</goals>
</execution>
</executions>
</plugin>
Logs Are:
[DEBUG] Configuring mojo org.codehaus.mojo:cobertur a-maven-pl ugin:2.3:i nstrument from plugin realm ClassRealm[plugin>org.code haus.mojo: cobertura- maven-plug in:2.3, parent: sun.misc.Launcher$AppClass Loader@123 60be0]
[DEBUG] Configuring mojo 'org.codehaus.mojo:cobertu ra-maven-p lugin:2.3: instrument ' with basic configurator -->
[DEBUG] (f) check = org.codehaus.mojo.cobertur a.configur ation.Conf igCheck@2c a2e19e
[DEBUG] (f) dataFile = D:\workspace_ngp\code\proj ect\testpr ojects\com .ofss.fc.j unit.origi nation\tar get\cobert ura\cobert ura.ser
[DEBUG] (f) includes = [D:\workspace_ngp\code\pro ject\testp rojects\co m.ofss.fc. junit.orig ination\ta rget/test- classes/** /*.class]
[DEBUG] (f) instrumentation = <ConfigInstrumentation basedir="D:\workspace_ngp\ code" includes="D:\workspace_ngp \code\proj ect\testpr ojects\com .ofss.fc.j unit.origi nation\tar get/test-c lasses/**/ *.class" />
[DEBUG] (f) maxmem = 1024m
[DEBUG] (f) pluginClasspathList = [org.codehaus.mojo:cobertu ra-maven-p lugin:mave n-plugin:2 .3:, net.sourceforge.cobertura: cobertura: jar:1.9.2: compile, oro:oro:jar:2.0.8:compile, asm:asm:jar:3.0:compile, asm:asm-tree:jar:3.0:compi le, log4j:log4j:jar:1.2.9:comp ile, org.apache.ant:ant:jar:1.7 .0:compile , org.apache.ant:ant-launche r:jar:1.7. 0:compile, net.sourceforge.cobertura: cobertura- runtime:po m:1.9.2:co mpile, urbanophile:java-getopt:ja r:1.0.9:co mpile, org.apache.maven.reporting :maven-rep orting-api :jar:2.0:c ompile, doxia:doxia-sink-api:jar:1 .0-alpha-4 :compile, org.apache.maven.reporting :maven-rep orting-imp l:jar:2.0: compile, commons-validator:commons- validator: jar:1.1.4: compile, doxia:doxia-core:jar:1.0-a lpha-4:com pile, org.codehaus.plexus:plexus -utils:jar :1.1:compi le]
[DEBUG] (f) project = MavenProject: ngp.flexcube.com.ofss.fc.c z.nab.appl ication:co m.ofss.fc. junit.orig ination:1. 0 @ D:\workspace_ngp\code\proj ect\testpr ojects\com .ofss.fc.j unit.origi nation\pom .xml
[DEBUG] (f) quiet = false
[DEBUG] -- end configuration --
[DEBUG] Config : <ConfigInstrumentation basedir="D:\workspace_ngp\ code\proje ct\testpro jects\com. ofss.fc.ju nit.origin ation\targ et\generat ed-classes \cobertura " includes="D:\workspace_ngp \code\proj ect\testpr ojects\com .ofss.fc.j unit.origi nation\tar get/test-c lasses/**/ *.class" />
[DEBUG] Basedir: D:\workspace_ngp\code\proj ect\testpr ojects\com .ofss.fc.j unit.origi nation\tar get\genera ted-classe s\cobertur a
[DEBUG] Include: D:\workspace_ngp\code\proj ect\testpr ojects\com .ofss.fc.j unit.origi nation\tar get/test-c lasses/**/ *.class
[DEBUG] Exclude: **/*~,**/#*#,**/.#*,**/%*% ,**/._*,** /CVS,**/CV S/**,**/.c vsignore,* */SCCS,**/ SCCS/**,** /vssver.sc c,**/.svn, **/.svn/** ,**/.arch- ids,**/.ar ch-ids/**, **/.DS_Sto re
[WARNING] No files to instrument.
[INFO] -------------------------- ---------- ---------- ---------- ---------- ------
[INFO] Reactor Summary:
[INFO]
[INFO] CZ NGP Artifacts .......................... ........ SUCCESS [0.951s]
[INFO] CZ Artifact: com.ofss.fc.junit.originat ion ........ SUCCESS [51.001s]
[INFO] -------------------------- ---------- ---------- ---------- ---------- ------
[INFO] BUILD SUCCESS
[INFO] -------------------------- ---------- ---------- ---------- ---------- ------
[INFO] Total time: 52.249s
[INFO] Finished at: Tue May 22 16:40:54 IST 2012
[INFO] Final Memory: 31M/290M
[INFO] -------------------------- ------
But my test classes are in" target/testclasses/com....
Code and logs are given:
plugin>
<groupId>org.codehaus.mojo
<artifactId>cobertura-mave
<version>2.3</version>
<configuration>
<instrumentation>
<includes>
<include>${project.build.d
</includes>
</instrumentation>
</configuration>
<executions>
<execution>
<id>clean</id>
<phase>pre-site</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
<execution>
<id>instrument</id>
<phase>site</phase>
<goals>
<goal>instrument</goal>
<goal>cobertura</goal>
</goals>
</execution>
</executions>
</plugin>
Logs Are:
[DEBUG] Configuring mojo org.codehaus.mojo:cobertur
[DEBUG] Configuring mojo 'org.codehaus.mojo:cobertu
[DEBUG] (f) check = org.codehaus.mojo.cobertur
[DEBUG] (f) dataFile = D:\workspace_ngp\code\proj
[DEBUG] (f) includes = [D:\workspace_ngp\code\pro
[DEBUG] (f) instrumentation = <ConfigInstrumentation basedir="D:\workspace_ngp\
[DEBUG] (f) maxmem = 1024m
[DEBUG] (f) pluginClasspathList = [org.codehaus.mojo:cobertu
[DEBUG] (f) project = MavenProject: ngp.flexcube.com.ofss.fc.c
[DEBUG] (f) quiet = false
[DEBUG] -- end configuration --
[DEBUG] Config : <ConfigInstrumentation basedir="D:\workspace_ngp\
[DEBUG] Basedir: D:\workspace_ngp\code\proj
[DEBUG] Include: D:\workspace_ngp\code\proj
[DEBUG] Exclude: **/*~,**/#*#,**/.#*,**/%*%
[WARNING] No files to instrument.
[INFO] --------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] CZ NGP Artifacts ..........................
[INFO] CZ Artifact: com.ofss.fc.junit.originat
[INFO] --------------------------
[INFO] BUILD SUCCESS
[INFO] --------------------------
[INFO] Total time: 52.249s
[INFO] Finished at: Tue May 22 16:40:54 IST 2012
[INFO] Final Memory: 31M/290M
[INFO] --------------------------
${project.basedir}/target/