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=24249>.
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=24249

Add note about base directory of mapper in uptodate task

           Summary: Add note about base directory of mapper in uptodate task
           Product: Ant
           Version: 1.5.4
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Minor
          Priority: Other
         Component: Documentation
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


'to' attribute of mapper in uptodate task is relative to the directory
specified by 'dir' attribute of srcfile (not 'baedir' of project).
Instead of using mapper, in case of 'targetfile' attribute,
the value is relative to 'baedir'.

It works, but it confused me.
So, please add some note about this in uptodate task document.

See also Bug #7114
  <mapper type="merge> misintreprets 'to' attribute in <uptodate> context



Following is an example.

<project name="MapperTest" default="test" basedir=".">

<target name="checkUptodate" >
    <uptodate property="checkUptodate.uptodate">
        <srcfiles dir= "SRC" includes="*"/>
        <mapper type="merge" to="DEST/output"/>
        <!-- 
          Worng. must be "../DEST/output"
          But when using targetfile, it must be "DEST/output"
         -->
    </uptodate>
    <echo message="checkUptodate result: ${checkUptodate.uptodate}" />
</target>


<target name="convertFiles" depends="checkUptodate" 
    unless="checkUptodate.uptodate" >
    <delete dir="DEST"/>
    <mkdir dir="DEST"/>
    <echo message="Do conversion with SRC/*" />
    <!-- Do some thing  -->
    <touch file="DEST/output"/>
</target>

<target name="makeTestEnv" >
    <delete dir="DEST"/>
    <delete dir="SRC"/>
    <mkdir dir="SRC"/>
    <touch file="SRC/foo"/>
    <touch file="SRC/bar"/>
</target>

<target name="test" depends="makeTestEnv">
    <ant target="convertFiles"/>
    <ant target="convertFiles"/> <!-- Don't want to do twice, but... -->
</target>

</project>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to