java - emma code coverage on jenkins is not creating reports -
i trying generate code coverage reports using emma on jenkins, failing
builds successful. emma reports failing.
here pom.xml
<project xmlns="http://maven.apache.org/pom/4.0.0" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://maven.apache.org/pom/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelversion>4.0.0</modelversion> <groupid>thinclientmanager</groupid> <artifactid>thinclientmanager</artifactid> <version>0.0.1-snapshot</version> <name>thinclientmanager</name> <properties> <project.build.sourceencoding>utf-8</project.build.sourceencoding> <included.packages>-dincluded.packages=hob.tcm</included.packages> <included.adapters>-dincluded.adapters=coverage,complexity,dependency</included.adapters> </properties> <build> <sourcedirectory>src</sourcedirectory> <resources> <resource> <directory>src</directory> <excludes> <exclude>**/*.java</exclude> </excludes> </resource> </resources> <pluginmanagement> <plugins> <plugin> <artifactid>maven-compiler-plugin</artifactid> <version>3.1</version> <configuration> <source /> <target /> </configuration> </plugin> <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-surefire-plugin</artifactid> <inherited>true</inherited> <configuration> <forkmode>once</forkmode> <argline>-javaagent:serenity/serenity.jar -xms512m -xmx1024m ${included.packages} ${included.adapters}</argline> </configuration> </plugin> </plugins> </pluginmanagement> </build> <reporting> <plugins> <plugin> <groupid>org.codehaus.mojo</groupid> <artifactid>emma-maven-plugin</artifactid> <version>1.0-alpha-3</version> <inherited>true</inherited> </plugin> <plugin> <groupid>org.codehaus.mojo</groupid> <artifactid>surefire-report-maven-plugin</artifactid> <inherited>true</inherited> </plugin> </plugins> </reporting> <repositories> <!--other repositories if --> <repository> <id>project.local</id> <name>project</name> <url>file:${project.basedir}/repo</url> </repository> </repositories> <dependencies> <dependency> <groupid>junit</groupid> <artifactid>junit</artifactid> <version>4.4</version> <scope>test</scope> </dependency> <dependency> <groupid>com.example</groupid> <artifactid>ant</artifactid> <version>1.0</version> </dependency> <dependency> <groupid>com.example</groupid> <artifactid>eaadmin</artifactid> <version>1.0</version> </dependency> <dependency> <groupid>com.example</groupid> <artifactid>hlset</artifactid> <version>1.0</version> </dependency> <dependency> <groupid>com.example</groupid> <artifactid>hlsetutil</artifactid> <version>1.0</version> </dependency> <dependency> <groupid>com.example</groupid> <artifactid>tool</artifactid> <version>1.0</version> </dependency> <dependency> <groupid>com.example</groupid> <artifactid>xstream</artifactid> <version>1.0</version> </dependency> </dependencies> </project>
here output
[info] scanning projects... [info] searching repository plugin prefix: 'emma'. [info] ------------------------------------------------------------------------ [info] building thinclientmanager [info] task-segment: [emma:emma] [info] ------------------------------------------------------------------------ [info] preparing emma:emma [info] [resources:resources {execution: default-resources}] [info] using 'utf-8' encoding copy filtered resources. [info] copying 15 resources [info] [compiler:compile {execution: default-compile}] [info] nothing compile - classes date [info] [emma:instrument {execution: default-instrument}] [info] instrumenting classes emma processing instrumentation path ... error: not find local repository 2.2.1 [info] ------------------------------------------------------------------------ [error] fatal error [info] ------------------------------------------------------------------------ [info] com.vladium.emma.emmaruntimeexception /usr/share/tomcat6/.jenkins/jobs/workplace job system (maven)/workspace/target/generated-classes/emma/classes/hob/props/.svn/prop-base/log.properties.svn-base (permission denied) [info] ------------------------------------------------------------------------ [info] trace com.vladium.emma.emmaruntimeexception: com.vladium.emma.emmaruntimeexception @ com.vladium.emma.instr.instrprocessorst.handlefile(instrprocessorst.java:567) @ com.vladium.util.ipathenumerator$factory$pathenumerator.enumeratepathdir(ipathenumerator.java:193) @ com.vladium.util.ipathenumerator$factory$pathenumerator.enumeratepathdir(ipathenumerator.java:177) @ com.vladium.util.ipathenumerator$factory$pathenumerator.enumeratepathdir(ipathenumerator.java:177) @ com.vladium.util.ipathenumerator$factory$pathenumerator.enumeratepathdir(ipathenumerator.java:177) @ com.vladium.util.ipathenumerator$factory$pathenumerator.enumeratepathdir(ipathenumerator.java:177) @ com.vladium.util.ipathenumerator$factory$pathenumerator.enumeratepathdir(ipathenumerator.java:177) @ com.vladium.util.ipathenumerator$factory$pathenumerator.enumerate(ipathenumerator.java:97) @ com.vladium.emma.instr.instrprocessorst._run(instrprocessorst.java:715) @ com.vladium.emma.processor.run(processor.java:88) @ org.codehaus.mojo.emma.task.instrumenttask.execute(instrumenttask.java:106) @ org.codehaus.mojo.emma.emmainstrumentmojo.doexecute(emmainstrumentmojo.java:158) @ org.codehaus.mojo.emma.abstractemmamojo.execute(abstractemmamojo.java:98) @ org.apache.maven.plugin.defaultpluginmanager.executemojo(defaultpluginmanager.java:490) @ hudson.maven.agent.pluginmanagerinterceptor.executemojo(pluginmanagerinterceptor.java:182) @ org.apache.maven.lifecycle.defaultlifecycleexecutor.executegoals(defaultlifecycleexecutor.java:694) @ org.apache.maven.lifecycle.defaultlifecycleexecutor.executegoalwithlifecycle(defaultlifecycleexecutor.java:556) @ org.apache.maven.lifecycle.defaultlifecycleexecutor.forkprojectlifecycle(defaultlifecycleexecutor.java:1205) @ org.apache.maven.lifecycle.defaultlifecycleexecutor.forklifecycle(defaultlifecycleexecutor.java:1038) @ org.apache.maven.lifecycle.defaultlifecycleexecutor.executegoals(defaultlifecycleexecutor.java:643) @ org.apache.maven.lifecycle.defaultlifecycleexecutor.executestandalonegoal(defaultlifecycleexecutor.java:569) @ org.apache.maven.lifecycle.defaultlifecycleexecutor.executegoal(defaultlifecycleexecutor.java:539) @ org.apache.maven.lifecycle.defaultlifecycleexecutor.executegoalandhandlefailures(defaultlifecycleexecutor.java:387) @ org.apache.maven.lifecycle.defaultlifecycleexecutor.executetasksegments(defaultlifecycleexecutor.java:348) @ org.apache.maven.lifecycle.defaultlifecycleexecutor.execute(defaultlifecycleexecutor.java:180) @ org.apache.maven.lifecycle.lifecycleexecutorinterceptor.execute(lifecycleexecutorinterceptor.java:65) @ org.apache.maven.defaultmaven.doexecute(defaultmaven.java:328) @ org.apache.maven.defaultmaven.execute(defaultmaven.java:138) @ org.apache.maven.cli.mavencli.main(mavencli.java:362) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:57) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:622) @ org.codehaus.classworlds.launcher.launchenhanced(launcher.java:315) @ org.codehaus.classworlds.launcher.launch(launcher.java:255) @ hudson.maven.agent.main.launch(main.java:205) @ hudson.maven.mavenbuilder.call(mavenbuilder.java:154) @ hudson.maven.maven2builder.call(maven2builder.java:79) @ hudson.maven.maven2builder.call(maven2builder.java:55) @ hudson.remoting.userrequest.perform(userrequest.java:118) @ hudson.remoting.userrequest.perform(userrequest.java:48) @ hudson.remoting.request$2.run(request.java:328) @ hudson.remoting.interceptingexecutorservice$1.call(interceptingexecutorservice.java:72) @ java.util.concurrent.futuretask$sync.innerrun(futuretask.java:334) @ java.util.concurrent.futuretask.run(futuretask.java:166) @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1146) @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:615) @ java.lang.thread.run(thread.java:701) caused by: java.io.filenotfoundexception: /usr/share/tomcat6/.jenkins/jobs/workplace job system (maven)/workspace/target/generated-classes/emma/classes/hob/props/.svn/prop-base/log.properties.svn-base (permission denied) @ java.io.randomaccessfile.open(native method) @ java.io.randomaccessfile.<init>(randomaccessfile.java:236) @ com.vladium.emma.instr.instrprocessorst.writefile(instrprocessorst.java:815) @ com.vladium.emma.instr.instrprocessorst$filewritejob.run(instrprocessorst.java:882) @ com.vladium.emma.instr.instrprocessorst.drainjobqueue(instrprocessorst.java:943) @ com.vladium.emma.instr.instrprocessorst.addjob(instrprocessorst.java:929) @ com.vladium.emma.instr.instrprocessorst.handlefile(instrprocessorst.java:562) ... 47 more [info] ------------------------------------------------------------------------ [info] total time: 7 seconds [info] finished at: mon apr 14 13:45:41 cest 2014 [info] final memory: 21m/50m [info] ------------------------------------------------------------------------ [jenkins] archiving /usr/share/tomcat6/.jenkins/jobs/workplace job system (maven)/workspace/pom.xml thinclientmanager/thinclientmanager/0.0.1-snapshot/thinclientmanager-0.0.1-snapshot.pom channel stopped skipping emma coverage report mojo did not run. finished: failure
my jenkins configuration follows:
build
root pom - pom.xml
goals , options - emma:emma
and have added "record emma coverage report" post-build action, still empty. did not add archive artifacts post-build action.
i think have multiple problems here. i'll start saying should not use serenity code coverage , emma @ same time, enhancing byte code twice never idea. note wrote serenity code coverage jenkins plugin.
from exception looks started tomcat user root, user, , jenkins can't access directories wants to. best chown entire directory $tomcat_install , ~/.jenkins user want use. give shot.
cheers, michael
Comments
Post a Comment