• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

moving files via ant

 
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i have a war hidden at a sublevel with a directory 'Axx'(C:\Axx\output\classes\lib\*.war).
This needs to need to be copied over to the root loaction of dir 'Bxx'.

If I write a ant move task as:
<move todir="${deploy_dir}">
<fileset dir="${output_dir}">
<include name="**/*.war"/>
</fileset>
</move>
This would copy over but maintain the directory structure rather than put in under C:\Bxx.
I can do a hard-coding of the full path;but i would rather avoid that.

Is there some way possible to achive this 'move' without resorting to hard-coding of the entire path to the file?

 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try adding the "flatten" attribute to the copy task.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic