1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149
|
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(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.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project default="jar:jar" xmlns:ant="jelly:ant" xmlns:j="jelly:core">
<!-- we can customize the Maven build here -->
<!-- Set up the test files -->
<postGoal name="test:test-resources">
<copy todir="${test.basedir}/read-tests">
<fileset dir="${test.data.src}/basedir"/>
</copy>
<copy todir="${test.basedir}/">
<fileset dir="${test.data.src}" includes="nested.*,test.*"/>
</copy>
<!-- Compile the code for the class loader test -->
<javac
destdir="${test.basedir}"
debug="${maven.compile.debug}"
deprecation="${maven.compile.deprecation}"
optimize="${maven.compile.optimize}">
<src>
<path>
<pathelement location="${test.data.src}"/>
</path>
</src>
</javac>
<mkdir dir="${test.basedir}/read-tests/emptydir"/>
<!-- Create a zip file - its not possible to create tgz, tar and tbz2 so we provide
the whole set for download now
<zip zipfile="${test.basedir}/test.zip">
<zipfileset dir="${test.basedir}">
<include name="read-tests/**"/>
<include name="code/**"/>
</zipfileset>
</zip>
<zip zipfile="${test.basedir}/nested.zip">
<zipfileset dir="${test.basedir}">
<include name="test.zip"/>
</zipfileset>
</zip>
<jar
jarfile="${test.basedir}/test.jar"
manifest="${test.data.src}/test.mf">
<fileset dir="${test.basedir}">
<include name="read-tests/**"/>
<include name="code/**"/>
</fileset>
</jar>
<jar
jarfile="${test.basedir}/nested.jar"
basedir="${test.basedir}"
includes="test.jar"/>
-->
</postGoal>
<preGoal name="dist:build-bin">
<copy todir="${maven.dist.bin.assembly.dir}">
<fileset file='${basedir}/RELEASE_NOTES.txt'/>
<fileset file='${basedir}/NOTICE.txt'/>
</copy>
</preGoal>
<preGoal name="dist:build-src">
<copy todir="${maven.dist.src.assembly.dir}">
<fileset file='${basedir}/RELEASE_NOTES.txt'/>
<fileset file='${basedir}/NOTICE.txt'/>
</copy>
<!-- Copy Source -->
<copy todir="${maven.dist.src.assembly.dir}/core">
<fileset dir='${basedir}/core'>
<include name="**/*.java" />
<include name="**/*.xml" />
<include name="**/*.properties" />
<include name="**/*.html" />
<include name="src/test/test-data/**" />
<exclude name="target/**" />
</fileset>
</copy>
<copy todir="${maven.dist.src.assembly.dir}/examples">
<fileset dir='${basedir}/examples'>
<include name="**/*.java" />
<include name="**/*.xml" />
<include name="**/*.properties" />
<include name="**/*.html" />
<exclude name="target/**" />
</fileset>
</copy>
<!-- Copy XDocs -->
<copy todir="${maven.dist.src.assembly.dir}/xdocs">
<fileset dir='${basedir}/xdocs'/>
</copy>
</preGoal>
<!-- ================================================================== -->
<!-- Create MD5 Check Sums -->
<!-- ================================================================== -->
<postGoal name="dist">
<!-- create checksum for jar -->
<ant:checksum file="${maven.build.dir}/${maven.final.name}.jar" property="jar.md5"/>
<ant:echo message="${jar.md5} *${maven.final.name}.jar"
file="${maven.build.dir}/${maven.final.name}.jar.md5"/>
<!-- create checksum for binary zip -->
<ant:checksum file="${maven.dist.dir}/${maven.final.name}.zip" property="zip.md5"/>
<ant:echo message="${zip.md5} *${maven.final.name}.zip"
file="${maven.dist.dir}/${maven.final.name}.zip.md5"/>
<!-- create checksum for binary tar.gz -->
<ant:checksum file="${maven.dist.dir}/${maven.final.name}.tar.gz" property="tar.gz.md5"/>
<ant:echo message="${tar.gz.md5} *${maven.final.name}.tar.gz"
file="${maven.dist.dir}/${maven.final.name}.tar.gz.md5"/>
<!-- create checksum for source zip -->
<ant:checksum file="${maven.dist.dir}/${maven.final.name}-src.zip" property="src.zip.md5"/>
<ant:echo message="${src.zip.md5} *${maven.final.name}-src.zip"
file="${maven.dist.dir}/${maven.final.name}-src.zip.md5"/>
<!-- create checksum for source tar.gz -->
<ant:checksum file="${maven.dist.dir}/${maven.final.name}-src.tar.gz" property="src.tar.gz.md5"/>
<ant:echo message="${src.tar.gz.md5} *${maven.final.name}-src.tar.gz"
file="${maven.dist.dir}/${maven.final.name}-src.tar.gz.md5"/>
</postGoal>
</project>
|