| <?xml version="1.0" encoding="UTF-8"?> |
| <project name="org.eclipse.wst.ws.explorer" default="build.wars" basedir="."> |
| |
| <!-- |
| This script cleans and builds wsexplorer.war within the PDE. |
| Use "build.xml" to build explorer.jar and wsexplorer.jar. |
| |
| Initial configuration: |
| |
| 1. Choose build-war-pde.xml -> Run As -> Ant Build... |
| to open the "Modify attributes and launch" dialog. |
| 2. Click on the "Refresh" tab. |
| a. Enable "Refresh resources upon completion". |
| b. Select "The project containing the selected resource". |
| 3. Click on the "Properties" tab. |
| a. Deselect "Use global properties...". |
| b. Add the following two properties: |
| baseLocation = the absolute path to your target platform's "eclipse" directory. |
| buildDirectory = the absolute path to your workspace directory. |
| 4. Click on "Apply". |
| |
| To clean a previous build of the WAR: |
| |
| 1. Choose build-war-pde.xml -> Run As -> Ant Build... |
| 2. Select and run the "clean.wars" target. |
| 3. Optionally, replace wsexplorer/WEB-INF/web.xml from HEAD. |
| |
| To build the WAR: |
| |
| 1. If necessary, generate and run build.xml |
| to create explorer.jar and wsexplorer.jar: |
| a. Choose plugin.xml -> PDE Tools -> Create Ant Build File |
| b. Choose build.xml -> Run As -> Ant Build |
| c. Refresh the project. |
| 1. Choose build-war-pde.xml -> Run As -> Ant Build... |
| 2. Select and run the "build.wars" target. |
| |
| Short cut: |
| |
| 1. Choose build-war-pde.xml -> Run As -> Ant Build... |
| 2. Click on the "Targets" tab. |
| 3. Enable the "clean.wars" and "build.wars" targets. |
| 4. Verify that the Target execution order reads |
| "clean.wars, build.wars" |
| If it doesn't, use the "Order..." button to change it. |
| 5. Click "Apply" or "Run". |
| 6. Henceforth you can choose |
| build-war-pde.xml -> Run As -> Ant Build |
| to skip the dialog and always clean and rebuild the WAR. |
| --> |
| |
| <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"/> |
| <delete> |
| <fileset dir="wsexplorer" includes="**/*.java"/> |
| </delete> |
| <delete> |
| <fileset dir="wsexplorer" includes="**/*.class"/> |
| </delete> |
| </target> |
| |
| </project> |