Hi all,

I'm currently migrating an Ant script to Maven.  In Ant, we have a phased
JUnit build set up:

First, run environment checks.  If those pass, run system/integration and
unit tests.  Otherwise, run only unit tests.

We're accomplishing this using a junit task which toggles a flag on tests
failure using "failureproperty":
<!-- environment checks -->
    <junit dir="${basedir}"
           printsummary="no"
           fork="true"
           forkmode="once"
           failureproperty="environmentchecks.failed"
           errorproperty="environmentchecks.failed">

Inside the second junit task, particular filesets only are tested if the
environmentchecks.failed property is absent:
      <batchtest todir="${junit.xml.dir}"
unless="environmentchecks.failed">
        <fileset refid="system.tests" />
      </batchtest>

I'd like to do the same with Maven.  I think activating a profile with
surefire plugins specifically configured for system/integration tests will
work, but I need a way to activate the profile, based on the Surefire
plugin's result.  A "failureproperty" which either toggles a property, or
activates a profile, would do the trick, but I don't see anything similar
to this in the Surefire docs.

Is there any way to accomplish this task using Surefire?

Thanks,
Matt Steele.                                                                    
                                                                                
This message and any attachments contain information from Union Pacific which 
may be confidential and/or privileged.
If you are not the intended recipient, be aware that any disclosure, copying, 
distribution or use of the contents of this message is strictly prohibited by 
law. If you receive this message in error, please contact the sender 
immediately and delete the message and any attachments.

Reply via email to