Return-Path: Delivered-To: apmail-jakarta-ant-user-archive@jakarta.apache.org Received: (qmail 33054 invoked by uid 500); 19 Aug 2001 01:20:23 -0000 Mailing-List: contact ant-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Reply-To: ant-user@jakarta.apache.org Delivered-To: mailing list ant-user@jakarta.apache.org Received: (qmail 33045 invoked from network); 19 Aug 2001 01:20:23 -0000 Message-Id: <4.3.2.7.2.20010818203817.01f84b60@pop3.norton.antivirus> X-Sender: fbrier/pop.mindspring.com@pop3.norton.antivirus X-Mailer: QUALCOMM Windows Eudora Version 4.3.2 Date: Sat, 18 Aug 2001 21:22:26 -0400 To: ant-user@jakarta.apache.org From: "Frederick N. Brier" Subject: javac classpath element not behaving (1.4beta) In-Reply-To: <004201c12839$5d818220$0100a8c0@computer> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N I am doing something that several postings have talked about, and that is having a dependent target build on a .jar created by a preceding target. I tried to use the refid mechanism, and then use the 's element to append the dist/lib path in subsequent targets. This was so that the path evaluation would be delayed until that target was compiled. My approach appears to be flawed however because rather than reference the .jar files in the path, it is rebuilding the class files and including them in each jar file. I've tried to calculate the classpath used in the javac task and then echo it, but it is echo'ing the property name, not the classpath I would presume would have been stored. Now I understand that this was a bug/missing feature in 1.3, and apparently has been added and is working in the 1.4beta. So I downloaded the 1.4beta and tried it and received the same results. And I checked that I really was running the 1.4beta. Could someone please tell me what I am overlooking? The beginning of the build.xml file has this: The first target looks like this and works fine: ${path.util} The first two elements are for debugging the build.xml and outputs the expected results: compile-app-util: [echo] c:\dev\myapp\src\lib;c:\dev\myapp\lib\servlet.jar;c:\dev\myapp\lib\jboss\jmxri.jar;c:\dev\myapp\lib\jboss\jndi.jar;c:\dev\myapp\lib\jboss\jboss.jar;c:\dev\myapp\lib\jboss\log4j.jar;c:\dev\myapp\lib\jboss\jboss-jdbc_ext.jar;c:\dev\myapp\lib\castor-0.9.3.jar;c:\dev\myapp\lib\xerces.jar;c:\dev\myapp\lib\mm.mysql-2.0.4-bin.jar;c:\dev\myapp\lib\javax.jar;c:\dev\myapp\lib\struts.jar [javac] Compiling 2 source files to c:\dev\myapp\build\app-util The subsequent target has the following debugging statements and javac task. Note the use of the classpath element in the javac task element. This should work, no? ${model-class-path} ${model-dist-path} ${model-path} The output is as follows: compile-app-model: [echo] ${model-class-path} [echo] ${model-dist-path} [echo] ${model-path} [javac] Compiling 3 source files to c:\dev\myapp\build\app-model This is where I am really confused. Why is it echoing the ${property-name} instead of its value. I have also tried the syntax with the same result.