|
View:
New views
11 Messages
—
Rating Filter:
Alert me
|
|
|
Code Coverage Plugins with Maven 2AFAICT, the cobertura-maven-plugin (versions 2.0 and 2.1) doesn't work and neither does the emma-maven-plugin in Mojo's sandbox. Has anyone had any luck with either of these plugins? Is there an open source code-coverage plugin that works with Maven 2? I know about Clover, but that's not open source.
Using Emma and Cobertura with Ant seem to work great. Thanks, Matt |
|
|
Re: Code Coverage Plugins with Maven 2We use cobertura with Maven no problems. When I set it up it was just a
matter of picking the previous version of the plugin, one minor number down. ----- Original message ----- From: "mraible" <matt@...> To: users@... Date: Mon, 24 Sep 2007 09:56:48 -0700 (PDT) Subject: Code Coverage Plugins with Maven 2 AFAICT, the cobertura-maven-plugin (versions 2.0 and 2.1) doesn't work and neither does the emma-maven-plugin in Mojo's sandbox. Has anyone had any luck with either of these plugins? Is there an open source code-coverage plugin that works with Maven 2? I know about Clover, but that's not open source. Using Emma and Cobertura with Ant seem to work great. Thanks, Matt -- View this message in context: http://www.nabble.com/Code-Coverage-Plugins-with-Maven-2-tf4510331s177.html#a12863761 Sent from the Maven - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
RE: Code Coverage Plugins with Maven 2Matt,
Cobertura 2.0 works ok for me... My pom.xml has: <build> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>cobertura-maven-plugin</artifactId> <version>2.0</version> </plugin> .... That sets the cobertura version to 2.0 as the latest did not seem to work... <reporting> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>cobertura-maven-plugin</artifactId> </plugin> Regards, Iker -----Original Message----- From: mraible [mailto:matt@...] Sent: Monday, September 24, 2007 9:57 AM To: users@... Subject: Code Coverage Plugins with Maven 2 AFAICT, the cobertura-maven-plugin (versions 2.0 and 2.1) doesn't work and neither does the emma-maven-plugin in Mojo's sandbox. Has anyone had any luck with either of these plugins? Is there an open source code-coverage plugin that works with Maven 2? I know about Clover, but that's not open source. Using Emma and Cobertura with Ant seem to work great. Thanks, Matt -- View this message in context: http://www.nabble.com/Code-Coverage-Plugins-with-Maven-2-tf4510331s177.html# a12863761 Sent from the Maven - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: Code Coverage Plugins with Maven 2the problem i have is:
i have a struts2 hibernate 3 and spring 2 env. setup with appfuse 2.0m5 when i run cobertura plugin 2.1 i get a coverage of 100% when i run vobertura plugin 2.0 i get the following error: -------------------------------------------------------------------------------------------------------------------- [INFO] [hibernate3:hbm2ddl {execution: default}] [INFO] Configuration XML file loaded: /home/tibi/eclipseworkspace/incipio-match/src/main/resources/hibernate.cfg.xml [INFO] Configuration XML file loaded: /home/tibi/eclipseworkspace/incipio-match/src/main/resources/hibernate.cfg.xml [INFO] ------------------------------------------------------------------------ [ERROR] FATAL ERROR [INFO] ------------------------------------------------------------------------ [INFO] Unable to load class declared as <mapping class="nl.incipio.match.model.Candidate"/> in the configuration: [INFO] ------------------------------------------------------------------------ [INFO] Trace org.hibernate.MappingException: Unable to load class declared as <mapping class="nl.incipio.match.model.Candidate"/> in the configuration: at org.hibernate.cfg.AnnotationConfiguration.parseMappingElement(AnnotationConfiguration.java:545) at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1479) -------------------------------------------------------------------------------------------------------------------- when i remove the mappings from the hibernate files cobertura will run but my test will not. |
|
|
RE: Code Coverage Plugins with Maven 2This is what I'm using. However, it reports 0% coverage. Maybe this is caused by another plugin?
Matt
|
|
|
RE: Code Coverage Plugins with Maven 2Hmmm, it looks like the aspectj-maven-plugin is causing the problem. If I remove the following from my pom.xml, everything works fine:
<plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>aspectj-maven-plugin</artifactId> <version>1.0-beta-2</version> <configuration> <source>1.5</source> <verbose>true</verbose> <complianceLevel>1.5</complianceLevel> <showWeaveInfo>true</showWeaveInfo> <aspectLibraries> <aspectLibrary> <groupId>org.springframework</groupId> <artifactId>spring-aspects</artifactId> </aspectLibrary> </aspectLibraries> </configuration> <executions> <execution> <goals> <goal>compile</goal> </goals> </execution> </executions> </plugin> Any ideas how to make the two play nicely together? Matt
|
|
|
Re: Code Coverage Plugins with Maven 2Hello Tibi
Hmmm that sounds like a bug i saw some time ago, can you try this fix found here and let me know if it works? http://jira.codehaus.org/browse/MCOBERTURA-26?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_101458 Regards Johann Reyes |
|
|
RE: Code Coverage Plugins with Maven 2It looks like this is a known issue in the aspectj-maven-plugin.
http://jira.codehaus.org/browse/MOJO-456 Looks like we're using the latest version, so I guess I need to add a new execution with a configuration to do weaveMainSourceFolder=false. Matt
|
|
|
RE: Code Coverage Plugins with Maven 2This didn't work. AFAICT, the Cobertura and AspectJ plugin can't be activated at the same time if you want Cobertura reports to work.
Matt
|
|
|
RE: Code Coverage Plugins with Maven 2I've created an issue for this in MOJO's JIRA. If this is the wrong location, please let me know.
http://jira.codehaus.org/browse/MOJO-954 Matt
|
|
|
RE: Code Coverage Plugins with Maven 2Hi mraible,
I removed the aspectj-maven-plugin from my pom.xml like u said but when I run mvn cobertura:cobertura command ,some errors occur : [....] [INFO] ------------------------------------------------------------------------ [ERROR] FATAL ERROR [INFO] ------------------------------------------------------------------------ [INFO] Unable to load class declared as <mapping class="com.mycompany.app.model. User"/> in the configuration: [INFO] ------------------------------------------------------------------------ [INFO] Trace org.hibernate.MappingException: Unable to load class declared as <mapping class= "com.mycompany.app.model.User"/> in the configuration: at org.hibernate.cfg.AnnotationConfiguration.parseMappingElement(Annotat ionConfiguration.java:602) at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.jav a:1555) at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1534) at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1508) at org.hibernate.cfg.Configuration.configure(Configuration.java:1443) at org.codehaus.mojo.hibernate3.configuration.AbstractComponentConfigura tion.doConfiguration(AbstractComponentConfiguration.java:77) at org.codehaus.mojo.hibernate3.configuration.AbstractComponentConfigura tion.getConfiguration(AbstractComponentConfiguration.java:40) at org.codehaus.mojo.hibernate3.exporter.Hbm2DDLExporterMojo.doExecute(H bm2DDLExporterMojo.java:87) at org.codehaus.mojo.hibernate3.HibernateExporterMojo.execute(HibernateE xporterMojo.java:140) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi nManager.java:483) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa ultLifecycleExecutor.java:678) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi fecycle(DefaultLifecycleExecutor.java:540) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkProjectLifecy cle(DefaultLifecycleExecutor.java:1168) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle(Def aultLifecycleExecutor.java:1009) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa ultLifecycleExecutor.java:627) [....] Whats that problem and how to fix it?? Thanks!
|
| Free embeddable forum powered by Nabble | Forum Help |