ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject AW: AW: copy
Date Thu, 18 Nov 2004 09:52:10 GMT
Not tried, but there are two different things combined in your statement:
- the selection of files to work on (<include> selector)
- how to handle these files (default setting of <move>)

The second you can modify with <mapper>s. E.g. the regexp-mapper could be
useful. Just a thought:
     <move todir="${maven.dist.src.assembly.dir}/sw/ant" overwrite="true">
         <fileset dir="${maven.dist.src.assembly.dir}">
             <include name="sw/apache-ant-*/**"/>
         </fileset>
         <regexpmapper from="sw/apache-ant-.*/" to=""/>
     </move>


Jan


> -----Urspr√ľngliche Nachricht-----
> Von: Franz-Josef Herpers [mailto:fjhPost@netscape.net]
> Gesendet am: Donnerstag, 18. November 2004 10:41
> An: Ant Users List
> Betreff: Re: AW: copy
> 
> Hi Jan,
> 
> thanks for your answer.
> 
> >Use the nested
> >  <include name="sw/apache-ant-*/"/>
> >without the trailing *, so Ant knows that that is a 
> directory and uses
> >the whole tree under that.
> >  
> >
> I now have
> 
>     <move todir="${maven.dist.src.assembly.dir}/sw/ant" 
> overwrite="true">
>       <fileset dir="${maven.dist.src.assembly.dir}">
>         <include name="sw/apache-ant-*/**"/>
>       </fileset>
>     </move>
> 
> What I really want is to move every descendent directory and 
> file under 
> sw/apache-ant-* to sw/ant. What I get with this is:
> 
> sw/ant/sw/apache-ant-*/**
> 
> But I want sw/ant/[everything under sw/apache-ant*].
> 
> If I try
> 
> <include name="apache-ant-*/**"/>
> 
> I get
> 
> sw/ant/apache-ant*/**
> 
> So if I could do this
> 
>   <move todir="${maven.dist.src.assembly.dir}/sw/ant" 
> overwrite="true">
>      <fileset dir="${maven.dist.src.assembly.dir}/sw/apache-ant-*/">
>        <include name="*/**"/>
>      </fileset>
>    </move>
> 
> it would probably work, but of course it doesn't the way I want it.
> 
> Any more suggestions?
> 
> Thanks
> Franz
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message