Wierd Ant build file problem

Hi all,

We're using Ant in our project. Our buildfile starts like this:

(big long file here) Ant works fine, both inside and out of IntelliJ. But while editing, the file attribute is marked in red, and IntelliJ says that 'Attribute "file" not allowed here.' This is odd, because if I ctrl-space right before it, IntelliJ provides "file" as a valid attribute completion, and if I ctrl-space right inside the quote mark, it provides the property file as a valid option too. Editing our Ant file is really annoying because of this (everything is red), am I missing something obvious? If I trim the Ant file down to: ]]>

This works fine. Ant also has massive problems resolving properties defined in the file, many of them are marked in red even if they're clearly defined. This is driving me crazy.

6.0.4, OS X, JDK 1.5

4 comments
Comment actions Permalink

I"m having the same problem. In IntelliJ 5.x my build.xml file is totally clean. The same file in 6.x shows red all over. Looks like some sort of a problem in the schema?

0
Comment actions Permalink

Hello Colin, Robert,

Not the same, but similar problem was recently found: http://www.jetbrains.net/jira/browse/IDEADEV-13346.
In that particular issue, if custom ant task (defined in Taskdef) has Property
subelement, and provides custom class for this subelement (not Ant Property,
but its descendant), then references to all properties becomes unresolved.

This issue may be related to yours or not. Do you use any taskdefs? Does
removing taskdefs and reopening project make the bug disappear? (Of course,
removing taskdefs, if any, will make custom tasks not resolved. I am just
trying to understand, is this IDEADEV-13346 again or something new.)

I"m having the same problem. In IntelliJ 5.x my build.xml file is
totally clean. The same file in 6.x shows red all over. Looks like
some sort of a problem in the schema?


Thanks,
Alexander.


0
Comment actions Permalink

Hmm, maybe, I did just add a taskdef. I don't have the broken version here to check, but I have an older version of the file here at home without the taskdef and it's ok. I'll check tomorrow.

Thanks,
Colin

0
Comment actions Permalink

Ok, my problem isn't exactly described by the JIRA above, here's my taskdef (unfortunately I can't reproduce my full build.xml):

]]>
<pathelement location="$/src/com/company/tools/lib/asm-3.0.jar"/>
]]>

Commenting this out and reloading the project removes the problem.

0

Please sign in to leave a comment.