Simon
Simon

Reputation: 80899

How do I detect whether an Eclipse build failed?

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?

Upvotes: 2

Views: 913

Answers (2)

Yoni Roit
Yoni Roit

Reputation: 28696

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.

Upvotes: 1

lothar
lothar

Reputation: 20267

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.

Upvotes: 0

Related Questions