You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by "Hensley, Richard" <Ri...@McKesson.com> on 2001/11/13 22:33:48 UTC

build.xml

All: 

I've been working with Velocity now for a couple of weeks, and I like it
a lot. I'm currently using Anakia for some static web pages, and we are
contemplating using it in our product.

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> ), 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 

Confidentiality Notice: This e-mail message, including any attachments,
is for the sole use of the intended recipients and may contain
confidential and privileged information.  Any unauthorized review, use,
disclosure or distribution is prohibited.  If you are not the intended
recipient, please contact the sender by reply e-mail and destroy all
copies of the original message.