Datamal Blog

Wednesday, March 15, 2006

Maven 2 surefire-report-maven-plugin set-up

With Maven 2, out of the box reporting of your tests does not work! To overcome this, go to the svn repository and download the tarball. Then extract it to somewhere convienient, it contains a tar which you then have to untar again to a convenient location. Then you need to rename some files which don't seem to have the correct names. Namely in the following trees :

  • src/main/java

  • src/test/java

  • src/test/resurces

  • What seems to have happened is that the extensions are incorrect or the name isn't quite all there. So you can get the correct names of the java files by putting them in a text editor to see what the class name is. The other files in the resource dir are quite intuitive to change.


    Next you need to compile this which is as easy as mvn test. Once this is successful you need to install this to your local repository by doing mvn install.


    Now you can use this new version by putting the following in your pom.xml file





    org.codehaus.mojo
    surefire-report-maven-plugin
    2.0-beta-2-SNAPSHOT







0 Comments:

Post a Comment

<< Home