Hi Patrick,

When an error is detected and "maven.test.failure.ignore=false" the build is
stopped, thus you can't use a post goal.

What you can do is (not tested) :
maven.test.failure.ignore=true
and
<!-- generate xml for CI build report -->
<postGoal name="test:test">
     <attainGoal name="generatereport"/>
     <!-- You stop yourself the build -->
     <j:if test="${maven.test.failure}">
       <fail message="There were test failures"/>
     </j:if>
</postGoal>

if it doesn't work you can try to replace :
${maven.test.failure}
by
${context.getVariable('maven.test.failure')}

cheers

Arnaud

On 1/13/06, Patrick Villacorta <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> This is for Maven 1.0.2. I'm trying to run a plugin/goal after the junit
> tests to generate a test report. I tried creating a postGoal for this.
> However if the test goal fails, the post goal won't be run. Is there a
> way for me to run a goal or script even if the unit tests fail? I can't
> use the "ignore failures" option since this would cause continuum to
> display a build success.
>
> Thanks,
> Patrick
>
> =========================
>
>    <!-- generate xml for CI build report -->
>    <postGoal name="test:test">
>        <attainGoal name="generatereport"/>
>    </postGoal>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to