3354 ant build.xml error hilighting

Is there something I need to do to have IDEA parse the ANT build.xml files correctly?

It is marking all the tasks under target as "Element XXX is not allowed here." (See attached).

In 4.5.4, everything is green except for targets with spaces in them, e.g. compile server, are not resolved in depends.



Attachment(s):
ant_errors.gif
6 comments
Comment actions Permalink

Check your DTD extension assignment in file types (must be DTD file type).

IK
Alex wrote:

Is there something I need to do to have IDEA parse the ANT build.xml files correctly?

It is marking all the tasks under target as "Element XXX is not allowed here." (See attached).

In 4.5.4, everything is green except for targets with spaces in them, e.g. compile server, are not resolved in depends.

0
Comment actions Permalink

I know it's unrelated, but I'm reusing the topic :)

Is there any chance to get the Ant language plugin not to choke on
namespaces?

To reproduce, add a namespace into the ant project open tag, import a
task with the same URL as the namespace, try to use the task.

-- Dimitar

0
Comment actions Permalink

Under IDE Settings->File Types, I haven't changed file types for XML DTD or XML.

XML Document Type Definition: mod dtd ent
XML files: xsd xml jnlp hs wsdl tld xsl jhm

Do build.xml files require an ANT DTD to be specified now? I don't understand how IDEA is supposed to recognize an ANT build.xml file versus some other xml file.

0
Comment actions Permalink


Well, it is working again now. (see attached). Now the only problem is that targets with spaces are not resolved properly, but that is a known problem. I'm not exactly sure what fixed it. I did remove and re-add the build.xml file in the ant tools window. That might have done it.

My project was 4.5.4 upgraded directly to Irida 3354.



Attachment(s):
ant_errors2.gif
0
Comment actions Permalink

dimitar wrote:

I know it's unrelated, but I'm reusing the topic :)

Is there any chance to get the Ant language plugin not to choke on
namespaces?

To reproduce, add a namespace into the ant project open tag, import a
task with the same URL as the namespace, try to use the task.

I'm not sure we'll be able to fix this issue before release, but after
5.0 we have plans to improve ANT integration. Please submit this request
to Jira (if it's not done yet).

IK

0
Comment actions Permalink

Alex wrote:

Under IDE Settings->File Types, I haven't changed file types for XML DTD or XML.

XML Document Type Definition: mod dtd ent
XML files: xsd xml jnlp hs wsdl tld xsl jhm

Do build.xml files require an ANT DTD to be specified now? I don't understand how IDEA is supposed to recognize an ANT build.xml file versus some other xml file.


We analyze root tag to get if the file is one of known types (Ant, J2EE
files, etc.). For example ant files are xml files with root tag named
"project" in default namespace which has "default" attribute.

IK

0

Please sign in to leave a comment.