ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <hol...@yahoo.com>
Subject RE: What is wrong with this condition?
Date Mon, 13 May 2002 20:34:34 GMT
--- Dominique Devienne <DDevienne@lgc.com> wrote:
> Haven't used the beta, but a wild guess would be to use
> 	<isset property="p" />
> 
> instead of
> 
> 	<isset property="${p}" />

Yep.

But why not simplify things and take full advantage of 1.5 -- <fail> now
supports if/unless, and the new <loadfile> task could be used to store
your fail message in a file, read it in, and echo it out as part of the
<fail>:

  <target name="check-properties">
    <loadfile srcfile="fail.txt" property="failmsg"/>
    <fail unless="allproject.dir"
          message="allproject.dir not set! ${failmsg}/>
    ...
  </target>

$ ant
Buildfile: build.xml

BUILD FAILED
c:\TEMP\src\sub\build.xml:59: allproject.dir not set!
Required properties are:
  allproject.dir   - The base directory from which all projects descend,
                     and into which cvs puts the individual projects.
  project.name     - The name of the project.
  project.work.dir - The base directory where a local build file would
                     live, and where classes are generated.

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message