You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by nicolas De Loof <ni...@cgey.com> on 2004/03/22 14:39:01 UTC

[jelly] howto loop against files in some dir ?

Hello,

I'm trying to write a maven plugin for the solex webapp test tool. 
(http://solex.sourceforge.net/)

Solex 0.5 defines a ant task to run a solex session. I'm able to use it 
and run a session from a simple maven plugin. I'd like to run it for all 
session files found in src/test-solex (something like is done for cactus 
and junit tests).

I don't know how to use ant or jelly tags to build a "foreach" from a 
fileset or anything else.

Can someone help me about that ?

Nico.

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


Re: [jelly] howto loop against files in some dir ?

Posted by nicolas De Loof <ni...@cgey.com>.
Thank you for help !

To solve this, I have extended the solex ant tag to accept a fileset. 
This way, I can build a XML repport with all sessions merged.

Nico.

Gilles Dodinet a écrit :

> nicolas,
>
> i think something like that should work :
>
> <ant:fileScanner var="solexSessions">
>   <ant:fileset dir="${solex.sessions.dir}" includes="*.*"/>
> </ant:fileScanner>
>
> <j:forEach var="solexSession" items="${solexSessions.iterator()}">
>   <!-- run solex session -->
> </j:forEach>
>
>
> hope this helps
>
> -- gd
>
> nicolas De Loof wrote:
>
>>>> Hello,
>>>>
>>>> I'm trying to write a maven plugin for the solex webapp test tool. 
>>>> (http://solex.sourceforge.net/)
>>>>
>>>> Solex 0.5 defines a ant task to run a solex session. I'm able to 
>>>> use it and run a session from a simple maven plugin. I'd like to 
>>>> run it for all session files found in src/test-solex (something 
>>>> like is done for cactus and junit tests).
>>>>
>>>> I don't know how to use ant or jelly tags to build a "foreach" from 
>>>> a fileset or anything else.
>>>>
>>>> Can someone help me about that ?
>>>>   
>>>
>>>
>
>
>
> ---------------------------------------------------------------------
> 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: [jelly] howto loop against files in some dir ?

Posted by Gilles Dodinet <rh...@free.fr>.
nicolas,

i think something like that should work :

<ant:fileScanner var="solexSessions">
   <ant:fileset dir="${solex.sessions.dir}" includes="*.*"/>
</ant:fileScanner>

<j:forEach var="solexSession" items="${solexSessions.iterator()}">
   <!-- run solex session -->
</j:forEach>


hope this helps

-- gd

nicolas De Loof wrote:

>>> Hello,
>>>
>>> I'm trying to write a maven plugin for the solex webapp test tool. 
>>> (http://solex.sourceforge.net/)
>>>
>>> Solex 0.5 defines a ant task to run a solex session. I'm able to use 
>>> it and run a session from a simple maven plugin. I'd like to run it 
>>> for all session files found in src/test-solex (something like is 
>>> done for cactus and junit tests).
>>>
>>> I don't know how to use ant or jelly tags to build a "foreach" from 
>>> a fileset or anything else.
>>>
>>> Can someone help me about that ?
>>>   
>>



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


Re: [jelly] howto loop against files in some dir ?

Posted by nicolas De Loof <ni...@cgey.com>.
As they're is allready a working solex ant task, and the required jelly 
script to use it is simple, I expected not to have to build some java 
classe to handle this.

Nico.

Jason van Zyl a écrit :

>On Mon, 2004-03-22 at 08:39, nicolas De Loof wrote:
>  
>
>>Hello,
>>
>>I'm trying to write a maven plugin for the solex webapp test tool. 
>>(http://solex.sourceforge.net/)
>>
>>Solex 0.5 defines a ant task to run a solex session. I'm able to use it 
>>and run a session from a simple maven plugin. I'd like to run it for all 
>>session files found in src/test-solex (something like is done for cactus 
>>and junit tests).
>>
>>I don't know how to use ant or jelly tags to build a "foreach" from a 
>>fileset or anything else.
>>
>>Can someone help me about that ?
>>    
>>
>
>I suggest you find the Java API for Solex, which it must have if it can
>be embedded in Eclipse, forget Ant and forget Jelly for the most part.
>Make yourself a small Java class to do what you want and use Jelly only
>as a harness to pull your Java class into Maven.
>
>  
>
>>Nico.
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>>For additional commands, e-mail: dev-help@maven.apache.org
>>    
>>
>
>  
>

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


Re: [jelly] howto loop against files in some dir ?

Posted by Jason van Zyl <jv...@maven.org>.
On Mon, 2004-03-22 at 08:39, nicolas De Loof wrote:
> Hello,
> 
> I'm trying to write a maven plugin for the solex webapp test tool. 
> (http://solex.sourceforge.net/)
> 
> Solex 0.5 defines a ant task to run a solex session. I'm able to use it 
> and run a session from a simple maven plugin. I'd like to run it for all 
> session files found in src/test-solex (something like is done for cactus 
> and junit tests).
> 
> I don't know how to use ant or jelly tags to build a "foreach" from a 
> fileset or anything else.
> 
> Can someone help me about that ?

I suggest you find the Java API for Solex, which it must have if it can
be embedded in Eclipse, forget Ant and forget Jelly for the most part.
Make yourself a small Java class to do what you want and use Jelly only
as a harness to pull your Java class into Maven.

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

-- 
jvz.

Jason van Zyl
jason@maven.org
http://maven.apache.org

happiness is like a butterfly: the more you chase it, the more it will
elude you, but if you turn your attention to other things, it will come
and sit softly on your shoulder ...

 -- Thoreau 


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