Reading from .properties file in Ant build.xml

Viewed 49948

I need some help with using Ant's property files. I have the following:

  1. A build.properties file. This file contains one piece of information: on=1

  2. An ant.xml file. This file contains my build instructions.

I want to read the on attribute from my properties file and if the value is 1 I want to execute a task in my build file. Otherwise I want it to do nothing. Can anyone guide me on how to accomplish this?

4 Answers
Related