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:m...@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-unsubscr...@maven.apache.org
>>> For additional commands, e-mail: users-h...@maven.apache.org
>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>>> For additional commands, e-mail: users-h...@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-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to