ANT global property file


I'm trying to set a global property file so that all the defined properties are getting resolved during my ANT build. In Eclipse I can do this via the "Properties" tab in the "Window/Preferences/Ant/Runtime" config.

How can I set this in Intellij CE 9.0?



Comment actions Permalink

Nobody can answer this simple question?

Comment actions Permalink

vote for this question.
I want global properties like in eclipse:

I'm migrating from huge eclipse project actively used this feature.
How i can workaround this eclipse settings in IDEA?

No entry found in config (part of config attached as image)

Comment actions Permalink

A solution I found is to set it directly in the "Ant command line" field

Build File Properties -> Execution tab -> Ant Command line

-propertyfile <PATH_TO_PROPERTY_FILE>

At least that worked for me. However, the properties are not resolved in the ant build file and give a validation error such as "Property 'xyz' does not exist".

Comment actions Permalink

hello, Holger!
I tried this options, but this is option for single Build File, not global option. So it's not worked for me.
I have more than 500 build files in different subfolders.

But thanks anyway.

Comment actions Permalink

don't know about idea itself, but if you need a global properties for ant it looks natural to hook ant itself. You can modify ant cmd files by hardcoding "propertifile" pointing to your properties (or maybe even in env vars), you can hook property handling by implementing ant API - also easy money. After ant is hooked, you can set as an default ant home in idea.
or try to lookup eclipse sources to find how they do that.


Please sign in to leave a comment.