AnsweredAssumed Answered

TIP: Refresh webscripts and share pages on deploy

Question asked by loftux Moderator on Aug 11, 2010
This is how you can make an automatic refresh using wget of your webscripts when deploying using ant. Saves some time when you do not need to manually refresh for every change
Put this target in your Share build.xml. Change 'depends' to what you have as target for deploying (which you should do before you refresh…)

<target name="deployrefresh" depends="deploy">
   <exec executable="wget">
      <arg value="–delete-after" />
      <arg value="–http-user=admin" />
      <arg value="–http-password=admin" />
      <arg value="–header=Accept-Charset: iso-8859-1,utf-8" />
      <arg value="–header=Accept-Language: en-us" />
      <arg value="–post-data" />
      <arg value="reset=on" />
      <arg value="http://localhost:8080/share/page/index'/>
   </exec>
</target>
For Alfresco webscripts you can use
<target name="deployrefresh" depends="deploy">
   <exec executable="wget">
      <arg value="–delete-after" />
      <arg value="–http-user=admin" />
      <arg value="–http-password=admin" />
      <arg value="–header=Accept-Charset: iso-8859-1,utf-8" />
      <arg value="–header=Accept-Language: en-us" />
      <arg value="–post-data" />
      <arg value="reset=on" />
      <arg value="http://localhost:8080/alfresco/service/index'/>
   </exec>
</target>
Thanks to Jan Pfitzner and Mike Hatfield for pointing to headers needed for this to work on 3.3.

Outcomes