Nik Reiman
Nik Reiman

Reputation: 40420

How do I get Intellij not to analyze my ant build files?

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?

Upvotes: 1

Views: 3169

Answers (3)

Ruslans Uralovs
Ruslans Uralovs

Reputation: 1142

You can disable Ant plugin altogether. IDEA becomes quite slow on large Ant builds, so found this to be of help:

Crtl+Alt+S (for settings) -> Plugins -> Ant Support (uncheck)

Upvotes: 0

CrazyCoder
CrazyCoder

Reputation: 402225

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).

Upvotes: 2

duffymo
duffymo

Reputation: 308908

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.

Upvotes: 0

Related Questions