blob: 0c4ca146d9fefaaad7505ffbbbfe3ed96fafee48 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<project name="org.eclipse.wst.ws.explorer" default="build.wars" basedir=".">
<!--
This script builds wsexplorer.war within the PDE.
Instructions for use:
1. If you have a prior build of wsexplorer.war in your workspace,
you should first:
a. Replace wsexplorer/WEB-INF/web.xml from HEAD
b. Delete wsexplorer/WEB-INF/lib/wsexplorer.jar
c. Delete wsexplorer.war
d. Delete wsexplorer/**/*.java
e. Delete wsexplorer/**/*.class
f. Refresh the project.
TODO: Update this script's "clean" rules to do this stuff automagically.
2. Generate and run build.xml to create
wsexplorer/WEB-INF/lib/wsexplorer.jar:
a. plugin.xml -> PDE Tools -> Create Ant Build File
b. build.xml -> Run As -> Ant Build
c. Refresh the project.
3. Run build-war-pde.xml to create the WAR:
a. build-war-pde.xml -> Run As -> Ant Build...
to open the "Modify attributes and launch" dialog.
b. Click on the "Properties" tab.
c. Deselect "Use global properties...".
d. Add the following two properties:
baseLocation = the absolute path to your target platform's "eclipse" directory.
buildDirectory = the absolute path to your workspace directory.
e. Click on "Run" to run the script.
f. Refresh the project when the build is done.
-->
<property name="wsexplorerDir" value="${buildDirectory}/org.eclipse.wst.ws.explorer/wsexplorer"/>
<target name="jspcompile" unless="wsexplorer.war" description="Pre-compile the JSPs in the org.eclipse.wst.ws.explorer plugin">
<java classname="org.apache.jasper.JspC" fork="true">
<arg line="-webxml ${wsexplorerDir}/WEB-INF/web.xml -d ${wsexplorerDir} -webapp ${wsexplorerDir}"/>
<classpath>
<fileset dir="${baseLocation}/plugins">
<include name="org.eclipse.tomcat*/*.jar" />
</fileset>
<fileset dir="${baseLocation}/plugins">
<include name="org.apache.ant*/lib/*.jar" />
</fileset>
</classpath>
</java>
<javac destdir="${wsexplorerDir}/WEB-INF/classes" includeAntRuntime="false">
<src path="${wsexplorerDir}"/>
<classpath>
<dirset dir="${buildDirectory}">
<include name="*/@dot" />
</dirset>
<fileset dir="${buildDirectory}">
<include name="**/*.jar" />
</fileset>
<fileset dir="${baseLocation}/plugins">
<include name="**/*.jar" />
</fileset>
</classpath>
</javac>
</target>
<target name="wsexplorer.war" unless="wsexplorer.war" description="Create war: wsexplorer.war.">
<zip
basedir="${wsexplorerDir}"
destfile="${wsexplorerDir}/../wsexplorer.war"
whenempty="skip" update="false"
excludes="**/*.java **/*.jsp **/*.inc"
/>
</target>
<target name="build.wars" description="Build all the wars for the plug-in: org.eclipse.wst.ws.explorer.">
<available property="wsexplorer.war" file="${wsexplorerDir}/../wsexplorer.war"/>
<antcall target="jspcompile"/>
<antcall target="wsexplorer.war"/>
</target>
<target name="clean.wars" description="Clean all the wars for the plug-in: org.eclipse.wst.ws.explorer.">
<delete file="wsexplorer.war"/>
</target>
</project>