IntelliJ IDEA 2016.3 Help

Working with Ant Properties File

Ant properties files let you move properties out of you build.xml file. Once you create a property file, IntelliJ IDEA recognizes the file and tries to match key-value-pairs from that file against the Ant or Java files. If the match is found, IntelliJ IDEA lets you use a link between properties of those files, ensures the correct rename of the keys and updates the links accordingly.

You create .properties file for all the properties that are defined outside the build file. For example, properties that you define in build settings. IntelliJ IDEA keeps those properties in one place and you don't need to edit the generated build file.

IntelliJ IDEA generates .properties file automatically if you generate the Ant build file. If you create build.xml manually then to use a .properties file in your Ant build.xml file do the following:

  • Include a property in your build.xml file with the name of the properties file specified by the file attribute. For example, property file="build.properties".

See Also

Last modified: 21 March 2017