I have the following ant snippet
<macrodef name="webapp.start">
<attribute name="name" />
<sequential>
<!--deploy-->
<antcall target="webapp.@{name}" />
<!--start server-->
<antcall target="tomcat-server-start" />
<!--go to URL-->
<exec executable="firefox" os="Linux" >
<arg line="-new-tab http://localhost:${tomcat.port}/@{name}" />
</exec>
</sequential>
</macrodef>
It starts the server but does not open the browser. If I put the exec task in a separate target and run it, it works fine. I am guessing that starting the server which is a process that does not end, the next one does not begin. How to do I overcome this issue? Is there a way I can start exec as a separate process.
I would spend a minute making sure this is the case. Use
pgreporpsto figure out what your processes are up to.If you confirm the server never finishes, I would have the command “tomcat-server-start” start in the background (by postfixing the shell command with &), unless it is a big deal if firefox starts before tomcat-server. Alternatively, use a
parallelblock within your sequential block, like this: