Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7705973
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T23:59:52+00:00 2026-05-31T23:59:52+00:00

I have integrated in Hudson a maven 3 project calling following sequence: clean tomcat:redeploy

  • 0

I have integrated in Hudson a maven 3 project calling following sequence:

clean tomcat:redeploy site sonar:sonar

Problem is that JUnit is run 3 times, here the goal sequence I obtain:

>[INFO] [clean:clean {execution: default-clean}]  
>[INFO] [gwt:i18n {execution: default}]  
>[INFO] [gwt:generateAsync {execution: default}]  
>[INFO] [resources:resources {execution: default-resources}]  
>[INFO] [compiler:compile {execution: default-compile}]  
>[INFO] [checkstyle:check {execution: mycom-check}]  
>[INFO] [checkstyle:check {execution: extended-check}]  
>[INFO] [resources:copy-resources {execution: default}]  
>[INFO] [gwt:i18n {execution: default}]  
>[INFO] [gwt:generateAsync {execution: default}]  
>[INFO] [resources:resources {execution: default-resources}]  
>[INFO] [compiler:compile {execution: default-compile}]  
>[INFO] [checkstyle:check {execution: mycom-check}]  
>[INFO] [checkstyle:check {execution: extended-check}]  
>[INFO] [resources:copy-resources {execution: default}]  
>[INFO] [resources:testResources {execution: default-testResources}]  
>[INFO] [compiler:testCompile {execution: default-testCompile}]  
>[INFO] **[surefire:test {execution: default-test}]**  
>[INFO] [gwt:compile {execution: default}]  
>[INFO] [war:war {execution: default-war}]  
>[INFO] [***tomcat:redeploy*** {execution: default-cli}]  
>[INFO] [gwt:i18n {execution: default}]  
>[INFO] [gwt:generateAsync {execution: default}]  
>[INFO] [resources:resources {execution: default-resources}]  
>[INFO] [compiler:compile {execution: default-compile}]  
>[INFO] [checkstyle:check {execution: mycom-check}]  
>[INFO] [checkstyle:check {execution: extended-check}]  
>[INFO] [resources:copy-resources {execution: default}]  
>[INFO] [cobertura:instrument {execution: default-instrument}]  
>[INFO] [cobertura:instrument {execution: default-instrument}]  
>[INFO] [resources:testResources {execution: default-testResources}]  
>[INFO] [compiler:testCompile {execution: default-testCompile}]  
>[INFO] **[surefire:test {execution: default-test}]**  
>[INFO] [cobertura:cobertura {execution: default-cli}]  
>[INFO] [resources:testResources {execution: default-testResources}]  
>[INFO] [compiler:testCompile {execution: default-testCompile}]  
>[INFO] [surefire:test {execution: default-test}]  
>[INFO] [***site:site*** {execution: default-site}]  
>[INFO]    task-segment: [sonar:sonar] (aggregator-style)  
>[INFO] [sonar:sonar {execution: default-cli}]  
>[INFO] [***sonar:sonar*** {execution: default-sonar}]  
>[INFO] [gwt:i18n {execution: default}]  
>[INFO] [gwt:generateAsync {execution: default}]  
>[INFO] [resources:resources {execution: default-resources}]  
>[INFO] [compiler:compile {execution: default-compile}]  
>[INFO] [checkstyle:check {execution: mycom-check}]  
>[INFO] [checkstyle:check {execution: extended-check}]  
>[INFO] [resources:copy-resources {execution: default}]  
>[INFO] [cobertura:instrument {execution: default-instrument}]  
>[INFO] [resources:testResources {execution: default-testResources}]  
>[INFO] [compiler:testCompile {execution: default-testCompile}]  
>[INFO] **[surefire:test {execution: default-test}]**  
>[INFO] [cobertura:cobertura {execution: default-cli}]  

This is very problematic as a bug in Hudson makes it count 3 three times:
http://issues.hudson-ci.org/browse/HUDSON-1557
However it looked fixed in Jenkins:
https://issues.jenkins-ci.org/browse/JENKINS-2068

What I am surprised of is that the “cobertura” unit test run is done twice.
I am new to maven so I am not sure to understand very well the “lifecycle steps” resolution. In ant, target resolutions were done so as to execute only once each target.
My questions are:

  • Why are these Cobertura unit tests run twice ? is a defect in my config, in Maven, in a plugin ?
  • What can I test to try to understand ?
  • In a general manner is there any Maven command available to preview the sequence that will be executed without doing the real exec ? I did not find anything about that but would find it very useful.

Thanks for your advices.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T23:59:54+00:00Added an answer on May 31, 2026 at 11:59 pm

    Why are these Cobertura unit tests run twice ? is a defect in my
    config, in Maven, in a plugin ?

    Both tomcat:redeploy and sonar:sonar are running cobertura. It is an issue with the maven configuration and can be fixed.

    What can I test to try to understand ?

    In general you can run each goal separately to see what it does.

    In a general manner is there any Maven command available to preview the sequence that will be executed without doing the real exec ? I did not find anything about that but would find it very useful.

    Usually the documentation of each goal indicates the life-cycle phases that get executed for that goal. There is no dry-run option in maven.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have integrated Cargo plugin in my maven 2 project POM.xml. During hot deployment
I have integrated a Custom Google Search on a new site I am working
In my project,I have integrated Spring Security with CAS server authentication. Now my project
I have integrated jquery jeditable in my project. $(function() { $(.editable_textarea).editable(/articles/edit/, { indicator :
I have Integrated Cocos2d to my Windows based application. When I run my Project
I have integrated Facebook into my site, but where is the best place to
I have a 2 sites integrated into one, wordpress is my second site which
We have at work a Hudson machine that acts as a build server for
I have integrated NHibernate.Search into my web app by following tutorials from the following
I have integrated facebook connect into my Xcode 4 project for an iPhone. Here

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.