maven-surefire-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kriegelstein, Thomas" <thomas.kriegelst...@salt-solutions.de>
Subject Using apache ant inside a surefire test
Date Wed, 21 Oct 2009 10:02:01 GMT
Hi there,

 

I didn't  find a solution or even suggestion online to the following
issue I'm having. I've developed a small ant-Task and build it with
maven2. The ant task is supposed to throw a BuildException under certain
circumstances. To test the task, I've created two junit tests, which
invoke ant's Launcher during their test methods. One invocation is
expected to pass, one is expected to fail and produce the
BuildException.

 

Within the test method, I've surrounded the invocation to the Launchers
run method with try and catch, the Exception still propagates to
surrounding surefire plugin and causes the maven2 build to fail.

 

What should I do, to prevent the surefire plugin from seeing the
BuildException thrown by the ant task?

 

Greetings,

  Thomas


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message