edburns%acm.org cc5d26d683 all_files_in_order
git-svn-id: svn://10.0.0.236/trunk@235473 18797224-902f-48f8-a5cc-f745e15eee43
2007-09-10 21:52:36 +00:00

373 lines
12 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="pluglet" default="release" basedir=".">
<property name="Name" value="pluglet"/>
<property name="name" value="pluglet"/>
<property name="major.version" value="1" />
<property name="minor.version" value="1" />
<property name="release.version" value="a1" />
<property name="release.version.full" value="alpha_1" />
<property name="version"
value="${major.version}_${minor.version}_${release.version}"/>
<property name="full.version" value="${major.version}_${minor.version}_${release.version.full}"/>
<property name="snapshot" value="-SNAPSHOT" />
<!-- ************ 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.base" value="${objdir}/${name}" />
<property name="dist.home" value="${dist.base}/${name}_${version}" />
<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"
description="Build a Pluglet Release">
<antcall target="prepare" />
<antcall target="uptodate" />
<!-- <antcall target="compile.all" />-->
<antcall target="build.dist.jar" />
<antcall target="copy.binaries" />
<antcall target="copy.test.src" />
<antcall target="copy.core.src" />
<antcall target="copy.build.support" />
<antcall target="copy.release.notes" />
<antcall target="build.javadocs" />
<antcall target="build.zip" />
</target>
<target name="test-release"
description="Build a Pluglet Release">
<antcall target="prepare" />
<antcall target="uptodate" />
<antcall target="build.dist.jar" />
<antcall target="copy.binaries" />
<antcall target="copy.test.src" />
<antcall target="copy.core.src" />
<antcall target="copy.build.support" />
</target>
<target name="build.zip">
<condition property="platform" value="win32">
<and>
<os family="windows" />
</and>
</condition>
<condition property="platform" value="macosx">
<and>
<os name="Mac OS X" />
</and>
</condition>
<condition property="platform" value="linux">
<and>
<os family="unix" />
</and>
</condition>
<zip destfile="${objdir}/${name}_${version}.zip"
basedir="${dist.base}" />
</target>
<target name="clean">
<condition property="platform" value="win32">
<and>
<os family="windows" />
</and>
</condition>
<condition property="platform" value="macosx">
<and>
<os name="Mac OS X" />
</and>
</condition>
<condition property="platform" value="linux">
<and>
<os family="unix" />
</and>
</condition>
<delete file="${objdir}/${name}_${version}_${platform}.zip" />
<delete dir="${dist.base}" />
</target>
<target name="prepare">
<mkdir dir="${dist.base}" />
<mkdir dir="${dist.home}" />
<mkdir dir="${dist.home}/lib" />
<mkdir dir="${dist.home}/bin" />
<mkdir dir="${dist.home}/javadocs" />
<mkdir dir="${dist.home}/src" />
<!-- the shared object library prefix -->
<condition property="so.prefix" value="">
<and>
<os family="windows" />
</and>
</condition>
<condition property="so.prefix" value="lib">
<and>
<os family="unix" />
</and>
</condition>
<!-- the jni shared object library extension -->
<condition property="jni.extension" value="jnilib">
<and>
<os name="Mac OS X" />
</and>
</condition>
<condition property="jni.extension" value="dll">
<and>
<os family="windows" />
</and>
</condition>
<condition property="jni.extension" value="so">
<and>
<os family="unix" />
</and>
</condition>
<!-- the shared object library extension -->
<condition property="so.extension" value="dylib">
<and>
<os name="Mac OS X" />
</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="macosx">
<and>
<os name="Mac OS X" />
</and>
</condition>
<condition property="platform" value="linux">
<and>
<os family="unix" />
</and>
</condition>
<condition property="has.mozdocdir">
<available file="${mozdocdir}" />
</condition>
</target>
<target name="uptodate" unless="core.java.classes.uptodate">
<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}" />
<uptodate property="javadocs.uptodate"
targetfile="${dist.javadocs}/index.html" >
<srcfiles dir= "${source.home}">
<include name="classes/**/*.java" />
</srcfiles>
</uptodate>
<echo message="javadoc up to date: ${javadocs.uptodate}" />
</target>
<target name="build.dist.jar">
<jar jarfile="${dist.jar}" >
<manifest>
<attribute name="Specification-Title" value="${Name}"/>
<attribute name="Specification-Version" value="${major.version}.${minor.version}"/>
<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.pluglet"/>
</manifest>
<fileset dir="${dist.classes}">
</fileset>
</jar>
</target>
<target name="edburns.compile">
<ant inheritAll="false" dir="${source.home}/webclient"
target="compile.classes_spec" />
</target>
<target name="compile.all" unless="core.java.classes.uptodate"
depends="uptodate">
<ant inheritAll="false" dir="${source.home}" />
</target>
<target name="copy.binaries" depends="prepare">
<copy todir="${dist.home}/bin/${platform}/bin/components"
file="${objdir}/java/plugins/src/${so.prefix}pluglet.${so.extension}" />
<copy todir="${dist.home}/bin/${platform}/bin/components"
file="${objdir}/java/plugins/src/_xpidlgen/pluglet.xpt" />
<copy todir="${dist.home}/bin/${platform}/bin"
file="${objdir}/java/plugins/jni/${so.prefix}plugletjni.${so.extension}" />
<copy todir="${dist.home}/bin/${platform}/bin/plugins"
file="${objdir}/java/plugins/mozilla/${so.prefix}nppluglet.${so.extension}" />
</target>
<target name="copy.test.src" depends="prepare">
<!-- Populate the netbeans Source Packages -->
<copy todir="${dist.home}/test/manual/src/main/java">
<fileset dir="${basedir}/dummy-main/src/main/java">
<include name="**/*.java" />
</fileset>
</copy>
<copy todir="${dist.home}/samples/jmfplayer">
<fileset dir="${source.home}/examples/jmfplayer">
</fileset>
</copy>
<copy todir="${dist.home}/samples/">
<fileset dir="${source.home}/examples">
<include name="index.html" />
</fileset>
</copy>
</target>
<target name="copy.core.src" depends="prepare">
<!-- Populate the netbeans Source Package with the core
pluglet sources -->
<copy todir="${dist.home}/src/main/java" includeEmptyDirs="false">
<fileset dir="${source.home}/classes">
<exclude name="**/*.html" />
</fileset>
<fileset dir="${source.home}/../util/classes">
<exclude name="**/*.html" />
</fileset>
</copy>
</target>
<target name="copy.build.support" depends="prepare">
<copy todir="${dist.home}/netbeans">
<fileset dir="${basedir}/netbeans" />
</copy>
</target>
<target name="copy.release.notes" depends="prepare" if="has.mozdocdir">
<copy file="${mozdocdir}/java-plugins/release-notes/${full.version}.html" todir="${dist.home}" />
<copy file="${mozdocdir}/java-plugins/release-notes/${full.version}-detail.html" todir="${dist.home}" />
</target>
<target name="deploy.to.local.www" depends="prepare" if="has.mozdocdir"
description="After building the release, it can be deployed to the local mozilla-org CVS workarea">
<copy file="${dist.jar}"
tofile="${mozdocdir}/java-plugins/binaries/maven2/org/mozilla/pluglet/${major.version}.${minor.version}${snapshot}/${name}-${major.version}.${minor.version}${snapshot}.jar" />
<copy file="${name}-pom.xml"
tofile="${mozdocdir}/webclient/binaries/maven2/org/mozilla/webclient/${major.version}.${minor.version}${snapshot}/${name}-${major.version}.${minor.version}${snapshot}.pom" />
<copy file="${objdir}/${name}_${version}_${platform}.zip"
todir="${mozdocdir}/java-plugins/binaries/${platform}" />
</target>
<target name="build.javadocs" depends="prepare,uptodate"
unless="javadocs.uptodate">
<copy todir="${dist.javadocs}">
<fileset dir="${source.home}/classes">
<include name="**/*.jpg" />
<include name="**/*.jpeg" />
<include name="**/*.gif" />
<include name="**/*.html" />
</fileset>
</copy>
<javadoc packagenames="org.mozilla.*"
destdir="${dist.javadocs}"
Overview="${source.home}/classes/org/mozilla/pluglet/overview.html"
stylesheetfile="javadoc.css"
private="${javadoc.private}"
protected="${javadoc.protected}"
windowtitle="${Name} (${version})"
doctitle="${Name} (${version})"
bottom="Copyright &#169; 2002-2007 Mozilla.org All Rights Reserved.">
<fileset dir="${source.home}">
<include name="classes/**/*.java" />
</fileset>
<fileset dir="${source.home}/../util/classes">
<include name="classes/**/*.java" />
</fileset>
<classpath location="${dist.jar}"/>
</javadoc>
</target>
</project>