chukwa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ey...@apache.org
Subject svn commit: r765467 - in /hadoop/chukwa/trunk: build.xml ivy.xml ivy/libraries.properties
Date Thu, 16 Apr 2009 05:31:59 GMT
Author: eyang
Date: Thu Apr 16 05:31:59 2009
New Revision: 765467

URL: http://svn.apache.org/viewvc?rev=765467&view=rev
Log:
CHUKWA-134. Add release audit target. (Giridharan Kesavan via Eric Yang)


Modified:
    hadoop/chukwa/trunk/build.xml
    hadoop/chukwa/trunk/ivy.xml
    hadoop/chukwa/trunk/ivy/libraries.properties

Modified: hadoop/chukwa/trunk/build.xml
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/build.xml?rev=765467&r1=765466&r2=765467&view=diff
==============================================================================
--- hadoop/chukwa/trunk/build.xml (original)
+++ hadoop/chukwa/trunk/build.xml Thu Apr 16 05:31:59 2009
@@ -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>

Modified: hadoop/chukwa/trunk/ivy.xml
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/ivy.xml?rev=765467&r1=765466&r2=765467&view=diff
==============================================================================
--- hadoop/chukwa/trunk/ivy.xml (original)
+++ hadoop/chukwa/trunk/ivy.xml Thu Apr 16 05:31:59 2009
@@ -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>

Modified: hadoop/chukwa/trunk/ivy/libraries.properties
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/ivy/libraries.properties?rev=765467&r1=765466&r2=765467&view=diff
==============================================================================
--- hadoop/chukwa/trunk/ivy/libraries.properties (original)
+++ hadoop/chukwa/trunk/ivy/libraries.properties Thu Apr 16 05:31:59 2009
@@ -8,9 +8,11 @@
 #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 @@
 jsp-api.version=2.0
 jstl.version=1.1.2
 mysql-connector.version=5.1.6
+
+rats-lib.version=0.5.1
+



Mime
View raw message