AnsweredAssumed Answered

Ant target to open Activiti in the default browser under Win

Question asked by f_lombardo on Oct 18, 2012
Latest reply on Oct 19, 2012 by jbarrez
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="/e:on /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

Outcomes