I have a build.xml file with the following line at the end:
<ant dir="${basedir}/subfolder" target="mytarget" />
Then in the subfolder, I have another build.xml file with the following:
<target name="mytarget">
<exec executable="open">
<arg value="${basedir}/myApp.app" />
</exec>
</target>
The myApp.app
application is designed to be executed visibly on the screen, and not in the background. It is an app designed in Automator and it has mouse movement and clicking incorporated. I set up Jenkins to build this task on a slave, and when the task is built I want Jenkins to call the ant script which will launch this application, and then I want the application to actually cause the mouse to move around on the Jenkins slave. Right now Jenkins reports a successful build, but nothing seems to be happening.
UPDATE
When I run the exec with failonerror="true"
, no error prints to the Jenkins log. Jenkins just says mytarget: as though it is about to start printing the log info for that target, and then nothing happens and the build completes successfully, with nothing happening on the slave (the app is not launched).
UPDATE 2
I just had an interesting find. I replaced the line ${basedir}/myApp.app
with /Applications/Dictionary.app
, and when I ran that with Jenkins it opened up the dictionary for a tiny second and then closed it immediately. Could that be happening with my application too without anything showing up? My script has a delay in the beginning, so could it be closing during that period?