cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
teru747
Level 2

Help with "Execute ANT Script" Action

Hi,

I have built an installer using IA EE. The installer uses the "Execute ANT Script" action to create/upgrade a schema in an Oracle DB. I have a situation where the script fails to complete. I would like IA to provide more detail about the error than it does now. At this point I have to drop the schema and rerun the ANT script by hand from the command line to get the full error message provided by ANT. Is there a way to get the full error message from ANT into the IA install log?

My second question relates to a non-fatal error message in the IA build log regarding the "Execute ANT Script" action. What does the follwoing message mean and is it possible to correct or suppress the error?






Thanks
Labels (1)
0 Kudos
(4) Replies
pv7721
Level 20

Well, the error basically means that IA is not capable of catching and displaying the exception thrown by ANT. It's a pity, by the way, that the Execute ANT action hasn't been enhanced in order to store it's output in an IA variable, for instance. What you could do as a workaround is to install an IA that will use the installed JRE (if any) and instead of using the Execute ANT, you would use the Execute Command action, where you would execute the ANT command with the .xml file as a parameter (and maybe the -v or -debug parameters). This way you've got the output stored in an IA variable (which is allowed for instance with this action).
0 Kudos
teru747
Level 2

Thanks for the reply.

I was able to resolve the issue involving ANT logging during the Install phase. I enabled logging for ANT by adding the following line to the Build.xml file:



My attempts to define where the log file was written were unsuccessful so I had to add an action to move the file from $prop.user.dir$ to $USER_INSTALL_DIR$.

The second issue regarding the non-fatal errors during the IA build process (this is not related to the first issue at all) is still puzzling but not a show stopper. However I would like to eliminate all warnings and non-fatal build errors from the IA build log.

Thanks again.
0 Kudos
muradkhan
Level 3

I take it this is still not possible. I am executing an ANT script that essentially just runs GetMac.exe (windows) which responds with a mac address. I strip out the stuff I don't need with the propertyregex task and echo out just the mac address.

Wish there was a way to pick this up in IA and display it to the user.

@Vlad: I'd like to try your suggestion of using Execute command, but I'm not sure how to do it.

Our product is not Java based, so the machine on which it is to be installed may not even have the JRE. My installer needs to be completely self sufficient.

Thanks in advance for your help
0 Kudos
pv7721
Level 20

If you use ANT just to run an .exe command, you don't need this extra layer: IA has a couple of built-in action: Execute Command or Execute Batch/Script where you can use platform-related code.
0 Kudos