ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Newsham" <jnews...@referentia.com>
Subject RE: produce list of directories with <ivy:buildlist/>?
Date Wed, 07 Jan 2009 21:30:09 GMT


Nevermind.  The problem wasn't with pathconvert... my ant target was
improperly written.  I now have it working with pathconvert.  Still don't
know how to do it with just ivy:buildlist, but not such a big deal anymore.

Thanks,
Jim

P.S.  Here's the ant target in case this helps anyone:

  <target name="publish-all" depends="init-ivy, clean-ivy, sync-source">
    <ivy:buildlist root="${root}" reference="publish-all-ivys-ref">
      <fileset dir="." includes="*/ivy.xml"/>
    </ivy:buildlist>
    <pathconvert property="publish-all-dirs-path">
      <mapper type="regexp" from="(.*)\\ivy\.xml" to="\1"/>
      <path refid="publish-all-ivys-ref"/>
    </pathconvert>
    <subant genericantfile="common-build.xml" target="publish"
buildpath="${publish-all-dirs-path}"/>
  </target>


> -----Original Message-----
> From: Jim Newsham [mailto:jnewsham@referentia.com]
> Sent: Wednesday, January 07, 2009 11:16 AM
> To: ivy-user@ant.apache.org
> Subject: produce list of directories with <ivy:buildlist/>?
> 
> 
> 
> Hi,
> 
> 
> 
> I need to produce a path which contains a list of directories (not
> build.xml
> files) for use with <subant genericantfile="."/>.
> 
> 
> 
> I got <ivy:buildlist/> to work in the case where each directory contains
> build.xml and ivy.xml files, invoking subant for the task results.  More
> recently, I tried using <ivy:buildlist/> for a situation where I have
> directories containing just ivy.xml, and a single build.xml located
> elsewhere (for use with <subant genericantfile="."/>).  I could not figure
> out the magic incantation for <ivy:buildlist/> to produce a list of
> directories to pass to subant.  Instead, the best I could do was get back
> a
> list of ivy.xml files, and then use ant's <pathconvert/> to convert these
> paths to a list of the corresponding parent directories.  I passed this
> path
> to subant, and all seemed well.  until I added another module (dir +
> ivy.xml), and discovered that the subant calls were happening in the wrong
> order.  It turns out that <pathconvert/> is producing a path in a
> different
> order than the list which I passed to it :(.
> 
> 
> 
> Anyone know how to do this?  Might be possible with just <ivy:buildlist/>
> and not using <pathconvert/>, I just couldn't get it working for me.
> 
> 
> 
> Thanks,
> 
> Jim Newsham




Mime
View raw message