| <!-- |
| Copyright 2001-2004 The Apache Software Foundation |
| |
| Licensed 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:j="jelly:core"> |
| |
| <!-- ================================================================== |
| - COMMONS-BUILD TWEAKS |
| - |
| - Ensure commons-build stylesheets are copied into target directory |
| - when executing the xdoc goal (part of the site goal), so that the |
| - resulting website has the correct look-and-feel. |
| - |
| - This goal assumes that commons-build is checked out as a sibling |
| - to the directory we are doing the build in. |
| ================================================================== --> |
| |
| <postGoal name="xdoc:copy-resources"> |
| <copy todir="${basedir}/target/docs/style/" failonerror="false"> |
| <fileset dir="${basedir}/../commons-build/xdocs/style"> |
| <include name='**/*'/> |
| <exclude name='**/CVS/**'/> |
| </fileset> |
| </copy> |
| </postGoal> |
| |
| <!-- ================================================================== |
| - 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"/> |
| </fileset> |
| </copy> |
| |
| <move todir="${maven.dist.src.assembly.dir}-src"> |
| <fileset dir="${maven.dist.src.assembly.dir}"/> |
| </move> |
| </preGoal> |
| |
| </project> |