Former-commit-id:90a54524c6
[formerlydf575b7be1
] [formerlya6d7822698
] [formerly90a54524c6
[formerlydf575b7be1
] [formerlya6d7822698
] [formerlycda8d04831
[formerlya6d7822698
[formerly 06a166ef6c963585eb65da223610a21665f9545a]]]] Former-commit-id:cda8d04831
Former-commit-id:3e68d9aaac
[formerly27d2e33769
] [formerly 3fa0f0dac5587960c496629c316aa2a1a2f464bc [formerlycc0f6832c9
]] Former-commit-id: 822576469c2608f5a2fcb3645efe10ba1e12bfce [formerly2615ad7324
] Former-commit-id:819cb0bcb7
62 lines
No EOL
2.2 KiB
XML
62 lines
No EOL
2.2 KiB
XML
<!--
|
|
Ideally, we will be able to transition the web projects to Eclipse WPT
|
|
projects and then will will no longer need to manually package and
|
|
deploy a war file.
|
|
-->
|
|
<project>
|
|
<!-- =================================================================== -->
|
|
<!-- Generic macro to build and deploy any web application. -->
|
|
<!-- =================================================================== -->
|
|
<macrodef name="deploy.war">
|
|
<attribute name="web.project.dir" />
|
|
<attribute name="war.name" />
|
|
<attribute name="webapps.dir" />
|
|
|
|
<sequential>
|
|
<!-- find the web "project" -->
|
|
<var name="project.dir" value="" />
|
|
<for list="${basedirectories}" param="directory"
|
|
delimiter=";" trim="true">
|
|
<sequential>
|
|
<if>
|
|
<available file="@{directory}/@{web.project.dir}"
|
|
type="dir" />
|
|
<then>
|
|
<var name="project.dir"
|
|
value="@{directory}/@{web.project.dir}" />
|
|
</then>
|
|
</if>
|
|
</sequential>
|
|
</for>
|
|
|
|
<if>
|
|
<equals arg1="${project.dir}" arg2="" />
|
|
<then>
|
|
<fail message="Failed to find web project: @{web.project.dir}" />
|
|
</then>
|
|
</if>
|
|
|
|
<var name="war.file" value="@{war.name}.war" />
|
|
|
|
<!-- delete old war file -->
|
|
<delete dir="@{webapps.dir}/@{war.name}" />
|
|
<delete file="@{webapps.dir}/${war.file}" />
|
|
<mkdir dir="@{webapps.dir}" />
|
|
|
|
<!-- build and deploy new war -->
|
|
<echo message="Building and deploying war file" />
|
|
<war destfile="@{webapps.dir}/${war.file}"
|
|
webxml="${project.dir}/web/WEB-INF/web.xml">
|
|
<fileset dir="${project.dir}/web"
|
|
excludes="**/WEB-INF/" />
|
|
<classes dir="${project.dir}/web/WEB-INF/classes" />
|
|
<!-- general -->
|
|
<webinf file="${project.dir}/web/WEB-INF/dwr.xml" />
|
|
</war>
|
|
|
|
<unzip src="@{webapps.dir}/${war.file}"
|
|
dest="@{webapps.dir}/@{war.name}" />
|
|
<delete file="@{webapps.dir}/${war.file}" />
|
|
</sequential>
|
|
</macrodef>
|
|
</project> |