"ant" task with omitted "antfile" property fails to resolve default build.xml
I have the following in an Ant build.xml script:
<ant target="target1" dir="${basedir}/foo"/>
<ant target="target2"/>
From the "ant" task documentation:
When the antfile attribute is omitted, the file "build.xml" in the supplied directory (dir attribute) is used.
As these tags don't have an "antfile" property specified, they resolve correctly to a "build.xml" file in the specified directories when invoked by Ant. ie, target1 is found in ${basedir}/foo/build.xml, and target2 is found in ${basedir}/build.xml (the current file). However, IntelliJ highlights both in red with a "Target is unknown" error. This is a non-blocking error, but it's inconvenient as it prevents me from control-clicking to go directly to the target declaration in the linked build file.
Please sign in to leave a comment.