You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Miroslav Šulc <mi...@startnet.cz> on 2007/07/30 18:17:56 UTC
Using
Hi,
I am not very experienced with ant. I have several targets, each for
source code checks. These targets are 'pmd', 'cpd' and 'checkstyle'. All
the corresponding tasks support <fileset> element. My project consists
of tens of subprojects. What I want to achieve is to define the set of
sources at one place and then just reference it from those <pmd>, <cpd>
and <checkstyle> tasks. What is the correct way? I thought I can use
something like this:
<union id="all.source.files">
<fileset dir="..." includes="..."/>
<fileset dir="..." includes="..."/>
<fileset dir="..." includes="..."/>
<fileset dir="..." includes="..."/>
...
</union>
<target name="pmd">
<pmd>
<fileset refid="all.source.files"/>
</pmd>
</target>
but that doesn't work. I tried even other things that came to my mind
but none of them worked. I'm not even sure that what I want to achieve
is achievable with current <pmd>, <cpd> and <checkstyle> tasks or they
have to be enhanced to support unions or sets of filesets.
Thanks for any suggestions.
--
Miroslav Šulc
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Using
Posted by Peter Reilly <pe...@gmail.com>.
On 7/31/07, Miroslav Šulc <mi...@startnet.cz> wrote:
> What would this do? Replace <all-source-files/> with the <fileset>s? If
> so, that would be great :-)
Yep, that is the idea.
Peter
>
> --
> Miroslav Šulc
>
>
> Peter Reilly napsal(a):
> > I am "working" (in the to-do queue) on a enhanced version of <macrodef>
> > allows nearly arbitrary fragments of xml to be marcodef'ed.
> > see:
> > http://issues.apache.org/bugzilla/show_bug.cgi?id=40678
> >
> > This should address your use case:
> > <macrodef name="all-source-files">
> > <fragment>
> > <fileset dir="..." includes="..."/>
> > <fileset dir="..." includes="..."/>
> > <fileset dir="..." includes="..."/>
> > </fragment>
> > </macrodef>
> >
> > <target name="pmd">
> > <pmd>
> > <all-source-files/>
> > </pmd>
> > </target>
> >
> > Peter
> >
> > On 7/30/07, Miroslav Šulc <mi...@startnet.cz> wrote:
> >
> >> thx, at least now I know it's not possible :-)
> >>
> >> --
> >> Miroslav Šulc
> >>
> >>
> >> Peter Reilly napsal(a):
> >>
> >>> I do not think that this is currently possible.
> >>>
> >>> Peter
> >>>
> >>>
> >>> On 7/30/07, Miroslav Šulc <mi...@startnet.cz> wrote:
> >>>
> >>>
> >>>> Hi,
> >>>>
> >>>> I am not very experienced with ant. I have several targets, each for
> >>>> source code checks. These targets are 'pmd', 'cpd' and 'checkstyle'. All
> >>>> the corresponding tasks support <fileset> element. My project consists
> >>>> of tens of subprojects. What I want to achieve is to define the set of
> >>>> sources at one place and then just reference it from those <pmd>, <cpd>
> >>>> and <checkstyle> tasks. What is the correct way? I thought I can use
> >>>> something like this:
> >>>>
> >>>> <union id="all.source.files">
> >>>> <fileset dir="..." includes="..."/>
> >>>> <fileset dir="..." includes="..."/>
> >>>> <fileset dir="..." includes="..."/>
> >>>> <fileset dir="..." includes="..."/>
> >>>> ...
> >>>> </union>
> >>>>
> >>>> <target name="pmd">
> >>>> <pmd>
> >>>> <fileset refid="all.source.files"/>
> >>>> </pmd>
> >>>> </target>
> >>>>
> >>>> but that doesn't work. I tried even other things that came to my mind
> >>>> but none of them worked. I'm not even sure that what I want to achieve
> >>>> is achievable with current <pmd>, <cpd> and <checkstyle> tasks or they
> >>>> have to be enhanced to support unions or sets of filesets.
> >>>>
> >>>> Thanks for any suggestions.
> >>>>
> >>>> --
> >>>> Miroslav Šulc
>
> ---------------------------------------------------------------------
> 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: Using
Posted by Miroslav Šulc <mi...@startnet.cz>.
What would this do? Replace <all-source-files/> with the <fileset>s? If
so, that would be great :-)
--
Miroslav Šulc
Peter Reilly napsal(a):
> I am "working" (in the to-do queue) on a enhanced version of <macrodef>
> allows nearly arbitrary fragments of xml to be marcodef'ed.
> see:
> http://issues.apache.org/bugzilla/show_bug.cgi?id=40678
>
> This should address your use case:
> <macrodef name="all-source-files">
> <fragment>
> <fileset dir="..." includes="..."/>
> <fileset dir="..." includes="..."/>
> <fileset dir="..." includes="..."/>
> </fragment>
> </macrodef>
>
> <target name="pmd">
> <pmd>
> <all-source-files/>
> </pmd>
> </target>
>
> Peter
>
> On 7/30/07, Miroslav Šulc <mi...@startnet.cz> wrote:
>
>> thx, at least now I know it's not possible :-)
>>
>> --
>> Miroslav Šulc
>>
>>
>> Peter Reilly napsal(a):
>>
>>> I do not think that this is currently possible.
>>>
>>> Peter
>>>
>>>
>>> On 7/30/07, Miroslav Šulc <mi...@startnet.cz> wrote:
>>>
>>>
>>>> Hi,
>>>>
>>>> I am not very experienced with ant. I have several targets, each for
>>>> source code checks. These targets are 'pmd', 'cpd' and 'checkstyle'. All
>>>> the corresponding tasks support <fileset> element. My project consists
>>>> of tens of subprojects. What I want to achieve is to define the set of
>>>> sources at one place and then just reference it from those <pmd>, <cpd>
>>>> and <checkstyle> tasks. What is the correct way? I thought I can use
>>>> something like this:
>>>>
>>>> <union id="all.source.files">
>>>> <fileset dir="..." includes="..."/>
>>>> <fileset dir="..." includes="..."/>
>>>> <fileset dir="..." includes="..."/>
>>>> <fileset dir="..." includes="..."/>
>>>> ...
>>>> </union>
>>>>
>>>> <target name="pmd">
>>>> <pmd>
>>>> <fileset refid="all.source.files"/>
>>>> </pmd>
>>>> </target>
>>>>
>>>> but that doesn't work. I tried even other things that came to my mind
>>>> but none of them worked. I'm not even sure that what I want to achieve
>>>> is achievable with current <pmd>, <cpd> and <checkstyle> tasks or they
>>>> have to be enhanced to support unions or sets of filesets.
>>>>
>>>> Thanks for any suggestions.
>>>>
>>>> --
>>>> Miroslav Šulc
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Using
Posted by Peter Reilly <pe...@gmail.com>.
I am "working" (in the to-do queue) on a enhanced version of <macrodef>
allows nearly arbitrary fragments of xml to be marcodef'ed.
see:
http://issues.apache.org/bugzilla/show_bug.cgi?id=40678
This should address your use case:
<macrodef name="all-source-files">
<fragment>
<fileset dir="..." includes="..."/>
<fileset dir="..." includes="..."/>
<fileset dir="..." includes="..."/>
</fragment>
</macrodef>
<target name="pmd">
<pmd>
<all-source-files/>
</pmd>
</target>
Peter
On 7/30/07, Miroslav Šulc <mi...@startnet.cz> wrote:
> thx, at least now I know it's not possible :-)
>
> --
> Miroslav Šulc
>
>
> Peter Reilly napsal(a):
> > I do not think that this is currently possible.
> >
> > Peter
> >
> >
> > On 7/30/07, Miroslav Šulc <mi...@startnet.cz> wrote:
> >
> >> Hi,
> >>
> >> I am not very experienced with ant. I have several targets, each for
> >> source code checks. These targets are 'pmd', 'cpd' and 'checkstyle'. All
> >> the corresponding tasks support <fileset> element. My project consists
> >> of tens of subprojects. What I want to achieve is to define the set of
> >> sources at one place and then just reference it from those <pmd>, <cpd>
> >> and <checkstyle> tasks. What is the correct way? I thought I can use
> >> something like this:
> >>
> >> <union id="all.source.files">
> >> <fileset dir="..." includes="..."/>
> >> <fileset dir="..." includes="..."/>
> >> <fileset dir="..." includes="..."/>
> >> <fileset dir="..." includes="..."/>
> >> ...
> >> </union>
> >>
> >> <target name="pmd">
> >> <pmd>
> >> <fileset refid="all.source.files"/>
> >> </pmd>
> >> </target>
> >>
> >> but that doesn't work. I tried even other things that came to my mind
> >> but none of them worked. I'm not even sure that what I want to achieve
> >> is achievable with current <pmd>, <cpd> and <checkstyle> tasks or they
> >> have to be enhanced to support unions or sets of filesets.
> >>
> >> Thanks for any suggestions.
> >>
> >> --
> >> Miroslav Šulc
>
> ---------------------------------------------------------------------
> 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: Using
Posted by Miroslav Šulc <mi...@startnet.cz>.
thx, at least now I know it's not possible :-)
--
Miroslav Šulc
Peter Reilly napsal(a):
> I do not think that this is currently possible.
>
> Peter
>
>
> On 7/30/07, Miroslav Šulc <mi...@startnet.cz> wrote:
>
>> Hi,
>>
>> I am not very experienced with ant. I have several targets, each for
>> source code checks. These targets are 'pmd', 'cpd' and 'checkstyle'. All
>> the corresponding tasks support <fileset> element. My project consists
>> of tens of subprojects. What I want to achieve is to define the set of
>> sources at one place and then just reference it from those <pmd>, <cpd>
>> and <checkstyle> tasks. What is the correct way? I thought I can use
>> something like this:
>>
>> <union id="all.source.files">
>> <fileset dir="..." includes="..."/>
>> <fileset dir="..." includes="..."/>
>> <fileset dir="..." includes="..."/>
>> <fileset dir="..." includes="..."/>
>> ...
>> </union>
>>
>> <target name="pmd">
>> <pmd>
>> <fileset refid="all.source.files"/>
>> </pmd>
>> </target>
>>
>> but that doesn't work. I tried even other things that came to my mind
>> but none of them worked. I'm not even sure that what I want to achieve
>> is achievable with current <pmd>, <cpd> and <checkstyle> tasks or they
>> have to be enhanced to support unions or sets of filesets.
>>
>> Thanks for any suggestions.
>>
>> --
>> Miroslav Šulc
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Using
Posted by Peter Reilly <pe...@gmail.com>.
I do not think that this is currently possible.
Peter
On 7/30/07, Miroslav Šulc <mi...@startnet.cz> wrote:
> Hi,
>
> I am not very experienced with ant. I have several targets, each for
> source code checks. These targets are 'pmd', 'cpd' and 'checkstyle'. All
> the corresponding tasks support <fileset> element. My project consists
> of tens of subprojects. What I want to achieve is to define the set of
> sources at one place and then just reference it from those <pmd>, <cpd>
> and <checkstyle> tasks. What is the correct way? I thought I can use
> something like this:
>
> <union id="all.source.files">
> <fileset dir="..." includes="..."/>
> <fileset dir="..." includes="..."/>
> <fileset dir="..." includes="..."/>
> <fileset dir="..." includes="..."/>
> ...
> </union>
>
> <target name="pmd">
> <pmd>
> <fileset refid="all.source.files"/>
> </pmd>
> </target>
>
> but that doesn't work. I tried even other things that came to my mind
> but none of them worked. I'm not even sure that what I want to achieve
> is achievable with current <pmd>, <cpd> and <checkstyle> tasks or they
> have to be enhanced to support unions or sets of filesets.
>
> Thanks for any suggestions.
>
> --
> Miroslav Šulc
>
>
> ---------------------------------------------------------------------
> 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