ant copy with flatten directories

reference to Copy Task

e.g.
original file structure:
libs
-log4j.jar
+ws
-jaxws-api.jar
-saaj-api.jar
+junit
 -junit.jar

to:

build
-log4j.jar
-jaxws-api.jar
-saaj-api.jar
-junit.jar

script:

<copy todir="${build}" flatten="true">
  <fileset dir="${lib.dir}">
  <include name="**/*.jar"/>
</fileset>
</copy>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s