blob: 375f4df2d2ada7fbe7ddce836b1bac223691715c [file]
<?xml version="1.0" encoding="UTF-8"?>
<project name="org.eclipse.help.webapp" default="build.jars" basedir=".">
<property name="bootclasspath" value=""/>
<property name="ws" value="win32"/>
<property name="os" value="win32"/>
<property name="arch" value="x86"/>
<target name="init" depends="properties">
<property name="plugin" value="org.eclipse.help.webapp"/>
<property name="version.suffix" value="_2.0.1"/>
<!-- custom change begin -->
<!--
<property name="full.name" value="${plugin}${version.suffix}"/>
-->
<property name="full.name" value="infocenter"/>
<!-- custom end -->
<property name="temp.folder" value="${basedir}/temp.folder"/>
<property name="plugin.destination" value="${basedir}"/>
<property name="build.result.folder" value="${basedir}"/>
</target>
<target name="properties" if="eclipse.running">
<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
</target>
<target name="build.update.jar" depends="init">
<delete dir="${temp.folder}"/>
<mkdir dir="${temp.folder}"/>
<antcall target="build.jars"/>
<antcall target="gather.bin.parts">
<param name="destination.temp.folder" value="${temp.folder}/"/>
</antcall>
<zip zipfile="${plugin.destination}/${full.name}.jar" basedir="${temp.folder}/${full.name}" filesonly="false"/>
<delete dir="${temp.folder}"/>
</target>
<target name="gather.bin.parts" depends="init" if="destination.temp.folder">
<mkdir dir="${destination.temp.folder}/${full.name}"/>
<mkdir dir="${destination.temp.folder}/${full.name}/WEB-INF/lib"/>
<copy file="${build.result.folder}/WEB-INF/lib/webapp.jar" todir="${destination.temp.folder}/${full.name}/WEB-INF/lib"/>
<copy todir="${destination.temp.folder}/${full.name}">
<fileset dir="${basedir}" includes="images/,ns4/,WEB-INF/,*.css,*.html,*.js,*.jsp,webapp.properties" excludes="about.html,WEB-INF/classes/"/>
</copy>
<!-- custom addition begin -->
<copy file="${basedir}/infocenter/about.html" todir="${destination.temp.folder}/${full.name}" overwrite="true"/>
<copy file="${basedir}/infocenter/cpl-v10.html" todir="${destination.temp.folder}/${full.name}" overwrite="true"/>
<copy file="${basedir}/infocenter/notice.html" todir="${destination.temp.folder}/${full.name}" overwrite="true"/>
<copy file="${basedir}/infocenter/web.xml" todir="${destination.temp.folder}/${full.name}/WEB-INF" overwrite="true"/>
<copy file="${basedir}/../org.apache.xerces/xmlParserAPIs.jar" todir="${destination.temp.folder}/${full.name}/WEB-INF/lib"/>
<copy file="${basedir}/../org.apache.xerces/xercesImpl.jar" todir="${destination.temp.folder}/${full.name}/WEB-INF/lib"/>
<!-- custom end -->
</target>
<target name="WEB-INF/lib/webapp.jar" depends="init" unless="WEB-INF/lib/webapp.jar">
<property name="destdir" value="${temp.folder}/WEB-INF/lib/webapp.jar.bin"/>
<delete dir="${temp.folder}/WEB-INF/lib/webapp.jar.bin"/>
<mkdir dir="${temp.folder}/WEB-INF/lib/webapp.jar.bin"/>
<!-- compile the source code -->
<javac destdir="${temp.folder}/WEB-INF/lib/webapp.jar.bin" failonerror="false" verbose="true" debug="on" includeAntRuntime="no" bootclasspath="${bootclasspath}" classpath="../org.eclipse.core.runtime/runtime.jar;../org.eclipse.help/help.jar;../org.apache.xerces/xercesImpl.jar;../org.eclipse.help/bin;../org.apache.xerces/bin;../org.eclipse.core.runtime/bin;../org.eclipse.core.boot/boot.jar;../org.eclipse.tomcat/servlet.jar;../org.apache.xerces/xmlParserAPIs.jar;../org.eclipse.core.boot/bin">
<src path="src/"/>
</javac>
<!-- copy necessary resources -->
<copy todir="${temp.folder}/WEB-INF/lib/webapp.jar.bin">
<fileset dir="src/" excludes="**/*.java"/>
</copy>
<mkdir dir="${build.result.folder}/WEB-INF/lib"/>
<jar jarfile="${build.result.folder}/WEB-INF/lib/webapp.jar" basedir="${temp.folder}/WEB-INF/lib/webapp.jar.bin"/>
<delete dir="${temp.folder}/WEB-INF/lib/webapp.jar.bin"/>
</target>
<target name="WEB-INF/lib/webappsrc.zip" depends="init" unless="WEB-INF/lib/webappsrc.zip">
<mkdir dir="${build.result.folder}/WEB-INF/lib"/>
<zip zipfile="${build.result.folder}/WEB-INF/lib/webappsrc.zip" filesonly="false">
<fileset dir="src/" includes="**/*.java"/>
</zip>
</target>
<target name="build.jars" depends="init">
<available property="WEB-INF/lib/webapp.jar" file="${build.result.folder}/WEB-INF/lib/webapp.jar"/>
<antcall target="WEB-INF/lib/webapp.jar"/>
</target>
<target name="build.sources" depends="init">
<available property="WEB-INF/lib/webappsrc.zip" file="${build.result.folder}/WEB-INF/lib/webappsrc.zip"/>
<antcall target="WEB-INF/lib/webappsrc.zip"/>
</target>
<target name="build.zips" depends="init">
</target>
<target name="gather.sources" depends="init" if="destination.temp.folder">
<mkdir dir="${destination.temp.folder}/${full.name}/WEB-INF/lib"/>
<copy file="${build.result.folder}/WEB-INF/lib/webappsrc.zip" todir="${destination.temp.folder}/${full.name}/WEB-INF/lib"/>
<copy todir="${destination.temp.folder}/${full.name}">
<fileset dir="${basedir}" includes="cpl-v10.html,notice.html"/>
</copy>
</target>
<target name="gather.logs" depends="init" if="destination.temp.folder">
<mkdir dir="${destination.temp.folder}/${full.name}/WEB-INF/lib"/>
<copy file="${temp.folder}/WEB-INF/lib/webapp.jar.bin.log" todir="${destination.temp.folder}/${full.name}/WEB-INF/lib"/>
</target>
<target name="clean" depends="init">
<delete file="${build.result.folder}/WEB-INF/lib/webapp.jar"/>
<delete file="${build.result.folder}/WEB-INF/lib/webappsrc.zip"/>
<delete file="${plugin.destination}/${full.name}.jar"/>
<!-- custom addition begin -->
<delete file="${plugin.destination}/${full.name}.war"/>
<!-- custom end -->
<delete file="${plugin.destination}/${full.name}.zip"/>
<delete dir="${temp.folder}"/>
</target>
<target name="refresh" depends="init" if="eclipse.running">
<eclipse.refreshLocal resource="${plugin}" depth="infinite"/>
</target>
<target name="zip.plugin" depends="init">
<delete dir="${temp.folder}"/>
<mkdir dir="${temp.folder}"/>
<antcall target="build.jars"/>
<antcall target="build.sources"/>
<antcall target="gather.bin.parts">
<param name="destination.temp.folder" value="${temp.folder}/"/>
</antcall>
<antcall target="gather.sources">
<param name="destination.temp.folder" value="${temp.folder}/"/>
</antcall>
<delete>
<fileset dir="${temp.folder}" includes="**/*.bin.log"/>
</delete>
<!-- custom change begin -->
<jar jarfile="${temp.folder}/${full.name}.war" basedir="${temp.folder}/${full.name}" filesonly="false"/>
<zip zipfile="${plugin.destination}/${full.name}.zip">
<zipfileset dir="${temp.folder}" includes="${full.name}.war"/>
<zipfileset dir="${basedir}/infocenter" includes="about.html,notice.html,cpl-v10.html"/>
</zip>
<delete dir="${temp.folder}"/>
<!-- custom end -->
</target>
</project>