You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by mraible <ma...@raibledesigns.com> on 2007/09/24 18:56:48 UTC

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@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Code Coverage Plugins with Maven 2

Posted by Johann Reyes <jr...@hiberforum.org>.
Hello 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 2

Posted by tibi <ti...@dds.nl>.
the 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.




-- 
View this message in context: http://www.nabble.com/Code-Coverage-Plugins-with-Maven-2-tf4510331s177.html#a12864156
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Code Coverage Plugins with Maven 2

Posted by Martin Gilday <ma...@imap.cc>.
We 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" <ma...@raibledesigns.com>
To: users@maven.apache.org
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@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Code Coverage Plugins with Maven 2

Posted by Kenny Ha <vi...@yahoo.com>.
Hi 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!


mraible wrote:
> 
> Hmmm, 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
> 
> mraible wrote:
>> 
>> This is what I'm using. However, it reports 0% coverage. Maybe this is
>> caused by another plugin?
>> 
>> Matt
>> 
>> 
>> Iker Almandoz wrote:
>>> 
>>> Matt, 
>>> 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@raibledesigns.com] 
>>> Sent: Monday, September 24, 2007 9:57 AM
>>> To: users@maven.apache.org
>>> 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@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>> 
>>> 
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Code-Coverage-Plugins-with-Maven-2-tp12863761p23208808.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Code Coverage Plugins with Maven 2

Posted by mraible <ma...@raibledesigns.com>.
I'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


mraible wrote:
> 
> This 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
> 
> 
> mraible wrote:
>> 
>> It 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
>> 
>> 
>> mraible wrote:
>>> 
>>> Hmmm, 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
>>> 
>>> mraible wrote:
>>>> 
>>>> This is what I'm using. However, it reports 0% coverage. Maybe this is
>>>> caused by another plugin?
>>>> 
>>>> Matt
>>>> 
>>>> 
>>>> Iker Almandoz wrote:
>>>>> 
>>>>> Matt, 
>>>>> 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@raibledesigns.com] 
>>>>> Sent: Monday, September 24, 2007 9:57 AM
>>>>> To: users@maven.apache.org
>>>>> 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@maven.apache.org
>>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>> 
>>>>> 
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>> 
>>>>> 
>>>>> 
>>>> 
>>>> 
>>> 
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Code-Coverage-Plugins-with-Maven-2-tf4510331s177.html#a13926228
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Code Coverage Plugins with Maven 2

Posted by mraible <ma...@raibledesigns.com>.
This 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


mraible wrote:
> 
> It 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
> 
> 
> mraible wrote:
>> 
>> Hmmm, 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
>> 
>> mraible wrote:
>>> 
>>> This is what I'm using. However, it reports 0% coverage. Maybe this is
>>> caused by another plugin?
>>> 
>>> Matt
>>> 
>>> 
>>> Iker Almandoz wrote:
>>>> 
>>>> Matt, 
>>>> 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@raibledesigns.com] 
>>>> Sent: Monday, September 24, 2007 9:57 AM
>>>> To: users@maven.apache.org
>>>> 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@maven.apache.org
>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>> 
>>>> 
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>> 
>>>> 
>>>> 
>>> 
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Code-Coverage-Plugins-with-Maven-2-tf4510331s177.html#a12864765
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Code Coverage Plugins with Maven 2

Posted by mraible <ma...@raibledesigns.com>.
It 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


mraible wrote:
> 
> Hmmm, 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
> 
> mraible wrote:
>> 
>> This is what I'm using. However, it reports 0% coverage. Maybe this is
>> caused by another plugin?
>> 
>> Matt
>> 
>> 
>> Iker Almandoz wrote:
>>> 
>>> Matt, 
>>> 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@raibledesigns.com] 
>>> Sent: Monday, September 24, 2007 9:57 AM
>>> To: users@maven.apache.org
>>> 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@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>> 
>>> 
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Code-Coverage-Plugins-with-Maven-2-tf4510331s177.html#a12864482
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Code Coverage Plugins with Maven 2

Posted by mraible <ma...@raibledesigns.com>.
Hmmm, 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

mraible wrote:
> 
> This is what I'm using. However, it reports 0% coverage. Maybe this is
> caused by another plugin?
> 
> Matt
> 
> 
> Iker Almandoz wrote:
>> 
>> Matt, 
>> 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@raibledesigns.com] 
>> Sent: Monday, September 24, 2007 9:57 AM
>> To: users@maven.apache.org
>> 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@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Code-Coverage-Plugins-with-Maven-2-tf4510331s177.html#a12864355
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Code Coverage Plugins with Maven 2

Posted by mraible <ma...@raibledesigns.com>.
This is what I'm using. However, it reports 0% coverage. Maybe this is caused
by another plugin?

Matt


Iker Almandoz wrote:
> 
> Matt, 
> 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@raibledesigns.com] 
> Sent: Monday, September 24, 2007 9:57 AM
> To: users@maven.apache.org
> 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@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Code-Coverage-Plugins-with-Maven-2-tf4510331s177.html#a12864295
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Code Coverage Plugins with Maven 2

Posted by Iker Almandoz <ik...@gmail.com>.
Matt, 
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@raibledesigns.com] 
Sent: Monday, September 24, 2007 9:57 AM
To: users@maven.apache.org
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@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org