Hi,
   I am currently using just these staements ... inside my build.xml file
...


  <target name="dependencies" 
            description="analyzes dependencies">
      <echo message="Removing any outdated dependent class files"/>
      <depend cache="depcache"
              closure="yes"
              srcdir="."
              destdir="${cpath}"/>
    </target>

  
  <!-- ================= BUILD: Compile Server Components =================
-->
  <target name="build-main" depends="dependencies" description="compiles
Java files">

    <javac   srcdir="." destdir="${cpath}" depend="on"
 
classpath="${symbeans.jar}:${jsdk.jar}:${activation.jar}:${xerces.jar}:${ser
vlet.jar}:${mail.jar}:${jaws.jar}:${sfc.jar}:${bsf.jar}:${js.jar}:${jsse.jar
}:${jnet.jar}:${jcert.jar}:${cpath}"
             deprecation="off" debug="on" optimize="off" target="1.2"
             excludes="**/CVS/**">
             <exclude name="**/http/**"/> 
             <exclude name="**/https/**"/> 
             <exclude name="**/security/**"/> 
             <exclude name="**/session/**"/> 
             <exclude name="**/logs/**"/> 
                          
    </javac>
             
  </target>
 
For good measure I have two files called Mail.java and MailException.java
where Mail.java depends on MailException.java
If I do just > ant dependencies, ideally the classfile for Mail should get
deleted but it does not.

Now I deliberately added a line into MailException.java which is
syntactically wrong so that the compilation gives me an error.
so If I do >ant build-main
If I go and look into the output folder I see that Mail has been recompiled
but MailException has not been compiled.(because of the error).

Also ...Using this build.xml file I seem to be ending up compiling all the
files in the current directory, (I need to compile only the one that has
changed ...), now how do I implement that ffunctionality ? Any help on this
will be really appreciated.

Thanks and Regards,
Viraj Purang

   

Reply via email to