blob: 824e17d2fb3de96f53cfb2d8ac58b4a724a047d5 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
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 name="Apache Hadoop Gateway" default="build" basedir=".">
<description>
Release build file for the Hadoop Gateway
</description>
<property name="gateway-name" value="Apache Knox (Incubator)"/>
<property name="gateway-project" value="knox"/>
<property name="gateway-artifact" value="knox"/>
<property name="gateway-version" value="0.3.0-SNAPSHOT"/>
<property name="release-manager" value="kminder"/>
<property name="gateway-home" value="${gateway-artifact}-${gateway-version}"/>
<condition property="mvn.cmd" value="mvn">
<os family="unix" />
</condition>
<condition property="mvn.cmd" value="mvn.bat">
<os family="windows" />
</condition>
<condition property="svn.cmd" value="svn">
<os family="unix" />
</condition>
<condition property="svn.cmd" value="svn">
<os family="windows" />
</condition>
<target name="init" description="Initialize the build.">
</target>
<target name="clean" depends="init" description="Clean up any build artifacts.">
<delete file="target/dist/${gateway-version}"/>
</target>
<target name="build" depends="init" description="Build the product.">
<exec executable="${mvn.cmd}">
<arg value="clean"/>
<arg value="install"/>
</exec>
</target>
<target name="verify" depends="package" description="Perform the verification build."/>
<target name="package" depends="init" description="Build and package the product (aka verify).">
<exec executable="${mvn.cmd}">
<arg value="-Prelease"/>
<arg value="clean"/>
<arg value="install"/>
</exec>
</target>
<target name="daily" depends="package" description="Perform the daily build."/>
<target name="full" depends="init" description="Perform a full build (aka daily).">
<exec executable="${mvn.cmd}">
<arg value="-Panalyze"/>
<arg value="-Prelease"/>
<arg value="site"/>
</exec>
</target>
<!--
<target name="archive" depends="init" description="Create the release ZIP.">
<zip destfile="target/${gateway-version}/${gateway-artifact}-${gateway-version}.zip">
<zipfileset
dir="gateway-release"
includes="**/*"
excludes="src,target,*.xml,*.iml,*.md"
prefix="${gateway-home}"/>
<zipfileset
dir="gateway-test-ldap/target"
includes="gateway-test-ldap-${gateway-version}.jar"
fullpath="${gateway-home}/bin/ldap-${gateway-version}.jar"/>
<zipfileset
dir="gateway-release/target"
includes="gateway-release-${gateway-version}.jar"
fullpath="${gateway-home}/bin/gateway-${gateway-version}.jar"/>
<zipfileset
dir="gateway-shell/target"
includes="gateway-shell-${gateway-version}.jar"
fullpath="${gateway-home}/bin/shell-${gateway-version}.jar"/>
</zip>
</target>
-->
<!--
<target name="release" depends="init,clean,build,archive" description="Create the release."/>
-->
<target name="sign" depends="init" description="Sign a previously created release.">
<exec executable="gpg" dir="target/dist">
<arg value="--armor"/>
<arg value="--detach-sig"/>
<arg value="${gateway-artifact}-${gateway-version}.zip"/>
</exec>
<exec executable="gpg" dir="target/dist">
<arg value="--armor"/>
<arg value="--detach-sig"/>
<arg value="${gateway-artifact}-${gateway-version}-src.zip"/>
</exec>
<exec executable="gpg" dir="target/dist">
<arg value="--export"/>
<arg value="--armor"/>
<arg value="--output"/>
<arg value="KEYS"/>
</exec>
<checksum file="target/dist/${gateway-artifact}-${gateway-version}-src.zip" algorithm="SHA1" property="checksum" />
<copy file="src/vote.txt" tofile="target/vote.txt">
<filterchain>
<expandproperties/>
</filterchain>
</copy>
<loadfile property="stage-message" srcFile="src/stage.txt">
<filterchain>
<expandproperties/>
</filterchain>
</loadfile>
<echo message="${stage-message}"/>
</target>
<target name="publish" description="Generate and publish the Apache web site.">
<exec executable="${mvn.cmd}" dir="gateway-site">
<arg value="clean"/>
</exec>
<mkdir dir="gateway-site/target/site"/>
<exec executable="${svn.cmd}" dir="gateway-site/target/dist">
<arg value="checkout"/>
<arg value="https://svn.apache.org/repos/asf/incubator/knox/site"/>
</exec>
<delete quiet="true" verbose="true">
<fileset dir="gateway-site/target/site" includes="**/*.html,**/*.css,**/*.png,**/*.gif">
</fileset>
</delete>
<exec executable="${mvn.cmd}" dir="gateway-site">
<arg value="site"/>
</exec>
<exec executable="${svn.cmd}" dir="gateway-site/target/site">
<arg value="add"/>
<arg value="--force"/>
<arg value="."/>
</exec>
<exec executable="${svn.cmd}" dir="gateway-site/target/site">
<arg value="commit"/>
<arg value="-m"/>
<arg value="Publish site from Git repository."/>
</exec>
</target>
</project>