You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Deblauwe, Wim" <wi...@barco.com> on 2005/03/22 10:23:58 UTC

looping over dependencies not working

Hi,
 
does anybody know why this is not working:
 
  <ant:echo message="${pom.dependencies.getClass()}"/>
  <ant:echo message="There are ${size(pom.dependencies)} artifacts for this
project"/>
  <ant:echo message="list item class:
${pom.dependencies.get(0).getClass()}"/>
 
  <j:forEarch items="${pom.dependencies}" var="dep" indexVar="depNumber">
   <ant:echo message="-=- Dependency ${depNumber} -=-"/>
   <ant:echo message="${dep.groupId}"/>
   <ant:echo message="${dep.artifactId}"/>
   <ant:echo message="${dep.version}"/>
  </j:forEarch>

It prints out the following:
    [echo] class java.util.ArrayList
    [echo] There are 20 artifacts for this project
    [echo] list item class: class org.apache.maven.project.Dependency
-=- Dependency  -=-
    [echo]
    [echo]
    [echo]
BUILD SUCCESSFUL
 
Why does it not loop over the 20 dependencies??
 
regards,
 
Wim

  
Ing. Wim Deblauwe 
Software Development Engineer 
  
BarcoView - Medical Imaging Systems 
President Kennedypark 35 
B-8500 Kortrijk, Belgium 
Tel. +32 56 233 985 Fax +32 56 233 457 
www.barco.com <http://www.barco.com/>  
wim.deblauwe@barco.com <ma...@barco.com> 

 
- - - - - - - DISCLAIMER- - - - - - - -
Unless indicated otherwise, the information contained in this message is
privileged and confidential, and is intended only for the use of the
addressee(s) named above and others who have been specifically authorized to
receive it. If you are not the intended recipient, you are hereby notified
that any dissemination, distribution or copying of this message and/or
attachments is strictly prohibited. The company accepts no liability for any
damage caused by any virus transmitted by this email. Furthermore, the
company does not warrant a proper and complete transmission of this
information, nor does it accept liablility for any delays. If you have
received this message in error, please contact the sender and delete the
message. Thank you.

Re: looping over dependencies not working

Posted by Brett Porter <br...@gmail.com>.
because you spelled forEach wrong?

- Brett


On Tue, 22 Mar 2005 10:23:58 +0100, Deblauwe, Wim
<wi...@barco.com> wrote:
> Hi,
> 
> does anybody know why this is not working:
> 
>   <ant:echo message="${pom.dependencies.getClass()}"/>
>   <ant:echo message="There are ${size(pom.dependencies)} artifacts for this
> project"/>
>   <ant:echo message="list item class:
> ${pom.dependencies.get(0).getClass()}"/>
> 
>   <j:forEarch items="${pom.dependencies}" var="dep" indexVar="depNumber">
>    <ant:echo message="-=- Dependency ${depNumber} -=-"/>
>    <ant:echo message="${dep.groupId}"/>
>    <ant:echo message="${dep.artifactId}"/>
>    <ant:echo message="${dep.version}"/>
>   </j:forEarch>
> 
> It prints out the following:
>     [echo] class java.util.ArrayList
>     [echo] There are 20 artifacts for this project
>     [echo] list item class: class org.apache.maven.project.Dependency
> -=- Dependency  -=-
>     [echo]
>     [echo]
>     [echo]
> BUILD SUCCESSFUL
> 
> Why does it not loop over the 20 dependencies??
> 
> regards,
> 
> Wim
> 
> Ing. Wim Deblauwe
> Software Development Engineer
> 
> BarcoView - Medical Imaging Systems
> President Kennedypark 35
> B-8500 Kortrijk, Belgium
> Tel. +32 56 233 985 Fax +32 56 233 457
> www.barco.com <http://www.barco.com/>
> wim.deblauwe@barco.com <ma...@barco.com>
> 
> - - - - - - - DISCLAIMER- - - - - - - -
> Unless indicated otherwise, the information contained in this message is
> privileged and confidential, and is intended only for the use of the
> addressee(s) named above and others who have been specifically authorized to
> receive it. If you are not the intended recipient, you are hereby notified
> that any dissemination, distribution or copying of this message and/or
> attachments is strictly prohibited. The company accepts no liability for any
> damage caused by any virus transmitted by this email. Furthermore, the
> company does not warrant a proper and complete transmission of this
> information, nor does it accept liablility for any delays. If you have
> received this message in error, please contact the sender and delete the
> message. Thank you.
> 
>

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