You can always use the <uptodate> task :
http://nant.sourceforge.net/nightly/help/tasks/uptodate.html.

Hope this helps,

Gert

----- Original Message -----
From: "Troy Laurin" <[EMAIL PROTECTED]>
To: "Nick Zigomanis" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Wednesday, June 23, 2004 8:54 AM
Subject: RE: [Nant-users] XSLT Generated Build File and deprecated
uptodatefile attribute


If the deprecation messages are getting to you, you could modify the
source in your local copy...

In the file $NANT_HOME/src/NAnt.Core/Tasks/IfTask.cs, delete the
[System.Obsolete...] attribute attached to the UpToDateFile property
(line 171, in my source... nightly build 20040525).  Then, in your
$NANT_HOME folder, run 'nant test UpdateBin' to update your NAnt
distribution files.  The contents of $NANT_HOME/bin can then be copied
to any other computer that needs the updated binaries.


At least it will keep your log files quieter until the nightly build
catches up.

-T


________________________________

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Nick
Zigomanis
Sent: Wednesday, 23 June 2004 10:07 AM
To: [EMAIL PROTECTED]
Subject: RE: [Nant-users] XSLT Generated Build File and
deprecated uptodatefile attribute



Yes, it does. And I would just like to state (again), that the
deprecated status should be removed from uptodatefile until the function
provides the same level functionality. Those deprecated messages are
filling my log files!



Regards,

Nick.




________________________________


From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Troy Laurin
Sent: Wednesday, 23 June 2004 11:55 AM
To: [EMAIL PROTECTED]
Subject: RE: [Nant-users] XSLT Generated Build File and
deprecated uptodatefile attribute



Well, it looks like file::up-to-date falls quite short of the
functionality that uptodatefile provided.



The file::up-to-date function should probably be extended to
create:

file::up-to-date-to-fileset(srcFile, targetFileSetRefId)

file::fileset-up-to-date(srcFileSetRefId, targetFile)

file::fileset-up-to-date-to-fileset(srcFileSetRefId,
targetFileSetRefId)



Then your code would change similar to:



<fileset id="compareset">

    <xsl:for-each select="...">

        <!-- Same xsl tree from <comparefiles> element
previously -->

    </xsl:for-each>

</fileset>

<property name="build.required" value="false"
if="${file::up-to-date-to-fileset(assembly.name + '.version',
'compareset')}" />





If NAnt functions support overloading, and named filesets could
be referenced directly in functions, then the file::up-to-date function
could just be overloaded:

file::up-to-date(string srcFile, string targetFile)

file::up-to-date(string srcFile, FileSet targetFileSet)

file::up-to-date(FileSet srcFileSet, string targetFile)

file::up-to-date(FileSet srcFileSet, FileSet targetFileSet)



and the test would become something like
if="${file::up-to-date(assembly.name + '.version', @compareset)}".  I
haven't looked at the source code for how functions and their arguments
are parsed, so I don't know how hard this last would be (Or even if it's
already implemented!)



It's probably worth putting in a RFE at
http://sourceforge.net/tracker/?group_id=31650&atid=402871 to extend the
file::up-to-date function unless someone mentions that it's already been
done.  Until then, I guess you get to live with a deprecation warning
:-)





All the best,



-- Troy


________________________________


From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Bonnett,
Evan A
Sent: Wednesday, 23 June 2004 1:41 AM
To: [EMAIL PROTECTED]
Cc: 'Cromwell, Ryan F.'
Subject: [Nant-users] XSLT Generated Build File and
deprecated uptodatefile attribute

All,



I've included an <if> here that is using the deprecated
uptodatefile.  NAnt warns that the attribute is deprecated and to use
the ${file::uptodate(comparefile, uptodatefile)} function.



In this code below, it will set the ${build.required}
property to false if all files are up to date.  Is there an easy (and
clean) way to accomplish this using the file::uptodate() function?



<if uptodatefile=".\${{assembly.name}}.version"
debug="true" verbose="true" failonerror="false">
    <comparefiles>
     <!-- References -->
     <xsl:for-each select="./References/Reference">
      <xsl:choose>
       <xsl:when test="substring(@AssemblyName,1,6) =
'System'"> <!-- static assembly reference -->
        <includes
name="[EMAIL PROTECTED]
ame}.dll" />
       </xsl:when>
       <!--Static References-->
       <xsl:when test="@AssemblyName">
        <!--We need to resolve this better.  We haven't
copied these into the latest dir yet.
        <includes
name="[EMAIL PROTECTED]" />-->
       </xsl:when>
       <!-- Project references -->
       <xsl:when test="@Project">
        <!-- It is currently assumed that assembly names
and root folder names are equal.-->
        <includes
name="[EMAIL PROTECTED]@Name}.version" />
       </xsl:when>
       <!-- COM object reference -->
       <xsl:when test="@Guid">
        <!-- This path doesn't exist yet
        <includes
name="[EMAIL PROTECTED]" />
        -->
       </xsl:when>
      </xsl:choose>
     </xsl:for-each>

     <!--Code and Embedded Resources-->
     <xsl:for-each
select="../Files/Include/[EMAIL PROTECTED]'Compile' or
@BuildAction='EmbeddedResource' or @BuildAction='Content']">
      <includes name="[EMAIL PROTECTED]" />
     </xsl:for-each>

     <!-- The project file may have changed -->
     <includes name="${{project.path}}" />

     <!-- The force.rebuild file allows us to force a
rebuild even if there isn't a need to -->
     <includes name="${{project.src}}\force.rebuild" />
    </comparefiles>

    <property name="build.required" value="false" />
   </if>



Thanks,

Evan A. Bonnett
Reynolds and Reynolds, IT
ERA Integrated Desking Development
937-485-8577
58577




Disclaimer Message:

This message contains confidential information and is intended only for
the individual(s) named. If you are not the named addressee you should
not disseminate, distribute or copy this e-mail. Please immediately
delete it and all copies of it from your system, destroy any hard copies
of it, and notify the sender. E-mail transmission cannot be guaranteed
to be secure or error-free as information could be intercepted,
corrupted, lost, destroyed, arrive late or incomplete, or contain
viruses. To the maximum extent permitted by law, Immersive Technologies
Pty. Ltd. does not accept liability for any errors or omissions in the
contents of this message which arise as a result of e-mail transmission.





Disclaimer Message:

This message contains confidential information and is intended only for the
individual(s) named.  If you are not the named addressee you should not
disseminate, distribute or copy this e-mail. Please immediately delete it
and all copies of it from your system, destroy any hard copies of it, and
notify the sender. E-mail transmission cannot be guaranteed to be secure or
error-free as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses. To the maximum extent
permitted by law, Immersive Technologies Pty. Ltd. does not accept liability
for any errors or omissions in the contents of this message which arise as a
result of e-mail transmission.



-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to