Diane Holt wrote: > It looks like you're referencing the WL_HOME property in the tasks > before you've set it, via the "init" target, which doesn't get run until > the target that depends on it is run. The tasks, however, being > outside of any target, will I believe, be "run" at parse-time. If you put > those inside the "init" target, after the properties are set, it should > work. If you try to put the task inside of a I get: ----------------------------------------------------------- BUILD FAILED /home/scollins/development/Timecard/build.xml:102: Could not create task of type: path because I can't find it in the list of task class definitions. Common solutions are: 1 execute bin/bootstrap. 2 use taskdef to declare your task. 3 add the task to defaults.properties. ----------------------------------------------------------- I don't get this error if the task is outside of the task. I'm having the same problem as David but the solution doesn't work because it appears that the task works fine outside of a task but not if I put the task inside of a to resolve the problem where the properties that are not yet set when the path is being evaluated. Thanks, Steve > If you need the tasks done without having any targets that > reference them depend on "init", then you'd need to set the properties > that are currently being set in "init" be set, instead, outside of a > specific target. > > Diane > > --- "Ventimiglia, David" wrote: > > It looks like elements only get added to the classpath if they exist. > > For > > instance, in Dave's example below, if "foo" doesn't refer to a real file > > or > > directory off of the project base path, then he won't see it in the > > messages > > emitted when he runs Ant. > > > > In my case, it looks like property values aren't getting evaluated > > properly > > by the time the classpath is evaluated, so the Javac task checks to see > > if > > things like these exist: > > > > ${WL_HOME}\classes\boot > > ${WL_HOME}\eval\cloudscape\lib\cloudscape.jar > > > > Where ${WL_HOME} is being treated literally, rather than having its > > value, > > c:\weblogic, substituted. Of course these paths don't exist, so it gets > > left off the classpath, leading to compilation errors. The only way I > > can > > seem to get it to work is to either remove the property references, or > > to > > set a system classpath (for example, by running $WL_HOME\setEnv.cmd) > > before > > running Ant. > > > > The question is, why aren't my properties being evaluated? I must be > > missing something fundamental. Any ideas? Here's a copy of my > > build.xml > > file: > > > > > > > > > > > > .... set some other properties .... > > > > > > > > > > > > > > > > > > > location="${WL_HOME}/eval/cloudscape/lib/cloudscape.jar"/> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > destdir="${build}" > > debug="${debug}" > > optimize="${optimize}" > > deprecation="${deprecation}" > > includes="**/${package}/*.java" > > target="${target-vm}"> > > > > > > > > > > > > > > .... some other targets .... > > > > > > > > -----Original Message----- > > From: Dave Inskeep [mailto:dave.inskeep@bea.com] > > Sent: Tuesday, October 24, 2000 8:54 AM > > To: ant-user@jakarta.apache.org > > Subject: javac task and classpath attribute > > > > > > Does anyone else have problems with using the classpath attribute, > > classpath nested element, or classpathref attribute with the javac task? > > No > > matter what I try, javac seems to ignore the classpath and use what ant > > ran > > with. In desperation I even just tried: > > > > > > > > hoping to see my classpath as foo. However, this is what I get with "ant > > > > -verbose": > > > > [javac] Compilation args: jikes -d C:\Projects\beast\classes -classpath > > "C:\Program > > > Files\JavaSoft\JRE\1.2\lib\ext\iiimp.jar;C:\Projects\beast\classes;C:\java\a > > > nt\lib\ant.jar;C:\java\ant\lib\jaxp.jar;C:\java\ant\lib\parser.jar;C:\java\j > > dk1.2.2\lib\tools.jar;C:\Program > > Files\JavaSoft\JRE\1.2\lib\rt.jar;C:\Projects\beast\src" > > > > It appears to be just the classpath that the ant batch file uses plus my > > > > srcdir and destdir. Am I missing something obvious? I'm using version > > ant > > 1.2. > > > > Thanks, > > Dave > > ===== > (holtdl@yahoo.com) > > __________________________________________________ > Do You Yahoo!? > Yahoo! Messenger - Talk while you surf! It's FREE. > http://im.yahoo.com/