Does the happy problem resolution boogie....
Last week I posted frustrations with learning the Ant API to solve a project puzzle.
Got it working.
I used the org.apache.tools.ant.Project class, which loaded and parsed a file. Via the news groups, I found that I had to use a deprecated method, because apparently there may be a bug in the currently recommended method, and it was not parsing my build file correctly.
Anyway - wrapping a try/catch block around the project.executeTarget(String targetName) method, I was able to get my simple boolean.
Error and System output were redirected to files so that nothing reports to the screen.
We will have a service check the logs to determine whether or not an error happened with the previously run process, so real time notification of errors was not only not important, was definitely not wanted.
The nice thing is that I can eventually build a listener/logger class that will write my error files exactly the way we want them, which will make error reporting/viewing significantly easier.
Got it working.
I used the org.apache.tools.ant.Project class, which loaded and parsed a file. Via the news groups, I found that I had to use a deprecated method, because apparently there may be a bug in the currently recommended method, and it was not parsing my build file correctly.
Anyway - wrapping a try/catch block around the project.executeTarget(String targetName) method, I was able to get my simple boolean.
Error and System output were redirected to files so that nothing reports to the screen.
We will have a service check the logs to determine whether or not an error happened with the previously run process, so real time notification of errors was not only not important, was definitely not wanted.
The nice thing is that I can eventually build a listener/logger class that will write my error files exactly the way we want them, which will make error reporting/viewing significantly easier.
