All: 

I originally posted this on the velocity-user list, then I found the 
development list. I think this topic is more appropriate for this list. 

I ran across an issue with the build.xml file. When I use ant from the 
cygwin command line, it works great. However, I tried to use the ant 
build capability from within the netbeans development environment ( 
http://www.netbeans.org <http://www.netbeans.org>  <
http://www.netbeans.org <http://www.netbeans.org> > ), it did not work.
I 
investigated and found the fundamental problem was that netbeans uses 
does not build the classpath the same way the shell script does, also 
netbeans sets the property build.sysclasspath = ignore as a default. 
When using the command line, ant.jar is placed in the classpath by the 
script, and the <javac> task seems to use the contents of the class path

when compiling, unless build.sysclasspath=ignore is turned on. 

The suggestion from the netbeans users forum was the build.xml for 
velocity was not created in a portable way because it depended on the 
classpath being generated by the ant shell script for a successful 
compile. They suggested that the build script be set up such that the 
classpath for everything be explicit instead of implicit. This sounded 
like a good idea, however I'm not exactly sure how to implement it. 

I looked into modifying the build.xml, but I'm new to ant, so I was 
unable to get far. I'm not sure if the best way would be to use a 
property like ant.jar, or some other way of going about this. The 
biggest problem I see with using an ant.jar property is that the 
location is not known on each computer being used to build the system. 
Is there any way to "look" for the ant.jar needed? Could this be handled

with a setting in the .ant. properties file? 

Another approach to this problem is using some special netbeans 
properties that are available. However, using this means that I would 
need to detect that ant is being run within netbeans. The properties set

by netbeans are: 

${netbeans.filesystems.path}. A classpath corresponding to your mounted 
Filesystems. 
${netbeans.library.path}. A classpath containing libraries used by the 
IDE itself at runtime (such as ant.jar). 
${netbeans.class.path}. The IDE's startup classpath. Not recommended for

normal use. 
${netbeans.bootclass.path}. The IDE's bootstrap classpath (from your 
JRE). Not recommended for normal use. 

Any suggestions about what I can do about this that could be submitted 
back to the project? 

Richard Hensley 

Reply via email to