ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject RE: Tool to control build.properties entry
Date Mon, 05 Apr 2004 11:46:53 GMT
> I'm looking for a tool which control that all the 
> build.properties entry are
> well used on build.xml file and the reverse (all the variable 
> used in build.xml
> are well defined in build.properties).
> 
> Do you know a tool which could do that ?

I don´t know such a tool.
When thinking about the algorithm for the check some questions come into
my mind:
- Some properties are valid when they are not set. Especially those for
  checking conditions and used with <target in|unless/> clauses.
- Properties can be defined on many many places:
  - directly specified property files
  - property files specified by a property
    <property file="${os.name}.properties"/>
  - defined inside the buildfile
  - defined inside an imported buildfile (here again the imported file
    can be specified by a property)
  - set inside a <script> 
  ...

I recommend doing the following:
- when writing the buildfile, check for really needed properties and fail if
there
  aren´t set:  <available>, <fail unless>
  When using Ant 1.6 you can place these tasks directly under the <project>,
so it will
  be checked before anything else
- set other properties to a useful value, maybe derived from the needed
props.
  ant-contribs <propertycopy> could be useful here.


Jan

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message