Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 434187

Summary: Ant Editor throws false errors for included targets
Product: [Eclipse Project] Platform Reporter: Adi Racu <adrian.racu>
Component: AntAssignee: Sarika Sinha <sarika.sinha>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: Michael_Rennie, sarika.sinha
Version: 4.4   
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard:

Description Adi Racu CLA 2014-05-06 06:26:40 EDT
Having a target depend on a different target from an <include> file, makes the Ant editor throw a false "Target does not exist in this project" .

Example:
builda.xml:

  <project name="a">
    <target name="targetA">
      <echo message="a"/>
    </target>
  </project>

buildb.xml:
  <project name="b" default="targetB">
    <include file="builda.xml" as="aprefix"/>
    <!-- Error thrown here: Target aprefix.targetA does not exist in this project-->
    <target name="targetB" depends="aprefix.targetA">
      <echo message="b"/>
    </target>
  </project>

Running buildb.xml would correctly print:
 aprefix.targetA:
      [echo] a
 targetB:
      [echo] b
 BUILD SUCCESSFUL
Comment 1 Michael Rennie CLA 2014-05-06 09:55:12 EDT

*** This bug has been marked as a duplicate of bug 412809 ***