pjs/java/dist/build.xml

178 строки
5.4 KiB
XML

<?xml version="1.0"?>
<!--
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Ed Burns &gt;edburns@acm.org&lt;
-->
<project name="webclient" default="release" basedir=".">
<property name="Name" value="webclient"/>
<property name="name" value="webclient"/>
<property name="version" value="2_0_a5"/>
<!-- ************ Per user local properties ******************************* -->
<property file="${user.home}/build.properties"/> <!-- User local -->
<property file="build.properties"/> <!-- Component local -->
<property file="../build.properties"/> <!-- java-supplement local -->
<property environment="myenv" />
<property name="dist.home" value="${objdir}/${name}" />
<property name="dist.javadocs" value="${dist.home}/javadocs" />
<property name="source.home" value="${basedir}/.." />
<property name="moz.dist" value="${objdir}/dist" />
<property name="dist.classes" value="${moz.dist}/classes" />
<property name="javadoc.private" value="false"/>
<property name="javadoc.protected" value="true"/>
<property name="dist.jar" value="${dist.home}/lib/${name}-${version}.jar"/>
<target name="release">
<antcall target="prepare" />
<antcall target="uptodate.core.java.classes" />
<antcall target="compile.all" />
<antcall target="build.dist.jar" />
<antcall target="copy.binaries" />
<antcall target="copy.samples.src" />
<antcall target="copy.build.support" />
</target>
<target name="clean">
<delete dir="${dist.home}" />
</target>
<target name="prepare">
<mkdir dir="${dist.home}" />
<mkdir dir="${dist.home}/lib" />
<mkdir dir="${dist.home}/bin" />
<mkdir dir="${dist.home}/javadocs" />
<mkdir dir="${dist.home}/samples" />
<condition property="so.prefix" value="">
<and>
<os family="windows" />
</and>
</condition>
<condition property="so.prefix" value="lib">
<and>
<os family="unix" />
</and>
</condition>
<condition property="so.extension" value="dll">
<and>
<os family="windows" />
</and>
</condition>
<condition property="so.extension" value="so">
<and>
<os family="unix" />
</and>
</condition>
<condition property="platform" value="win32">
<and>
<os family="windows" />
</and>
</condition>
<condition property="platform" value="linux">
<and>
<os family="unix" />
</and>
</condition>
</target>
<target name="uptodate.core.java.classes">
<uptodate property="core.java.classes.uptodate"
targetfile="${dist.jar}">
<srcfiles dir="${dist.classes}" />
</uptodate>
<echo message="java classes up to date: ${core.java.classes.uptodate}" />
</target>
<target name="build.dist.jar">
<jar jarfile="${dist.jar}" >
<manifest>
<attribute name="Specification-Title" value="${Name}"/>
<attribute name="Specification-Version" value="2.0"/>
<attribute name="Implementation-Title" value="'${name}': ${Name}"/>
<attribute name="Implementation-Version" value="${version}"/>
<attribute name="Implementation-Vendor" value="mozilla.org"/>
<attribute name="Implementation-Vendor-Id" value="org.mozilla"/>
<attribute name="Extension-Name" value="org.mozilla.webclient"/>
</manifest>
<fileset dir="${dist.classes}"
excludes="**/test/**" />
</jar>
</target>
<target name="compile.all" unless="core.java.classes.uptodate"
depends="uptodate.core.java.classes">
<ant inheritAll="false" dir="${source.home}" />
</target>
<target name="copy.binaries" depends="prepare">
<copy todir="${dist.home}/bin/components"
file="${objdir}/java/dom/src/${so.prefix}javadom.${so.extension}" />
<copy todir="${dist.home}/bin"
file="${objdir}/java/dom/jni/${so.prefix}javadomjni.${so.extension}" />
<copy todir="${dist.home}/bin"
file="${objdir}/java/webclient/src_moz/${so.prefix}${name}.${so.extension}" />
</target>
<target name="copy.samples.src" depends="prepare">
<copy todir="${dist.home}/samples/automated/src/main/java">
<fileset dir="${source.home}/webclient/test/automated/src/classes" />
</copy>
<copy todir="${dist.home}/samples/automated/src/main/resources">
<fileset dir="${source.home}/webclient/test/automated/src/test">
<exclude name="*basic*/" />
</fileset>
</copy>
<copy todir="${dist.home}/samples/manual/src/main/java">
<fileset dir="${source.home}/webclient/test/manual/src/classes" />
</copy>
</target>
<target name="copy.build.support" depends="prepare">
<copy todir="${dist.home}/netbeans">
<fileset dir="${basedir}/netbeans" />
</copy>
</target>
</project>