OK, given that we all know about what we are doing (with the amazingly 
complicated build scripts), but one of the critisisms of all newbies is 
that they don't understand what it's all about, then perhaps we are a 
little guilty of "can't see the woods for the trees" pattern.  We should 
incramentally start to make our build files more obvious.  Use 
description="" , comment, modularise etc.

Given that logkit can be build without a number of optional jars, 
perhaps we should warn of the missing status, so that the keen newbie 
builder can feel they are affecting a process by downloading jars and 
re-running build.bat/sh.

The diff below (tested) warns to the console of missing classes pior to 
javac.

Perhaps we should go one stage further and make a target that will get 
jars from jakarta-apache.org (or elsewhere).  That target is not 
automatically run (we can't assume all builders are permanently wired to 
the web), but merely hinted at in the warnings stared by this patch. 
 Actually some blend of relative retrieval (framwork) and download would 
do trick.

Thoughts?  I can do the coding (master of depends/unless/if).

- Paul H



C:/Java/cvs.exe diff -r HEAD build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-avalon-logkit/build.xml,v
retrieving revision 1.43
diff -r1.43 build.xml
145,149c145,146
<   <!-- Prepares the build directory -->
<   <target name="compile">
<     <mkdir dir="${build.dir}"/>
<     <mkdir dir="${build.classes}"/>
<
---
 >   <target name="optional-tests">
 >   
164c161,210
<                classpathref="project.class.path" />
---
 >                classpathref="project.class.path" />  
 >   
 >   </target>
 >   
 >   <target name="op-warning">              
 >     <echo>**********************************************</echo>
 >     <echo>*</echo>
 >     <echo>*  Classes needed for output via ${thing} are not </echo>
 >     <echo>*  available.  Logkit should build without them</echo>
 >     <echo>*</echo>        
 >     <echo>***********************************************</echo>
 >     <echo/>
 >   </target>
 >   
 >   <target name="servlet-warn" unless="servlet.present">
 >     <antcall target="op-warning">
 >       <param name="thing" value="Servlet"/>
 >     </antcall>
 >   </target>    
 >   
 >   <target name="jms-warn" unless="javax.jms.present">
 >     <antcall target="op-warning">
 >       <param name="thing" value="JMS"/>
 >     </antcall>
 >   </target>  
 >   
 >   <target name="sql-warn" unless="javax.SQL.present">
 >     <antcall target="op-warning">
 >       <param name="thing" value="SQL databases"/>
 >     </antcall>
 >   </target>  
 >   
 >   <target name="framework-warn" unless="avalon-framework.present">
 >     <echo>**********************************************</echo>
 >     <echo>*</echo>
 >     <echo>*  Optional classes from Avalon's framework subproject</echo>
 >     <echo>*  are missing.  Logkit should build without them.</echo>
 >     <echo>*</echo>        
 >     <echo>***********************************************</echo>
 >     <echo/>
 >   </target>  
 >   
 >   <target name="optional-warnings" 
depends="jms-warn,framework-warn,sql-warn,servlet-warn">
 >   </target>  
 >   
 >   <!-- Prepares the build directory -->
 >   <target name="compile" depends="optional-tests, optional-warnings">
 >     <mkdir dir="${build.dir}"/>
 >     <mkdir dir="${build.classes}"/>
 > 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to