cancel
Showing results for 
Search instead for 
Did you mean: 

Ant target to open Activiti in the default browser under Win

f_lombardo
Champ in-the-making
Champ in-the-making
Hi all,

I modified the ant target to open Activiti explorer in the default browser under Windows (tested under Window 7)

  <target name="explorer.browser.open">
    <!– Sleep for 5 second to be sure tomcat coyote http-connector is ready to accept connections –>
    <sleep seconds="5"/>
    <open-html-page url="http://localhost:8080/activiti-explorer" />
  </target>
   
   <macrodef name="open-html-page">
      <attribute name="url" />
      <sequential>
       <exec executable="${macos.browser}" os="Mac OS X" failifexecutionfails="false" failonerror="false">
         <arg value="@{url}" />
       </exec>
       <exec executable="cmd" os="Windows 7, Windows Vista, Windows XP,Windows 2000,Windows 98" failifexecutionfails="false" failonerror="false">
         <arg value="/eSmiley Surprisedn /c &quot; start @{url}&quot;" />
       </exec>
         <exec executable="${linux.browser}" os="Linux" failifexecutionfails="false" failonerror="false">
         <arg value="@{url}" />
       </exec>
      </sequential>
   </macrodef>

I hope it would be useful.

Bye

Franco
1 REPLY 1

jbarrez
Star Contributor
Star Contributor
Thanks, I'll verify and apply it to the code!