Hi Dan

Most of the reporting in Maven is done by plugins. I your case you need to add a couple of plugins to you parent pom:

<project>
  ...
  <reporting>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>cobertura-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-report-plugin</artifactId>
      </plugin>
    </plugins>
  </reporting>
  ...
</project>


You can find a list of available plugins here:
  http://maven.apache.org/plugins/index.html
and here
  http://mojo.codehaus.org/plugins.html


NORTH, Dan, GBM wrote:
Hi folks.
I have a simple build across a few modules and I want to get the following
sequence of events:
- compile sources
- instrument them with cobertura
- compile junit tests
- run junit tests against instrumented classes
- generate junit failure report if any tests fail
- generate cobertura report
- package up the non-instrumented classes for deployment
- ...
I can't see any obvious way to "weave" cobertura into the build (or junit
report for that matter), even for a single module. Using the site goal seems
to compile at least twice and run the unit tests twice. Maven2 doesn't
remember that they were already compiled. Also, I can't see how to use just
a subset of the site functionality (the reporting) inside the main build
sequence.
Am I missing something obvious here? Thanks,
Dan

***********************************************************************************
The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. Authorised and regulated by the Financial Services Authority This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer. Internet e-mails are not necessarily secure. The Royal Bank of Scotland plc does not accept responsibility for changes made to this message after it was sent. Whilst all reasonable care has been taken to avoid the transmission of viruses, it is the responsibility of the recipient to ensure that the onward transmission, opening or use of this message and any attachments will not adversely affect its systems or data. No responsibility is accepted by The Royal Bank of Scotland plc in this regard and the recipient should carry out such virus and other checks as it considers appropriate. Visit our websites at: www.rbs.com
www.rbs.com/gbm
www.rbsgc.com
***********************************************************************************


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email ______________________________________________________________________


--
Dennis Lundberg

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to