views:

292

answers:

2

I'm using ant as my primary builder for a flex project in IntelliJ. Every time I build, IntelliJ runs the code analysis tool and finds a bunch of errors in my build file, which pops up the "Messages" window every time. Actually, the errors that it finds are complaining mostly about properties which are defined in a separate file, which it doesn't actually parse when running the analysis.

Edit: Additionally, I am making use of ant tasks which generate properties on the fly, which IntelliJ is unaware of.

Is there any way to turn off file inspection for ant build files during the build process?

A: 

Does the .properties file exist, and is it in your CLASSPATH? IntelliJ is very smart about figuring that stuff out. When IntelliJ complains, I usually assume that I'm making a mistake. That posture usually gets me to a solution pretty quickly.

duffymo
The .properties file is in the same directory as the build.xml.
Nik Reiman
+2  A: 

That sounds weird. IDEA on the fly inspections which you get while editing the build.xml file should not pop-up when you actually build the project unless they are really errors and are reported by Ant to IDEA while the build file is executed.

IDEA can perform additional validation and report errors on Make for certain components (see Settings | Compiler | Validation), but it doesn't include Ant build files and is not triggered when you just run the Ant target.

If you don't want to see warnings from the Ant Messages Window, you need to toggle off the "Show All Messages" button.

If you don't want IDEA to analyze your build.xml file for errors, click the Hector icon in the status bar and disable the inspections per file by changing the highlighting level from the Inspections to Syntax.

Clarify the problem if it's not the case (knowing IDEA version would be also useful).

CrazyCoder