I am trying to open a new terminal window in mac and execute a node command via ant
<exec osfamily="unix" dir="${dir}" executable="open" failonerror="true">
<env key="MONGODB_HOST" value="${mongo.host}"/>
<env key="MONGODB_DATABASE" value="${mongo.dbname}"/>
<arg line="-a Terminal ."/>
</exec>
<exec osfamily="unix" dir="${dir}" executable="node" failonerror="true">
<arg line="${app.file.name}.js "/>
</exec>
However the second exec executes within the old terminal window and not the new one that is opened by the first exec
Can anyone please guide me as to how I can execute the second exec within the context of the new terminal window
I am trying to emulate the basic functionality of
opening a new terminal window
setting environment variables
and executing node server.js
via the ant command on a mac