You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Serge Huber <sh...@jahia.com> on 2004/10/01 14:44:50 UTC

Iterating through directories

How does one iterate through directories in a Maven Jelly script ?

I found the following resource to iterate through FILES in a directory :
http://wiki.astrogrid.org/bin/view/Astrogrid/UsefulMavenNotes#Iterating_through_a_list_of_file

but what I need to do is simply get the list of subdirectories for a 
given parent directory, and then iterate through them using a <forEach> 
tag. I've tried replacing the <fileset> in the above resource with a 
<dirset> but it seems that the <ant:fileScanner> doesn't allow this.

Or maybe I'm completely off and there is a way to do this with Jelly 
instead of Ant ?

Regards,
  Serge Huber.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Iterating through directories

Posted by dan tran <da...@gmail.com>.
check out maven-jbuilder-plugin's plugin.jelly

-Dan


On Fri, 01 Oct 2004 14:44:50 +0200, Serge Huber <sh...@jahia.com> wrote:
> 
> How does one iterate through directories in a Maven Jelly script ?
> 
> I found the following resource to iterate through FILES in a directory :
> http://wiki.astrogrid.org/bin/view/Astrogrid/UsefulMavenNotes#Iterating_through_a_list_of_file
> 
> but what I need to do is simply get the list of subdirectories for a
> given parent directory, and then iterate through them using a <forEach>
> tag. I've tried replacing the <fileset> in the above resource with a
> <dirset> but it seems that the <ant:fileScanner> doesn't allow this.
> 
> Or maybe I'm completely off and there is a way to do this with Jelly
> instead of Ant ?
> 
> Regards,
>  Serge Huber.
> 
> ---------------------------------------------------------------------
> 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: Iterating through directories

Posted by Dion Gillard <di...@gmail.com>.
If you loop through the files as in the astrogrid reference, you can
then test each file object to see if it's a directory, e.g. <c:if
test="${file.directory}">....</c:if>


On Fri, 01 Oct 2004 14:44:50 +0200, Serge Huber <sh...@jahia.com> wrote:
> 
> How does one iterate through directories in a Maven Jelly script ?
> 
> I found the following resource to iterate through FILES in a directory :
> http://wiki.astrogrid.org/bin/view/Astrogrid/UsefulMavenNotes#Iterating_through_a_list_of_file
> 
> but what I need to do is simply get the list of subdirectories for a
> given parent directory, and then iterate through them using a <forEach>
> tag. I've tried replacing the <fileset> in the above resource with a
> <dirset> but it seems that the <ant:fileScanner> doesn't allow this.
> 
> Or maybe I'm completely off and there is a way to do this with Jelly
> instead of Ant ?
> 
> Regards,
>   Serge Huber.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 



-- 
http://www.multitask.com.au/people/dion/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org