Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 45791 invoked from network); 1 Feb 2008 16:14:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Feb 2008 16:14:24 -0000 Received: (qmail 63799 invoked by uid 500); 1 Feb 2008 16:14:14 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 63755 invoked by uid 500); 1 Feb 2008 16:14:13 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 63744 invoked by uid 99); 1 Feb 2008 16:14:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Feb 2008 08:14:13 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [206.190.58.150] (HELO web55101.mail.re4.yahoo.com) (206.190.58.150) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 01 Feb 2008 16:13:45 +0000 Received: (qmail 91162 invoked by uid 60001); 1 Feb 2008 16:13:51 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=GmG60jwEt2CCXuU9A59uTbeyTva6xkEbSt9JqtCzJGkyhkE75E0MxhaYIOkW+7v3GTwVNRdGPSPj9lIjIoaTcvQRxQueFLovpRKMtcGZlIgp3UJhp8lU5Q/+a73VPTkzxze+4mhppWJLmxW7t9TT8rsqt8NwjoCrgGmuUVNn7nc=; X-YMail-OSG: N5pRGVkVM1mQ50Kysd5bRJ7ukLevbc4SdqhTT3Ska0EDRRJSluYkSbGdveRBeOcCv.7M.ESzEgQXa4_zf0x3_FHSWf1886GNvnkmSy8AxcWzd9THsnQGydBiw1CmGQ-- Received: from [66.10.233.130] by web55101.mail.re4.yahoo.com via HTTP; Fri, 01 Feb 2008 08:13:51 PST Date: Fri, 1 Feb 2008 08:13:51 -0800 (PST) From: Matt Benson Subject: Re: svn commit: r617460 - /ant/core/trunk/docs/manual/CoreTypes/resources.html To: dev@ant.apache.org In-Reply-To: <20080201104717.26AC41A9832@eris.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <42554.74701.qm@web55101.mail.re4.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org Thanks! I've made a couple of tweaks and moved the restrict example to restrict from sort. ;) -Matt --- jhm@apache.org wrote: > Author: jhm > Date: Fri Feb 1 02:47:14 2008 > New Revision: 617460 > > URL: > http://svn.apache.org/viewvc?rev=617460&view=rev > Log: > Examples for > * > * resource selectors > > Modified: > > ant/core/trunk/docs/manual/CoreTypes/resources.html > > Modified: > ant/core/trunk/docs/manual/CoreTypes/resources.html > URL: > http://svn.apache.org/viewvc/ant/core/trunk/docs/manual/CoreTypes/resources.html?rev=617460&r1=617459&r2=617460&view=diff > ============================================================================== > --- > ant/core/trunk/docs/manual/CoreTypes/resources.html > (original) > +++ > ant/core/trunk/docs/manual/CoreTypes/resources.html > Fri Feb 1 02:47:14 2008 > @@ -792,7 +792,38 @@ > Because the resource comparators used > (<reverse> > and <date>) are in an > internal antlib > their namespace must be set explicitly. > -

> +

> + > +
> +    <project
>
rsel="antlib:org.apache.tools.ant.types.resources.selectors">
> +        <macrodef
> name="copyFromPath">
> +            <attribute
> name="todir"/>
> +            <attribute
> name="refid"/>
> +            <element
> name="nested-resource-selectors"
> optional="yes"
> implicit="true"/>
> +            <sequential>
> +                <mkdir dir="@{todir}"
> taskname="copyFromPath"/>
> +                <copy todir="@{todir}"
> taskname="copyFromPath">
> +                    <restrict>
> +                        <path
> refid="@{refid}"/>
> +                        <rsel:or>
> +                           
> <nested-resource-selectors/>
> +                        </rsel:or>
> +                    </restrict>
> +                    <flattenmapper/>
> +                </copy>
> +            </sequential>
> +        </macrodef>
> +        <copyFromPath
> refid="classpath"
> todir="todir">
> +            <rsel:name
> name="log4j.properties"/>
> +            <rsel:name
> name="default.properties"/>
> +        </copyFromPath>
> +     </project>
> +  
> +

Creates the todir directory and > copies (if present) the > + files log4j.properties and > default.properties > + from the Classpath (already used while > compiling). > +

> + > > > > @@ -920,6 +951,29 @@ > No, default > true > > > + > +

Example

> +
> +    <union id="A">
> +        <string value="a"/>
> +        <string value="b"/>
> +    </union>
> +    <union id="B">
> +        <string value="b"/>
> +        <string value="c"/>
> +    </union>
> +    <union id="union"><resources
> refid="A"/><resources
> refid="B"/></union>
> +    <intersect
> id="intersect"><resources
> refid="A"/><resources
> refid="B"/></intersect>
> +    <difference
> id="difference"><resources
> refid="A"/><resources
> refid="B"/></difference>
> +    <echo>
> +      A: ${toString:A}                    = a;b
> +      B: ${toString:B}                    = b;c
> +
> +      union     : ${toString:union}       = a;b;c
> +      intersect : ${toString:intersect}   = b
> +      difference: ${toString:difference}  = a;c
> +    </echo>
> +  
> > > > > > ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org