You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Raja Nagendra Kumar <Na...@tejasoft.com> on 2010/02/02 10:16:47 UTC
with refid to support further narrowing
<fileset refid="src.select.patterns" >
<include name="**/*ApplicationManager.java"/>
</fileset>
Would be possible to fileset or any resource collection, when refered
through a reference, can this be further narrowed using the <include> and
<exclude>
Currently ant does not support this, it says when refid is used, then
include and exlcude is not allowed etc.
Are there any good alternate approaches in this context.
Regards,
Raja Nagendra Kumar,
C.T.O
www.tejasoft.com
--
View this message in context: http://old.nabble.com/%3Cfileset%3E-with-refid-to-support-further-narrowing-tp27417405p27417405.html
Sent from the Ant - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: with refid to support further narrowing
Posted by Matt Benson <gu...@gmail.com>.
In theory you could rebuild the fileset from the restrict
resourcecollection, given that you presumably know the original
basedir used to create the fileset. A rough outline would be along
the lines of:
<property name="foo.dir" location="foo" />
<fileset id="allfoo" dir="${foo.dir}" />
<restrict id="onlyjavafoo">
<resources refid="fs" />
<name name="**/*.java" />
</restrict>
<fail message="No java resources found" />
<condition>
<resourcecount refid="onlyjavafoo" count="0" />
</condition>
</fail>
<pathconvert refid="onlyjavafoo" property="javafooincludes" pathsep=",">
<globmapper from="${foo.dir}/*" to="*" handledirsep="true" />
</pathconvert>
<fileset id="javafoofs" dir="${foo.dir}" includes="$
{javafooincludes}" />
Something along these lines ought to do it in this limited case.
HTH,
Matt
On Feb 3, 2010, at 7:29 AM, Raja Nagendra Kumar wrote:
>
> Is it possible to convert the restricted files into new fileset
> with xyz id.
>
> We need fileset, because the task we are using supports only
> fileset as
> nested element.
>
> Regards,
> Nagendra
>
>
>
> Raja Nagendra Kumar wrote:
>>
>> Stefan.. You are our ready reference of what ever I think ant
>> could/should
>> provide/be..
>>
>> Thank you once again.
>>
>> Regards,
>> Nagendra
>>
>> Stefan Bodewig wrote:
>>>
>>> On 2010-02-02, Raja Nagendra Kumar <Na...@tejasoft.com>
>>> wrote:
>>>
>>>> <fileset refid="src.select.patterns" >
>>>> <include name="**/*ApplicationManager.java"/>
>>>
>>>> </fileset>
>>>
>>>> Would be possible to fileset or any resource collection, when
>>>> refered
>>>> through a reference, can this be further narrowed using the
>>>> <include>
>>>> and
>>>> <exclude>
>>>
>>> Yes, see the <restrict> resource collection (and the <name>
>>> selectors).
>>>
>>> <restrict>
>>> <fileset refid="src.select.patterns"/>
>>> <name name="**/*ApplicationManager.java"/>
>>> </restrict>
>>>
>>> Wrap <name> into <not> for excludes and use <and>/<or> to combine
>>> multiple selectors.
>>>
>>> Stefan
>>>
>>> --------------------------------------------------------------------
>>> -
>>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>>> For additional commands, e-mail: user-help@ant.apache.org
>>>
>>>
>>>
>>
>>
>
> --
> View this message in context: http://old.nabble.com/%3Cfileset%3E-
> with-refid-to-support-further-narrowing-tp27417405p27436269.html
> Sent from the Ant - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: with refid to support further narrowing
Posted by Raja Nagendra Kumar <Na...@tejasoft.com>.
Is it possible to convert the restricted files into new fileset with xyz id.
We need fileset, because the task we are using supports only fileset as
nested element.
Regards,
Nagendra
Raja Nagendra Kumar wrote:
>
> Stefan.. You are our ready reference of what ever I think ant could/should
> provide/be..
>
> Thank you once again.
>
> Regards,
> Nagendra
>
> Stefan Bodewig wrote:
>>
>> On 2010-02-02, Raja Nagendra Kumar <Na...@tejasoft.com> wrote:
>>
>>> <fileset refid="src.select.patterns" >
>>> <include name="**/*ApplicationManager.java"/>
>>
>>> </fileset>
>>
>>> Would be possible to fileset or any resource collection, when refered
>>> through a reference, can this be further narrowed using the <include>
>>> and
>>> <exclude>
>>
>> Yes, see the <restrict> resource collection (and the <name> selectors).
>>
>> <restrict>
>> <fileset refid="src.select.patterns"/>
>> <name name="**/*ApplicationManager.java"/>
>> </restrict>
>>
>> Wrap <name> into <not> for excludes and use <and>/<or> to combine
>> multiple selectors.
>>
>> Stefan
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>> For additional commands, e-mail: user-help@ant.apache.org
>>
>>
>>
>
>
--
View this message in context: http://old.nabble.com/%3Cfileset%3E-with-refid-to-support-further-narrowing-tp27417405p27436269.html
Sent from the Ant - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: with refid to support further narrowing
Posted by Raja Nagendra Kumar <Na...@tejasoft.com>.
Stefan.. You are our ready reference of what ever I think ant could/should
provide/be..
Thank you once again.
Regards,
Nagendra
Stefan Bodewig wrote:
>
> On 2010-02-02, Raja Nagendra Kumar <Na...@tejasoft.com> wrote:
>
>> <fileset refid="src.select.patterns" >
>> <include name="**/*ApplicationManager.java"/>
>
>> </fileset>
>
>> Would be possible to fileset or any resource collection, when refered
>> through a reference, can this be further narrowed using the <include> and
>> <exclude>
>
> Yes, see the <restrict> resource collection (and the <name> selectors).
>
> <restrict>
> <fileset refid="src.select.patterns"/>
> <name name="**/*ApplicationManager.java"/>
> </restrict>
>
> Wrap <name> into <not> for excludes and use <and>/<or> to combine
> multiple selectors.
>
> Stefan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
>
--
View this message in context: http://old.nabble.com/%3Cfileset%3E-with-refid-to-support-further-narrowing-tp27417405p27423396.html
Sent from the Ant - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: with refid to support further narrowing
Posted by Stefan Bodewig <bo...@apache.org>.
On 2010-02-02, Raja Nagendra Kumar <Na...@tejasoft.com> wrote:
> <fileset refid="src.select.patterns" >
> <include name="**/*ApplicationManager.java"/>
> </fileset>
> Would be possible to fileset or any resource collection, when refered
> through a reference, can this be further narrowed using the <include> and
> <exclude>
Yes, see the <restrict> resource collection (and the <name> selectors).
<restrict>
<fileset refid="src.select.patterns"/>
<name name="**/*ApplicationManager.java"/>
</restrict>
Wrap <name> into <not> for excludes and use <and>/<or> to combine
multiple selectors.
Stefan
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org