ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 42964] New: - wrong target invoked (when project name is prefix of target name?)
Date Tue, 24 Jul 2007 15:27:58 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42964>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42964

           Summary: wrong target invoked (when project name is prefix of
                    target name?)
           Product: Ant
           Version: 1.7.0
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core
        AssignedTo: dev@ant.apache.org
        ReportedBy: dave@watersheep.org


Apache Ant version 1.7.0 compiled on December 13 2006

If you take the two files below and run ant on build.xml:
- on Ant 1.6.5, the correct target "special.compile" executes;
- on Ant 1.7.0, the incorrect target "compile" executes.

It seems to be something to do with the project name in special.xml - if you
give it any value other than "special", then the correct target executes.

--- build.xml ---
<project default="start">
  <import file="special.xml"/>
  <target name="start" depends="special.compile" />
</project>
------

--- special.xml ---
<project name="special">
   <target name="special.compile">
     <echo>GOOD special.compile</echo>
   </target>
   <target name="compile">
     <echo>BAD compile</echo>
   </target>
</project>
------

Outputs:

D:\antbug>set ANT_HOME=c:\tools\apache-ant-1.6.5

D:\antbug>%ANT_HOME%\bin\ant
Buildfile: build.xml

special.compile:
     [echo] GOOD special.compile

start:

BUILD SUCCESSFUL
Total time: 0 seconds



D:\antbug>set ANT_HOME=c:\tools\apache-ant-1.7.0

D:\antbug>%ANT_HOME%\bin\ant
Buildfile: build.xml

special.compile:
     [echo] BAD compile

start:

BUILD SUCCESSFUL
Total time: 0 seconds

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message