Wim, you can either configure Surefire to not use the text files with
this configuration (below) or use -Dsurefire.useFile=false to get
Surefire to write output to the screen rather than to those text
files:
<build>
  <plugins>
    <plugin>
      <artifactId>maven-surefire-plugin</artifactId>
      <configuration>
        <useFile>false</useFile>
      </configuration>
    </plugin>

As for the "a way to distinguish between builds" etc issue, you should
probably resolve that issue through proper use of Profiles and
Properties. So you would use:
<testFailureIgnore>${your-property-here}</testFailureIgnore>
and perhaps
<useFile>${same-or-different-property-here}</useFile>

And then either pass -Dyour-property-here=true/false or more ideally
set the property in a profile. So when you are building to deploy the
site, you use the -P site profile which specifies TRUE, and otherwise
the default profile specifies FALSE for this property.

Wayne

On 5/28/06, Wim Deblauwe <[EMAIL PROTECTED]> wrote:
hmmm.. okay, I'll try to find out. But this seems like a very reasonable
question. Who wants to go through all the .txt files surefire generates to
find out what test has failed?

regards,

Wim

2006/5/27, Andreas Guther <[EMAIL PROTECTED]>:
>
> In
> <build>
>   <plugins>
>      <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-surefire-plugin</artifactId>
>         <version>2.2</version>
>         <configuration>
>           <testFailureIgnore>true</testFailureIgnore>
>         </configuration>
>      </plugin>
> ...
>
> I think there is a way to distinguish between builds where you want to
> not ignore and site generation when you want to ignore in order to
> generate the site.  I am currently not using it but if you come across
> the solution it would be great if you could share it here.
>
> Andreas
>
>
>
> -----Original Message-----
> From: Wim Deblauwe [mailto:[EMAIL PROTECTED]
> Sent: Saturday, May 27, 2006 11:20 AM
> To: Maven Users List
> Subject: [m2] Surefire report when tests fail
>
> Hi,
>
> when I run mvn site, the surefire report is not generated when my unit
> tests
> fail. How can I get the report?
>
> I added the surefire-report-maven-plugin to the reporting section of my
> pom.
>
> regards,
>
> Wim
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



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

Reply via email to