Thursday, January 05, 2012

Errata to Maven2 → Maven3 migration

In the section Cobertura plugin and Maven3 of "Maven2 → Maven3 migration - real life example" article I made a mistake that resulted in reporting a bug that does not exist.


  
    package
    
      clean
      check
    
  

should be changed to:

  
    clean
    clean
    
      clean
    
  
  
    package
    package
    
      check
    
  


Both goals instrument and check must never be in the same execution because check depends on instrument and calls it itself. So, in my example goal instrument was executed twice every time and it cause a lot of problems - many of them are still magic for me e.g. compilation error saying that ...HasBeenInstrumented class cannot be identified blah, blah, blah, even though "buggy" source code was untouched and did not use this Cobertura class. Anyway MCOBERTURA-155 is a non-issue.

No comments: