| <!-- |
| 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"> |
| |
| <!-- ================================================================== |
| - src compilation tweaks |
| - |
| - The LICENSE.txt file gets copied to the META-INF dir of the jar |
| - due to some kind of Maven magic, but we need to copy the |
| - NOTICE.txt file manually. |
| ================================================================== --> |
| |
| <postGoal name="java:compile"> |
| <copy todir="${maven.build.dest}/META-INF"> |
| <fileset dir="${basedir}"> |
| <include name="NOTICE.txt"/> |
| </fileset> |
| </copy> |
| </postGoal> |
| |
| <!-- ================================================================== |
| - distribution-building tweaks |
| - |
| - By default, the "dist" target builds a binary distribution that contains |
| - the output of all the maven reports. We don't want this; the output |
| - is huge and not relevant for most users. So before the build-bin |
| - goal tars/zips the archive dir it has build, we delete the unwanted |
| - information from it, leaving just the javadoc API info behind. |
| - |
| - Yes, it would be more elegant to skip the reports completely |
| - when running the dist target, but I don't know |
| - how to do that; if you do, then please fix this file. |
| - |
| - The source and binary distributions must also have the |
| - NOTICE.txt and RELEASE-NOTES.txt files in them, so here we |
| - copy those manually into the assembly directories. |
| - |
| - And finally, by default the src build unpacks into a directory |
| - name that is the same as the bin distribution. But traditionally |
| - src distros from apache unpack into a -src directory, so we |
| - arrange for that too. |
| ================================================================== --> |
| |
| <preGoal name="dist:build-bin"> |
| <delete includeEmptyDirs="true"> |
| <fileset dir="${maven.dist.bin.assembly.dir}/docs"> |
| <exclude name="apidocs/**"/> |
| </fileset> |
| </delete> |
| |
| <copy todir="${maven.dist.bin.assembly.dir}"> |
| <fileset dir="${basedir}"> |
| <include name="NOTICE.txt"/> |
| <include name="RELEASE-NOTES.txt"/> |
| </fileset> |
| </copy> |
| </preGoal> |
| |
| <preGoal name="dist:build-src"> |
| <copy todir="${maven.dist.src.assembly.dir}"> |
| <fileset dir="${basedir}"> |
| <include name="NOTICE.txt"/> |
| <include name="RELEASE-NOTES.txt"/> |
| <include name="build.properties.sample"/> |
| <include name="checkstyle.xml"/> |
| <include name="file-header.txt"/> |
| <include name="pom.xml"/> |
| </fileset> |
| <fileset dir="${basedir}"> |
| <include name="xdocs/**"/> |
| </fileset> |
| </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> |