ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim White <...@pagesmiths.com>
Subject Re: How to manage without rules
Date Fri, 12 Oct 2001 17:25:36 GMT
At 05:43 PM 10/12/2001 +0100, WATKINS, Andy, FM wrote:
>In make you have rules, not so in ant

In ant there are properties and targets.

   <target name="testall">
       <antcall target="test">
          <param name="project" value="project1"/>
       </antcall>
       <antcall target="test">
          <param name="project" value="project2"/>
       </antcall>
   </target>

   <target name="test">
     <junit printsummary="no" haltonfailure="yes" fork="yes" timeout="60000">
       <jvmarg value="-Dlog.dir=${project}" />

       <classpath>
         <path refid="localclasses"/>
         <path refid="classpath"/>
       </classpath>

       <formatter usefile="false" type="plain" />

       <batchtest fork="yes">
         <fileset dir="${rbsfm}/${project}/classes"
includes="**/*$$Test.class" />
       </batchtest>
     </junit>
     <echo message="Common tests completed OK" />
   </target>

Note also that there are external XML entities for including common 
properties and targets.

     <!DOCTYPE project [
       <!ENTITY IncludeCommon SYSTEM "../common.xml">
     ]>

     ...

     &IncludeCommon;

jim

----------------------------------------------------------------
James P. White                 Netscape DevEdge Champion for IFC
IFC Exchange   *   Insanely great Java   *   http://www.ifcx.org
jim@pagesmiths.com Pagesmiths' home is http://www.pagesmiths.com


Mime
View raw message