Re: AW: About unittest run three times

2009-06-01 Thread Kenny Ha

Can anyone tell me how to prevent unittest run three times when using mvn
site command??
Thanks all.


struberg wrote:
> 
> 
> Old story, and as far as I remember (please correct me if I'm wrong) the
> reason is:
> 
> The site lifecycle and the default build lifecycle are isolated things.
> So if you run mvn install, the 'test' phase will be invoked -> 1st run
> 
> Your site has a test reporting section? -> 2nd run
> 
> I assume you have cobertura or another code coverage tool enabled?
> Because this runs all the tests in an instrumended form -> 3nd run
> 
> I'm not saying this situation is optimal though ;) This especially sucks
> while running releases, because prepare and perform will do all those
> steps a few times...
> 
> LieGrue,
> strub
> 
> 
> --- forum geng  schrieb am Mi, 20.5.2009:
> 
>> Von: forum geng 
>> Betreff: About unittest run three times
>> An: users@maven.apache.org
>> Datum: Mittwoch, 20. Mai 2009, 8:30
>> Dear all,
>> 
>>            While I set
>> the nightly build command for continum by "clean
>> install site-deploy", my unit tests all run for three
>> times.
>>            And while I
>> changed to "clean install", the unit tests run for
>> one time, and changed to "clean site-deploy", my unit tests
>> run for two
>> times.
>> 
>>           Are there any to explain
>> the behind mechanism?
>>           And my requirement is
>> that to let all the unit tests run for only
>> time, and I can also find the info from the deployed site,
>> such as with
>> PMD/FindBug related report.
>> 
>> Thanks.
>> 
>> Forest.
>> 
> 
> 
> 
> 
> -
> 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/AW%3A-About-unittest-run-three-times-tp23632984p23810914.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



Surefire report

2009-05-05 Thread Kenny Ha

Hi all,

I want to build a surefire report test unit and performance, so I config
surefire plugin like this :

[...]

  

  org.apache.maven.plugins
  maven-surefire-report-plugin
  

  unit
  

  ${project.build.directory}/surefire-reports/unit

surefire-report-unit
  
  
report
  


  perf
  

  ${project.build.directory}/surefire-reports/perf

surefire-report-perf
  
  
report
  

  

  

[...]

Then I run mvn site command :


[INFO] Generating "Surefire Report" report.
[INFO] Generating "Surefire Report" report.
[INFO]

[INFO] BUILD SUCCESSFUL
[INFO]

[INFO] Total time: 15 minutes 45 seconds
[INFO] Finished at: Tue May 05 11:57:25 ICT 2009
[INFO] Final Memory: 66M/127M
[INFO]


Message below said that mvn site generate 2 links for Surefire Report.Whats
this problem??
And when I click both of links ,the result displays :

Surefire Report
Summary

Tests Errors Failures Skipped Success Rate Time
0 0 0 0 0% 0

Note: failures are anticipated and checked for with assertions while errors
are unanticipated.

Thats all I see.No "Package List", no "Test Cases",...Whats wrong??

Thanks and Regards!
-- 
View this message in context: 
http://www.nabble.com/Surefire-report-tp23398521p23398521.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



RE: Code Coverage Plugins with Maven 2

2009-04-23 Thread Kenny Ha

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  in the configuration:
[INFO]

[INFO] Trace
org.hibernate.MappingException: Unable to load class declared as  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:
> 
> 
> org.codehaus.mojo
> aspectj-maven-plugin
> 1.0-beta-2
> 
> 1.5
> true
> 1.5
> true
> 
> 
> org.springframework
> spring-aspects
> 
> 
> 
> 
> 
> 
> compile
> 
> 
> 
> 
> 
> 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:
>>> 
>>>   
>>>
>>> 
>>> org.codehaus.mojo
>>> cobertura-maven-plugin
>>> 2.0
>>> 
>>> 
>>> 
>>> That sets the cobertura version to 2.0 as the latest did not seem to
>>> work...
>>> 
>>>   
>>>   
>>> 
>>>
>>>org.codehaus.mojo
>>>cobertura-maven-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...@ma