| <?xml version="1.0" encoding="UTF-8"?> |
| <project name="JSR311Api" default="jar" basedir="."> |
| <description>Builds, tests, and runs the JSR311 API.</description> |
| <import file="nbproject/build-impl.xml"/> |
| |
| <!-- initialize build properties --> |
| <property file="${basedir}/build.properties" /> |
| |
| <property name="jsr311-api-dist.dir" value="${basedir}/dist/jsr311-api"/> |
| |
| <!-- task that generates a manifest file --> |
| <macrodef name="createManifest"> |
| <attribute name="file"/> |
| <sequential> |
| <copy tofile="@{file}" |
| file="${manifest.root}/manifest.mf" |
| overwrite="yes"/> |
| <replace file="@{file}"> |
| <replacefilter token="@@@@SPEC_VERSION@@@@" |
| value="${release.spec.version}" /> |
| <replacefilter token="@@@@BUILD_ID@@@@" |
| value="${build.id}"/> |
| </replace> |
| </sequential> |
| </macrodef> |
| |
| <target name="-pre-compile"> |
| <tstamp> |
| <format property="now" pattern="MM/dd/yyyy hh:mm aa" unit="hour"/> |
| </tstamp> |
| <property name="build.id" value="${now}" /> |
| <createManifest file="${basedir}/build/manifest.mf"/> |
| </target> |
| |
| <target name="dist" depends="jar, javadoc"> |
| <!-- Copy the README --> |
| <copy file="${basedir}/README.txt" |
| todir="${jsr311-api-dist.dir}"/> |
| |
| <!-- create lib --> |
| <mkdir dir="${jsr311-api-dist.dir}/lib"/> |
| <copy file="${dist.jar}" |
| todir="${jsr311-api-dist.dir}/lib"/> |
| |
| <!-- create docs --> |
| <mkdir dir="${jsr311-api-dist.dir}/docs/api"/> |
| <copy todir="${jsr311-api-dist.dir}/docs/api"> |
| <fileset dir="${basedir}/dist/javadoc"/> |
| </copy> |
| |
| <!-- create a zip file of src --> |
| <zip destfile="${jsr311-api-dist.dir}/lib/jsr311-api.src.zip" |
| basedir="${src.dir}" includes="**"/> |
| |
| <!-- create a zip file of the distribution --> |
| <zip destfile="${basedir}/dist/jsr311-api.zip" |
| basedir="${jsr311-api-dist.dir}" includes="**"/> |
| </target> |
| |
| </project> |