You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Vijay V <vi...@oracle.com> on 2004/07/15 22:14:27 UTC
find all files in given directory and iterate
Hi,
I have to figure out from a given directory if a particular type of file
exists
Say there is a directory by name com/times and say there are files by name
Bundle.java
Bundle_en.java
Bundle_en_us.java
I will have to figure out if a file by name say Bundle_en.java exists.
So basically is there a way to get all the files present in a given
directory and then to iterate over it.
Is there a tag which i can use?
Regards,
Vijay V
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: automatic reporting of Build failure through email
Posted by Paul Spencer <pa...@mindspring.com>.
Why write it. I use CruiseControl.
http://cruisecontrol.sourceforge.net/
http://maven.apache.org/reference/plugins/cruisecontrol/
Paul Spencer
Jagadeesh Danala wrote:
> Hi
>
> I was trying to setup a nightly build system for the my project. I want
> an email to be sent when the build fails on a project.
> I was able to send test reports when tests fail but that doesnt include
> failures due to missing dependencies or compile errors.
>
> I would be grateful if someone can let me know how to write the goal
> that lets me send the email.
>
> Thanks and Regards
> Jagadeesh
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: automatic reporting of Build failure through email
Posted by Brett Porter <br...@gmail.com>.
The gump plugin is only to get your project running under gump. You'd
still have to set up gump. This is the same as for Cruise control
(which has a Maven plugin to generate configuration).
Trust me on this - cruise control is going to be easier to set up and
use day-to-day than gump by far :)
Cheers,
Brett
On Fri, 16 Jul 2004 09:58:54 -0400, Jagadeesh Danala <da...@seis.sc.edu> wrote:
> Hi Brett,
>
> Thank you for your reply. I have already given a thought about that. But
> wanted to ensure if there was a way I could do that through maven..
> How about the gump plugin for maven? I didnt find much documentation
> about how it can be used to accomplish the task of mailing the build
> results.
>
> Regards
> Jagadeesh.
>
>
>
> Brett Porter wrote:
>
> >In Maven 1.0 this is somewhat difficult, other than writing a shell
> >script wrapper that pipes the output to a mail program if the return
> >code was not 0.
> >
> >I use cruise control - it does a good job.
> >
> >- Brett
> >
> >On Thu, 15 Jul 2004 17:08:47 -0400, Jagadeesh Danala <da...@seis.sc.edu> wrote:
> >
> >
> >>Hi
> >>
> >>I was trying to setup a nightly build system for the my project. I want
> >>an email to be sent when the build fails on a project.
> >>I was able to send test reports when tests fail but that doesnt include
> >>failures due to missing dependencies or compile errors.
> >>
> >>I would be grateful if someone can let me know how to write the goal
> >>that lets me send the email.
> >>
> >>Thanks and Regards
> >>Jagadeesh
> >>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >>For additional commands, e-mail: users-help@maven.apache.org
> >>
> >>
> >>
> >>
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: automatic reporting of Build failure through email
Posted by Jagadeesh Danala <da...@seis.sc.edu>.
Hi Brett,
Thank you for your reply. I have already given a thought about that. But
wanted to ensure if there was a way I could do that through maven..
How about the gump plugin for maven? I didnt find much documentation
about how it can be used to accomplish the task of mailing the build
results.
Regards
Jagadeesh.
Brett Porter wrote:
>In Maven 1.0 this is somewhat difficult, other than writing a shell
>script wrapper that pipes the output to a mail program if the return
>code was not 0.
>
>I use cruise control - it does a good job.
>
>- Brett
>
>On Thu, 15 Jul 2004 17:08:47 -0400, Jagadeesh Danala <da...@seis.sc.edu> wrote:
>
>
>>Hi
>>
>>I was trying to setup a nightly build system for the my project. I want
>>an email to be sent when the build fails on a project.
>>I was able to send test reports when tests fail but that doesnt include
>>failures due to missing dependencies or compile errors.
>>
>>I would be grateful if someone can let me know how to write the goal
>>that lets me send the email.
>>
>>Thanks and Regards
>>Jagadeesh
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>>
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>For additional commands, e-mail: users-help@maven.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: automatic reporting of Build failure through email
Posted by Brett Porter <br...@gmail.com>.
In Maven 1.0 this is somewhat difficult, other than writing a shell
script wrapper that pipes the output to a mail program if the return
code was not 0.
I use cruise control - it does a good job.
- Brett
On Thu, 15 Jul 2004 17:08:47 -0400, Jagadeesh Danala <da...@seis.sc.edu> wrote:
> Hi
>
> I was trying to setup a nightly build system for the my project. I want
> an email to be sent when the build fails on a project.
> I was able to send test reports when tests fail but that doesnt include
> failures due to missing dependencies or compile errors.
>
> I would be grateful if someone can let me know how to write the goal
> that lets me send the email.
>
> Thanks and Regards
> Jagadeesh
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
automatic reporting of Build failure through email
Posted by Jagadeesh Danala <da...@seis.sc.edu>.
Hi
I was trying to setup a nightly build system for the my project. I want
an email to be sent when the build fails on a project.
I was able to send test reports when tests fail but that doesnt include
failures due to missing dependencies or compile errors.
I would be grateful if someone can let me know how to write the goal
that lets me send the email.
Thanks and Regards
Jagadeesh
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: find all files in given directory and iterate
Posted by Vijay V <vi...@oracle.com>.
Hi Gilles,
Thanks a lot for showing me how it can be accomplished. I was able to
finish my work :-)
Cheers,
Vijay V
Gilles Dodinet wrote:
> Vijay V wrote:
>
>> Hi,
>> I have to figure out from a given directory if a particular type of
>> file exists
>> Say there is a directory by name com/times and say there are files by
>> name
>> Bundle.java
>> Bundle_en.java
>> Bundle_en_us.java
>>
>> I will have to figure out if a file by name say Bundle_en.java
>> exists. So basically is there a way to get all the files present in a
>> given directory and then to iterate over it.
>>
>> Is there a tag which i can use?
>
>
>
> Vijay,
>
> you can use <ant:filescanner/> for that , something like the following :
>
> <ant:fileScanner var="bundles">
> <fileset dir="${basedir}/src/main/resources"
> includes="**/Bundle*.java" />
> </fileset>
> </ant:fileScanner>
> <j:forEach items="${bundles.iterator()}" var="bundleName">
> <!-- dostuff with bundleName -->
> </j:forEach>
>
>
> -- gd
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: find all files in given directory and iterate
Posted by Gilles Dodinet <rh...@free.fr>.
Vijay V wrote:
> Hi,
> I have to figure out from a given directory if a particular type of
> file exists
> Say there is a directory by name com/times and say there are files by
> name
> Bundle.java
> Bundle_en.java
> Bundle_en_us.java
>
> I will have to figure out if a file by name say Bundle_en.java exists.
> So basically is there a way to get all the files present in a given
> directory and then to iterate over it.
>
> Is there a tag which i can use?
Vijay,
you can use <ant:filescanner/> for that , something like the following :
<ant:fileScanner var="bundles">
<fileset dir="${basedir}/src/main/resources" includes="**/Bundle*.java" />
</fileset>
</ant:fileScanner>
<j:forEach items="${bundles.iterator()}" var="bundleName">
<!-- dostuff with bundleName -->
</j:forEach>
-- gd
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org