List Info

Thread: DO NOT REPLY New: - wrong target invoked (when project name is prefix of target name?)




DO NOT REPLY New: - wrong target invoked (when project name is prefix of target name?)
country flaguser name
United States
2007-07-24 10:27:58
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=42
964>.
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: devant.apache.org
        ReportedBy: davewatersheep.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:toolsapache-ant-1.6.5

D:antbug>%ANT_HOME%binant
Buildfile: build.xml

special.compile:
     [echo] GOOD special.compile

start:

BUILD SUCCESSFUL
Total time: 0 seconds



D:antbug>set ANT_HOME=c:toolsapache-ant-1.7.0

D:antbug>%ANT_HOME%binant
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=ema
il
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the
assignee.

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribeant.apache.org
For additional commands, e-mail: dev-helpant.apache.org


DO NOT REPLY - wrong target invoked (when project name is prefix of target name?)
country flaguser name
United States
2007-07-24 10:39:03
DO NOT REPLY - wrong target invoked (when project name is prefix of target name?)
country flaguser name
United States
2007-07-24 11:13:26
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=42
964>.
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


peterreillyapache.org changed:

           What    |Removed                     |Added
------------------------------------------------------------
----------------
             Status|NEW                         |ASSIGNED




------- Additional Comments From peterreillyapache.org  2007-07-24 09:13 -------
Indeed, the targets have been changed slightly for imported
files.
For example take the example:
example.xml :
<project name="example">
    <target name="build"/>
</project>
build.xml: 
<project name="main">
   <import file="example.xml"/>
</project>
This would have one target - "build"

however, the build file
<project name="main">
   <import file="example.xml"/>
   <target name="build"/>
</project>
would have two targets "build" (in build.xml) and
"example.build"
in (example.xml).

This made it difficult to write reusable import build files,
so
for ant 1.7.0 the "example.build" target was
always created (as
well as the overriddable "build" target).

Your example would generate three targets:
"compile"  (bound to special.xml/compile)
"special.compile" (bound to special.xml/compile)
and
"special.special.compile" (bound to
special.xml/special.compile)


It probably should be:
"compile"  (bound to special.xml/compile)
"special.compile" (bound to
special.xml/special.compile)
and
"special.special.compile" (bound to
special.xml/special.compile)


I will see what can be done.


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

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribeant.apache.org
For additional commands, e-mail: dev-helpant.apache.org


DO NOT REPLY - wrong target invoked (when project name is prefix of target name?)
country flaguser name
United States
2007-10-24 04:59:14
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=42
964>.
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


peterreillyapache.org changed:

           What    |Removed                     |Added
------------------------------------------------------------
----------------
                 CC|                           
|gillouxGaillardwanadoo.fr




------- Additional Comments From peterreillyapache.org  2007-10-24 02:59 -------
*** Bug 43686 has been marked as a duplicate of this bug.
***

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

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribeant.apache.org
For additional commands, e-mail: dev-helpant.apache.org


DO NOT REPLY - wrong target invoked (when project name is prefix of target name?)
country flaguser name
United States
2007-10-24 07:17:03
[1-5]

about | contact  Other archives ( Real Estate discussion Medical topics )