incubator-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rdon...@apache.org
Subject svn commit: r672475 - /incubator/public/trunk/build.xml
Date Sat, 28 Jun 2008 08:38:08 GMT
Author: rdonkin
Date: Sat Jun 28 01:38:08 2008
New Revision: 672475

URL: http://svn.apache.org/viewvc?rev=672475&view=rev
Log:
Add mail reminder

Modified:
    incubator/public/trunk/build.xml

Modified: incubator/public/trunk/build.xml
URL: http://svn.apache.org/viewvc/incubator/public/trunk/build.xml?rev=672475&r1=672474&r2=672475&view=diff
==============================================================================
--- incubator/public/trunk/build.xml (original)
+++ incubator/public/trunk/build.xml Sat Jun 28 01:38:08 2008
@@ -72,13 +72,78 @@
 ===========
 	-->
 	
-	<target name='audit'>      
-	   <property name='rat-src' value='rat'/>
-           <taskdef uri="antlib:org.apache.rat.scan"
-                    resource="org/apache/rat/scan/antlib.xml" classpath="${rat-src}"/>
    
-           <rat:Audit 
+	<property name='dir.build' value='target'/>
+	<property name='dir.audit' value='site-author/audit'/>
+	<property name='audit.mailinglist.address' value='general@incubator.apache.org'/>
+	<property name='audit.mailinglist.name' value='Incubator General Mailing List'/>
+	
+	<target name='__prepare-rat' >
+		<property name='rat-src' value='rat'/>
+		<taskdef uri="antlib:org.apache.rat.scan"
+	                    resource="org/apache/rat/scan/antlib.xml" classpath="${rat-src}"/>
 
+	</target>
+	
+	<target name='__check-for-changes' depends='__prepare-rat'>
+		<rat:CheckForChanges 
+			build-dir='${dir.build}'
+			property='audit.changes'
+			/> 
+	</target>
+	
+	<target 
+		name='__prepare-audit-mail'
+		depends='__check-for-changes'>
+		
+		<property prefix="audit.mail" file="mail.properties"/>
+		
+		<condition property='do.audit.mail'>
+			<and>
+				<isset property="audit.changes"/>
+				<istrue value="${audit.mail.enabled}"/>
+			</and>
+		</condition>
+	</target>
+	
+	<target 
+			name='__no-mail-warning' 
+			depends='__prepare-audit-mail'
+			unless='audit.mail.enabled'>
+		<echo>Mail disabled. See EXAMPLE.mail.properties.</echo>
+	</target>
+	
+	<target 
+			name='__no-changes-warning' 
+			depends='__prepare-audit-mail'
+			unless='audit.changes'>
+		<echo>No changes. No need to send mail.</echo>
+	</target>
+	
+	<target 
+			name='__mail-report' 
+			depends='__prepare-rat, __prepare-audit-mail, __no-mail-warning, __no-changes-warning'
+			if='do.audit.mail'>
+		<rat:MailAuditReport
+			host='${audit.mail.mailhost}'
+			port='${audit.mail.mailport}'
+			user='${audit.mail.user}'
+			password='${audit.mail.password}'
+			from='${audit.mail.from}'
+		    to-address='${audit.mailinglist.address}'
+			to-name='${audit.mailinglist.name}'
+			dir='${dir.audit}'/>
+	</target>
+	
+	<target 
+		name='mail-report' 
+		depends='__prepare-rat,__mail-report'>
+	</target>
+	
+	<target name='audit' depends='__prepare-rat'>         
+        <rat:Audit 
                 src='${rat-src}'
-                out='site-author/audit'   
-                build='target'/>
+                out='${dir.audit}'   
+                build='${dir.build}'/>
+		<antcall target='docs'/>
+		<antcall target='mail-report'/>
 	</target>
 </project>



---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@incubator.apache.org
For additional commands, e-mail: cvs-help@incubator.apache.org


Mime
View raw message