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 20282] New: - <path> before a <property> is ignored by targets
Date Tue, 27 May 2003 23:48:42 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20282>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20282

<path> before a <property> is ignored by targets

           Summary: <path> before a <property> is ignored by targets
           Product: Ant
           Version: 1.5.3
          Platform: All
               URL: http://www.xdweb.net/~dibblego/resume
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Core
        AssignedTo: dev@ant.apache.org
        ReportedBy: tonymorr@au1.ibm.com
                CC: tonymorr@au1.ibm.com


I have the following:
<project>
  <target name="blah">
    <property name="src.dir" value="src" description="Source directory"/>
    <path id="project.class.path>
      <pathelement path="${lib.dir}"/>
    </path>
    <javac ...>
      <classpath refid="project.class.path"/>
    </javac>
</target>

The CLASSPATH is ignored. I tested this by having the project have a dependency 
in the lib directory and watched the build fail because of it.
After some heartache, I found the following workaround ...
Change the order of the <path> and <property>:

<project>
  <target name="blah">
    <path id="project.class.path>
      <pathelement path="${lib.dir}"/>
    </path>
    <property name="src.dir" value="src" description="Source directory"/>
    <javac ...>
      <classpath refid="project.class.path"/>
    </javac>
</target>

Apologies if this is a duplicate bug or a misuse of Ant. I searched everywhere 
for an explanation.

Mime
View raw message