ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Ayers" <>
Subject File dependency
Date Wed, 12 Feb 2003 21:47:42 GMT


	I feel rather embarassed to be asking what I would expect to be a trivial question, but I
can't seem to figure out how to create a file dependency.  There is an external jar file that
needs to be built (it is the product of another archive module) before my module can be built,
and I want to check if it exists before compiling, because things go quite badly if it's not
there, and the error messages thus generated aren't terribly helpful.  I tried:


  <target name="test.compile"
          depends="init,${maindist}/hub.jar" >
    <javac srcdir="${src}" destdir="${classes}" deprecation="off" >
       <classpath refid="test.classpath" />


	...where init is an ant target (that works fine), maindist is a property with the path to
the jar, and hub.jar is its name.  I get:


Buildfile: build.xml

Target `${maindist}/hub.jar' does not exist in this project. It is used from target `test.compile'.

Total time: 0 seconds


	...which is consistent with the ant documentation, which states that dependencies are ant
targets.  So, I think the question here is: how do I get a file to be an ant target?

	Am I missing something here?


View raw message