You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Ryan H." <wa...@gmail.com> on 2008/02/15 01:41:18 UTC

Why does maven2 not provide "iteration" or "foreach" language feature?

Why does maven2 not provide "iteration" or "foreach" language feature?

Re: Why does maven2 not provide "iteration" or "foreach" language feature?

Posted by Wayne Fay <wa...@gmail.com>.
You will simply need to write a plugin.

Wayne

On 2/15/08, Ryan H. <wa...@gmail.com> wrote:
> Okay, here is an example of a legacy maven1 goal. You can see how easily it
> can be done in the "iteration" language feature provided by jelly script.
> I'm scratching my head as to how the same can be done in maven2 (easily)
> without writing a plug-in or changing the perl script that is invoked
> against each file.
>
>
>
> <goal name="foo_goal" >
>
> <fileScanner var="testFiles">
>
> <fileset dir="${pom.build.unitTestSourceDirectory}"
>
> includes="**/*Test.java"/>
>
> </fileScanner>
>
> <j:forEach var="file" items="${testFiles.iterator()}" trim="yes">
>
> <echo message="running TestCase: ${file}"/>
>
> <exec executable="perl">
>
> <arg value="${maven.test.dest}/bin/mytest.pl"/>
>
> <arg value="${file}"/>
>
> <arg value="${maven.test.dest}/"/>
>
> </exec>
>
> </j:forEach>
>
> </goal>
>
> On 2/14/08, Wayne Fay <wa...@gmail.com> wrote:
>
> > Please describe what you're trying to do and why, and perhaps someone
> > can help you figure out a way to do it using features that Maven does
> > support.
> >
> > Wayne
> >
> > On Thu, Feb 14, 2008 at 6:41 PM, Ryan H. <wa...@gmail.com> wrote:
> > > Why does maven2 not provide "iteration" or "foreach" language feature?
> > >
> >
> > ---------------------------------------------------------------------
> > 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: Why does maven2 not provide "iteration" or "foreach" language feature?

Posted by "Ryan H." <wa...@gmail.com>.
Okay, here is an example of a legacy maven1 goal. You can see how
easily it can be done in the "iteration" language feature provided by
jelly script. I'm scratching my head as to how the same can be done in
maven2 (easily) without writing a plug-in or changing the perl script
that is invoked against each file.


<goal name="foo_goal" >
<fileScanner var="testFiles">
<fileset dir="${pom.build.unitTestSourceDirectory}" includes="**/*Test.java"/>
</fileScanner>
<j:forEach var="file" items="${testFiles.iterator()}" trim="yes">
<echo message="running TestCase: ${file}"/>
<exec executable="perl">
<arg value="${maven.test.dest}/bin/mytest.pl"/>
<arg value="${file}"/>
<arg value="${maven.test.dest}/"/>
</exec>
</j:forEach>
</goal>



>
> On 2/14/08, Wayne Fay <wa...@gmail.com> wrote:
> > Please describe what you're trying to do and why, and perhaps someone
> > can help you figure out a way to do it using features that Maven does
> > support.
> >
> > Wayne
> >
> > On Thu, Feb 14, 2008 at 6:41 PM, Ryan H. <wa...@gmail.com> wrote:
> > > Why does maven2 not provide "iteration" or "foreach" language feature?
> > >
> >
> > ---------------------------------------------------------------------
> > 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: Why does maven2 not provide "iteration" or "foreach" language feature?

Posted by "Ryan H." <wa...@gmail.com>.
Okay, here is an example of a legacy maven1 goal. You can see how easily it
can be done in the "iteration" language feature provided by jelly script.
I'm scratching my head as to how the same can be done in maven2 (easily)
without writing a plug-in or changing the perl script that is invoked
against each file.



<goal name="foo_goal" >

<fileScanner var="testFiles">

<fileset dir="${pom.build.unitTestSourceDirectory}"

includes="**/*Test.java"/>

</fileScanner>

<j:forEach var="file" items="${testFiles.iterator()}" trim="yes">

<echo message="running TestCase: ${file}"/>

<exec executable="perl">

<arg value="${maven.test.dest}/bin/mytest.pl"/>

<arg value="${file}"/>

<arg value="${maven.test.dest}/"/>

</exec>

</j:forEach>

</goal>

On 2/14/08, Wayne Fay <wa...@gmail.com> wrote:

> Please describe what you're trying to do and why, and perhaps someone
> can help you figure out a way to do it using features that Maven does
> support.
>
> Wayne
>
> On Thu, Feb 14, 2008 at 6:41 PM, Ryan H. <wa...@gmail.com> wrote:
> > Why does maven2 not provide "iteration" or "foreach" language feature?
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Why does maven2 not provide "iteration" or "foreach" language feature?

Posted by Wayne Fay <wa...@gmail.com>.
Please describe what you're trying to do and why, and perhaps someone
can help you figure out a way to do it using features that Maven does
support.

Wayne

On Thu, Feb 14, 2008 at 6:41 PM, Ryan H. <wa...@gmail.com> wrote:
> Why does maven2 not provide "iteration" or "foreach" language feature?
>

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