Former-commit-id:ffe3641057
[formerly0e86bfd1d3
] [formerly618aa3f316
] [formerlyffe3641057
[formerly0e86bfd1d3
] [formerly618aa3f316
] [formerlyfeec28f274
[formerly618aa3f316
[formerly 765055b5332ddace3cec2d07e279652de869cfe4]]]] Former-commit-id:feec28f274
Former-commit-id:9c67bbab77
[formerlyf5e63d5f93
] [formerly 5951ea0cd95d43633ba501132c7b65a55db27e09 [formerly8843ffd022
]] Former-commit-id: d6911f5473d9aadbb4a4b9d3389106feb8c83693 [formerlya544be6d83
] Former-commit-id:2f855322f6
64 lines
No EOL
2.3 KiB
XML
64 lines
No EOL
2.3 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" />
|
|
|
|
<sequential>
|
|
<property name="webapps.dir"
|
|
value="${edex.root.directory}/webapps" />
|
|
|
|
<!-- 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> |