|
1 | 1 | <project name="Codec" default="compile" basedir="."> |
2 | 2 | <!-- |
3 | 3 | "Codec" component of the Jakarta Commons Subproject |
4 | | - $Id: build.xml,v 1.10 2003/11/13 06:37:19 ggregory Exp $ |
| 4 | + $Id: build.xml,v 1.11 2003/11/14 01:43:38 ggregory Exp $ |
5 | 5 | --> |
6 | 6 | <!-- ========== Initialize Properties ===================================== --> |
7 | 7 | <property file="${user.home}/${component.name}.build.properties"/> |
|
49 | 49 | <target name="clean" description="Clean build and distribution directories"> |
50 | 50 | <delete dir="${build.home}"/> |
51 | 51 | <delete dir="${dist.home}"/> |
| 52 | + <delete dir="${pub.home}"/> |
52 | 53 | </target> |
53 | 54 | <target name="all" depends="clean,compile" description="Clean and compile all components"/> |
54 | 55 | <target name="javadoc" depends="compile" description="Create component Javadoc documentation"> |
|
91 | 92 | </fileset> |
92 | 93 | </copy> |
93 | 94 | </target> |
| 95 | + <target name="pub-bin" depends="dist" description="Create binary distribution (compressed) ready for publication"> |
| 96 | + <mkdir dir="${pub.home}"/> |
| 97 | + <!-- Binary properties --> |
| 98 | + <property name="final.path" value="${pub.home}/${final.name}"/> |
| 99 | + <property name="zip.path" value="${final.path}.zip"/> |
| 100 | + <property name="tar.path" value="${final.path}.tar"/> |
| 101 | + <property name="gz.path" value="${tar.path}.gz"/> |
| 102 | + <!-- Zip binary dist --> |
| 103 | + <zip destfile="${zip.path}"> |
| 104 | + <zipfileset dir="${dist.home}" prefix="${final.name}/"/> |
| 105 | + </zip> |
| 106 | + <checksum algorithm="md5" file="${zip.path}" fileext=".md5"/> |
| 107 | + <checksum algorithm="sha" file="${zip.path}" fileext=".sha"/> |
| 108 | + <!-- Tar & gzip binary dist --> |
| 109 | + <tar tarfile="${tar.path}" basedir="${dist.home}"/> |
| 110 | + <gzip zipfile="${gz.path}" src="${tar.path}"/> |
| 111 | + <checksum algorithm="md5" file="${gz.path}" fileext=".md5"/> |
| 112 | + <checksum algorithm="sha" file="${gz.path}" fileext=".sha"/> |
| 113 | + <delete file="${tar.path}"/> |
| 114 | + <!-- Delete old signatures --> |
| 115 | + <delete file="${zip.path}.asc"/> |
| 116 | + <delete file="${gz.path}.asc"/> |
| 117 | + </target> |
| 118 | + <target name="pub-src" depends="dist" description="Create source distribution (compressed) ready for publication based on your LOCAL CVS sources"> |
| 119 | + <mkdir dir="${pub.home}"/> |
| 120 | + <echo>Warning: The source files used to create this source distribution come from your local copy of the source files.</echo> |
| 121 | + <!-- Source properties --> |
| 122 | + <property name="final-src.path" value="${pub.home}/${final.name}-src"/> |
| 123 | + <property name="zip-src.path" value="${final-src.path}.zip"/> |
| 124 | + <property name="tar-src.path" value="${final-src.path}.tar"/> |
| 125 | + <property name="gz-src.path" value="${tar-src.path}.gz"/> |
| 126 | + <property name="excludes" value="${pub.home}/**, ${dist.home}/**, target/**, xdocs/**"/> |
| 127 | + <!-- Zip source dist --> |
| 128 | + <zip destfile="${zip-src.path}"> |
| 129 | + <zipfileset dir="src" prefix="${final.name}/src/"/> |
| 130 | + <zipfileset dir="." includes="build.xml" prefix="${final.name}/"/> |
| 131 | + <zipfileset dir="." includes="checkstyle.xml" prefix="${final.name}/"/> |
| 132 | + <zipfileset dir="." includes="default.properties" prefix="${final.name}/"/> |
| 133 | + <zipfileset dir="." includes="LICENSE.TXT" prefix="${final.name}/"/> |
| 134 | + <zipfileset dir="." includes="maven.xml" prefix="${final.name}/"/> |
| 135 | + <zipfileset dir="." includes="project.properties" prefix="${final.name}/"/> |
| 136 | + <zipfileset dir="." includes="project.xml" prefix="${final.name}/"/> |
| 137 | + <zipfileset dir="." includes="RELEASE-NOTES.txt" prefix="${final.name}/"/> |
| 138 | + </zip> |
| 139 | + <checksum algorithm="md5" file="${zip-src.path}" fileext=".md5"/> |
| 140 | + <checksum algorithm="sha" file="${zip-src.path}" fileext=".sha"/> |
| 141 | + <!-- Tar & gzip source dist --> |
| 142 | + <tar tarfile="${tar-src.path}" basedir="." excludes="${excludes}" excludesfile=".cvsignore"/> |
| 143 | + <gzip zipfile="${gz-src.path}" src="${tar-src.path}"/> |
| 144 | + <checksum algorithm="md5" file="${gz-src.path}" fileext=".md5"/> |
| 145 | + <checksum algorithm="sha" file="${gz-src.path}" fileext=".sha"/> |
| 146 | + <delete file="${tar-src.path}"/> |
| 147 | + <!-- Delete old signatures --> |
| 148 | + <delete file="${zip-src.path}.asc"/> |
| 149 | + <delete file="${gz-src.path}.asc"/> |
| 150 | + </target> |
| 151 | + <target name="pub" depends="pub-bin, pub-src" description="Create binary and source distribution (compressed) ready for publication"> |
| 152 | + </target> |
94 | 153 | <!-- ========== Unit Test Targets ========================================= --> |
95 | 154 | <target name="compile.tests" depends="compile" description="Compile unit test cases"> |
96 | 155 | <javac srcdir="${test.home}" destdir="${build.home}/tests" debug="${compile.debug}" deprecation="${compile.deprecation}" optimize="${compile.optimize}"> |
|
0 commit comments