Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
CHUKWA-134. Add release audit target. (Giridharan Kesavan via Eric Yang)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/chukwa/trunk@765467 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
macroadster committed Apr 16, 2009
1 parent 12d6fb5 commit 55c65564cb44a993357c18fe0d8d87d8342cc94a
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 7 deletions.
@@ -140,7 +140,7 @@
<property name="build.ivy.lib.dir" location="${build.ivy.dir}/lib" />
<property name="build.ivy.report.dir" location="${build.ivy.dir}/report" />
<property name="common.ivy.lib.dir" location="${build.ivy.lib.dir}/${ant.project.name}/common"/>

<property name="rat.reporting.classname" value="rat.Report"/>
<!--this is the naming policy for artifacts we want pulled down-->
<property name="ivy.artifact.retrieve.pattern"
value="${ant.project.name}/[conf]/[artifact]-[revision].[ext]"/>
@@ -195,7 +195,8 @@
<ivy:cachepath pathid="contrib-classpath" conf="common" />
</target>

<target name="init-hadoop" if="hadoopMode">

<target name="init-hadoop" if="hadoopMode">
<antcall target="ivy-retrieve-common"/>
<echo>Hadoop Mode</echo>
<property name="build.dir" value="${basedir}/build"/>
@@ -540,9 +541,6 @@
<include name="org/apache/hadoop/chukwa/datacollection/client/**/*.java"/>
<include name="org/apache/hadoop/chukwa/util/**/*.java"/>
</fileset>
<fileset dir="${build.dir}/conf">
<include name="chukwa-hadoop-metrics-log4j.properties"/>
</fileset>
<fileset dir="${build.classes}">
<include name="org/apache/hadoop/mapred/**/*.class"/>
<include name="org/apache/hadoop/chukwa/datacollection/client/**/*.class"/>
@@ -632,6 +630,7 @@
<delete dir="${build.dir}"/>
<delete dir="${build.ivy.lib.dir}/${ant.project.home}"/>
<delete dir="build"/>
<delete file="${ivy.jar}"/>
<delete dir="${docs.src}/build"/>
</target>
<!-- ====================================================== -->
@@ -724,8 +723,18 @@
</copy>

<copy todir="${build.dir}/${final.name}/conf">
<fileset dir="${basedir}/conf"/>
<fileset dir="${basedir}/conf">
<exclude name="hadoop-metrics.properties" />
</fileset>
</copy>
<copy file="${basedir}/conf/hadoop-metrics.properties"
tofile="${build.dir}/${final.name}/conf/hadoop-metrics.properties">
<filterchain>
<replacetokens>
<token key="CHUKWA_LOG_DIR" value="${CHUKWA_LOG_DIR}"/>
</replacetokens>
</filterchain>
</copy>

<copy todir="${build.dir}/${final.name}/opt" failonerror="false">
<fileset dir="${opt.dir}" />
@@ -835,4 +844,24 @@
<rpm specFile="chukwa.spec" topDir="${build.dir}" cleanBuildDir="true" failOnError="true"/>
</target>

<!-- ================================================================== -->
<!-- Perform audit activities for the release -->
<!-- ================================================================== -->
<target name="releaseaudit" depends="package,ivy-retrieve-releaseaudit" description="Release Audit activities">
<java classname="${rat.reporting.classname}" fork="true">
<classpath refid="releaseaudit-classpath"/>
<arg value="${build.dir}/${final.name}"/>
</java>
</target>

<target name="ivy-retrieve-releaseaudit" depends="ivy-resolve-releaseaudit"
description="Retrieve Ivy-managed artifacts for the compile configurations">
<ivy:retrieve settingsRef="${ant.project.name}.ivy.settings"
pattern="${build.ivy.lib.dir}/${ivy.artifact.retrieve.pattern}" />
<ivy:cachepath pathid="releaseaudit-classpath" conf="releaseaudit"/>
</target>

<target name="ivy-resolve-releaseaudit" depends="ivy-init-local">
<ivy:resolve settingsRef="${ant.project.name}.ivy.settings" conf="releaseaudit"/>
</target>
</project>
16 ivy.xml
@@ -18,6 +18,8 @@
extends="jetty"
description="artifacts needed to compile/test the application"/>
<conf name="jetty" visibility="private" />
<conf name="releaseaudit" visibility="private"
description="Artifacts required for releaseaudit target"/>

</configurations>

@@ -112,5 +114,17 @@
name="hadoop-core"
rev="${hadoop.version}"
conf="common->default"/ -->
</dependencies>
<dependency org="com.google.code.p.arat"
name="rat-lib"
rev="${rats-lib.version}"
conf="releaseaudit->default"/>
<dependency org="commons-lang"
name="commons-lang"
rev="${commons-lang.version}"
conf="releaseaudit->default"/>
<dependency org="commons-collections"
name="commons-collections"
rev="${commons-collections.version}"
conf="releaseaudit->default"/>
</dependencies>
</ivy-module>
@@ -8,9 +8,11 @@ hadoop.version=0.20.0-dev
#These are the versions of our dependencies (in alphabetical order)
commons-fileupload.version=1.2
commons-httpclient.version=3.0.1
commons-lang.version=2.4
commons-logging.version=1.0.4
commons-io.version=1.4
commons-codec.version=1.3
commons-collections.version=3.1
commons-net.version=1.4.1
commons-logging-api.version=1.0.4

@@ -33,3 +35,6 @@ taglibs.version=1.1.2
jsp-api.version=2.0
jstl.version=1.1.2
mysql-connector.version=5.1.6

rats-lib.version=0.5.1

0 comments on commit 55c6556

Please sign in to comment.