2

Following on from this question, I now want to know how to stop an ANT script from executing if the preceding build failed. I can't see a way in the Build setup in Eclipse of chaining builds together based on their success.

I think I am lookikng for either a way to pass the previous build status into my ANT script so I can terminate or to never call the ANT script at all if the first build fails.

Any ideas?

Community
  • 1
  • 1
Simon
  • 78,655
  • 25
  • 88
  • 118

2 Answers2

1

No native way, AFAIK. What you can do is modify your ant script to check if .class files produced by Eclipse are newer than WAR. If not, stop.

Yoni Roit
  • 28,280
  • 7
  • 36
  • 32
0

You should be able to store the success into a file. If you make sure the content of the file is a property file content the next ant task can use that file to fill in a property (like build.success) and can act on that.

lothar
  • 19,853
  • 5
  • 45
  • 59