blob: 0f1cf7e2b6f6a8baf02bf0c81cec2a8218873b15 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2003-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.
-->
<!-- $Rev: 330371 $ $Date: 2005-11-02 16:57:37 -0500 (Wed, 02 Nov 2005) $ -->
<project default="default"
xmlns:j="jelly:core"
xmlns:u="jelly:util"
xmlns:ant="jelly:ant"
xmlns:maven="jelly:maven"
xmlns:define="jelly:define"
xmlns:velocity="jelly:velocity"
>
<j:set var="dist.name" value="${pom.artifactId}-${pom.currentVersion}"/>
<ant:property name="build.dist.dir" value="${maven.build.dir}/dist" />
<ant:property name="jar.file" value="${dist.name}.jar" />
<ant:property name="license.file" value="LICENSE.txt" />
<ant:property name="readme.file" value="README.txt" />
<ant:property name="authors.file" value="AUTHORS.txt" />
<ant:property name="release.note.file" value="RELEASE-NOTE.txt"/>
<!-- ==================== -->
<!-- Default Global Goals -->
<!-- ==================== -->
<goal name="jar">
<attainGoal name="jar:install"/>
</goal>
<goal name="default">
<attainGoal name="jar:install"/>
</goal>
<goal name="build">
<attainGoal name="default"/>
</goal>
<goal name="rebuild">
<attainGoal name="clean"/>
<attainGoal name="build"/>
</goal>
<!-- ================================================================ -->
<!--- Create the Source Distribution -->
<!-- ================================================================ -->
<goal name="dist-src">
<ant:property name="dist.src.root.file" value="${build.dist.dir}/dist-src"/>
<ant:property name="dist.src.file" value="${dist.src.root.file}/${dist.name}-src" />
<!-- <mkdir dir="${build.dist.dir}"/> -->
<mkdir dir="${dist.src.file}" />
<ant:copy todir="${dist.src.file}">
<ant:fileset dir=".">
<ant:include name="**"/>
<ant:exclude name="**/target/**"/>
<ant:exclude name="**/.svn/**"/>
<ant:exclude name="**/bin/**"/>
<ant:exclude name=".*"/>
<!-- <ant:exclude name="**/*.license"/> -->
</ant:fileset>
</ant:copy>
<ant:zip destfile="${build.dist.dir}/${dist.name}-src.zip" basedir="${dist.src.root.file}"/>
<ant:tar tarfile="${build.dist.dir}/${dist.name}-src.tar" basedir="${dist.src.root.file}"/>
<ant:gzip src="${build.dist.dir}/${dist.name}-src.tar" zipfile="${build.dist.dir}/${dist.name}-src.tar.gz"/>
<ant:delete file="${build.dist.dir}/${dist.name}-src.tar"/>
<ant:delete dir = "${dist.src.root.file}"/>
</goal>
<!-- ================================================================ -->
<!--- Create the Binary Distribution -->
<!-- ================================================================ -->
<goal name="dist-bin" prereqs="default,javadoc">
<property name="dist.bin.root.file" value="${build.dist.dir}/dist-bin" />
<property name="dist.bin.file" value="${dist.bin.root.file}/${dist.name}-bin"/>
<mkdir dir="${dist.bin.file}" />
<mkdir dir="${dist.bin.file}/docs" />
<mkdir dir="${dist.bin.file}/docs/apidocs"/>
<mkdir dir="${dist.bin.file}/lib"/>
<!--
<ant:copy todir="${dist.bin.file}/docs">
<ant:fileset dir="docs">
<ant:include name="**"/>
</ant:fileset>
</ant:copy>
-->
<ant:copy todir="${dist.bin.file}/docs/apidocs">
<ant:fileset dir="target/docs/apidocs/">
<ant:include name="**"/>
</ant:fileset>
</ant:copy>
<ant:copy file="target/${jar.file}" todir="${dist.bin.file}/lib" />
<ant:copy file="${license.file}" todir="${dist.bin.file}" />
<ant:copy file="${readme.file}" todir="${dist.bin.file}" />
<ant:copy file="${authors.file}" todir="${dist.bin.file}" />
<ant:copy file="${release.note.file}" todir="${dist.bin.file}" />
<ant:zip destfile="${build.dist.dir}/${dist.name}-bin.zip" basedir="${dist.bin.root.file}"/>
<ant:tar tarfile="${build.dist.dir}/${dist.name}-bin.tar" basedir="${dist.bin.root.file}"/>
<ant:gzip src="${build.dist.dir}/${dist.name}-bin.tar" zipfile="${build.dist.dir}/${dist.name}-bin.tar.gz"/>
<ant:delete file="${build.dist.dir}/${dist.name}-bin.tar"/>
<ant:delete dir = "${dist.bin.root.file}"/>
</goal>
</project>