ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Cryder" <christi...@enhydra.org>
Subject Ant.bat question (Batch file related)
Date Tue, 25 Sep 2001 22:06:16 GMT
Hi folks,

We use our own version of ant.bat and ant.sh in all our webapp projects.
Basically, its just a copy of what comes with Ant, and it allows us to have
Ant "preinstalled" for developers who download the project. So far so good.

Now we have tweaked these files a little to add in any jar files which are
found in the webapps WEB-INF/lib and web-INF/jars file...this was pretty
straightforward, and it makes it real easy to include 3rd party jars when
building a project...you just drop them into one of these directories.

What I'd like to do now is modify my copy of lcp.bat so that I can also tell
it NOT to add certain jars to the classpath. The easiest way to do this
specify hardcoded names (which is what we have been doing)--the downside is
that it isn't very portable; every time you create a new project or move one
of these jars between /jars and /lib you have to remember to tweak the
ant.bat file.

SO...I'm trying to add entries to the build.properties file to indicate the
jars that should be skipped. The problem is with the DOS bat file. I can
execute a 'find' to determine whether or not a string is in the props file
(returns a '1' or a '0'), but I can't figure out how to get that into a
system variable so I can evaluate it. I thought something like this might
work:

   set VAR= < find ...
   if %VAR%=="1" echo Yep else echo Nope

but I can't seem to get the syntax right. I know my find statement is
working correctly; I just can't figure out how to evaluate the results. Any
suggestions?

Thanks much,
Christian
------------------------------------------------
Christian Cryder [christianc@enhydra.org]
Barracuda - MVC Component Framework for Webapps
http://barracuda.enhydra.org
------------------------------------------------
        "What a great time to be a Geek"


Mime
View raw message