ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ilya Lipkind" <ilipk...@talaris.com>
Subject Ant/javac ignores previously uncompiled files
Date Fri, 26 Apr 2002 02:01:49 GMT
Hi,

I am new to Ant, and I am probably doing something fundamentally wrong.
Here is my problem: I have setup my build.xml with a few dependent targets in a very straightforward
way (all javac compiles).  when a compile error happens - I go and fix it, however ant will
not re-compile it. Even if I don't fix it - I run ant second time and it will pass fine. 
The only way I can make it re-compile the class is to blow away the whole classes directory.
Even deleting all the classfiles for the target I am trying to re-compile does not do the
trick. It seems once ant does a target once it even if it fails it still thinks it has been
built succesfully and even deleting resulting classfiles is ignored by it.  What am I doing
wrong?

thanks in advance for your help,
- Ilya

P.S. Below is a sample piece of my build.xml
<project name="process" default="compile" basedir=".">

  <property name="ias.bin" value="${ias.home}/bin"/>
  <property name="src.root" value="${ias.home}/bin"/>

  <!-- change this property to use a compiler other than javac. -->
  <property name="build.compiler" value="classic"/>
  
  <!-- Source file location. -->
  <property name="src" value="../src/share"/>

  <!-- Destination directory for the build -->
  <property name="build" value="."/>

  <!-- ======================================================= -->
  <!-- Compile all classes.                                    -->
  <!-- ======================================================= -->
  <target name="prepare">
    <tstamp/>
    <mkdir dir="${build.classesdir}"/>
    <condition property="isWeblogic">
	  <equals arg1="${platform}" arg2="weblogic"/>
    </condition>
    <condition property="isIPlanet">
	  <equals arg1="${platform}" arg2="iplanet"/>
    </condition>
  </target> 

  <target name="platform.weblogic" if="isWeblogic">
    <echo message="Platform: weblogic" />
    <javac srcdir="${src}"
           destdir="${build.classesdir}"
	   classpath="${build.classpath}"
	   includesfile="./platformWeblogic.filelist"	   
	   />
  </target> 

  <target name="platform.iplanet" unless="isWeblogic">
    <echo message="Platform: iplanet" />
    <javac srcdir="${src}"
           destdir="${build.classesdir}"
	   classpath="${build.classpath}"
	   includesfile="./platformIPlanet.filelist"/>	   
  </target> 

  <target name="compile.util" depends="prepare, platform.weblogic, platform.iplanet">
    <javac srcdir="${src}"
           destdir="${build.classesdir}"
	   classpath="${build.classpath}"
	   includesfile="./util.filelist"
   	   memoryInitialSize="128M"
	   memoryMaximumSize="256M"/>
  </target>

  <target name="compile.core" depends="compile.util">
    <javac srcdir="${src}"
           destdir="${build.classesdir}"
	   classpath="${build.classpath}"
	   includesfile="./core.filelist"
	   memoryInitialSize="128M"
	   memoryMaximumSize="256M"/>
  </target> 

... and so on

------------------------------------
Ilya Lipkind
Talaris Corporation 
1145 Market Street, Suite 100
San Francisco, CA 94103

(408) 730-3369 phone

InfoWorld's "Top 100 Technology Innovators" in 2001

 
------------------------------------
Ilya Lipkind
Talaris Corporation 
1145 Market Street, Suite 100
San Francisco, CA 94103

(408) 730-3369 phone

InfoWorld's "Top 100 Technology Innovators" in 2001

 

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message