ant properties in sources

Hi,

Currently, it is possible to define properties for ant build runs. Unfortunately, these properties are not taken into account when editing ant files.
Is there any other place or way to either define properties, which will be applied in source files as well, or make idea use the properties set for build runs?

Thanks
Stefan

2 comments

It's been a bit since I've worked with an Ant build (having switched over to Maven). However, unless things have changes, no there is not an alternate way to define the properties. I think there was a feature request asking that any properties defined in the run config be taken into account when highlighting undefined properties. You may want to search for it (http://youtrack.jetbrains.net) an vote for it.

In the past, I dealt with this situation via a cheesy workaround. I simply created a target -- I named it "cmd-line-placeholders" -- in which I listed all the properties that are (or could be) set via the command line (or via an IDE's Ant run configuration). The target was never called at all. To limit the "it seems like a hack" factor, I simply considered it as documentation of all properties needed. In some cases, I even added echo statements to output the list of options.

0

Hi Stefan,
If you added your build to "AntBuild" view and configured properties there, they should be taken into account for both runtime and source highlighting/resolve.
If it does not work for you please file and issue with the example of behaviour.

Eugene.

0

Please sign in to leave a comment.