I would like to copy files with certain extensions (normally the destination 
environment is used to determine the file extension) to a location and strip 
off the extensions. But I currently resort to using the copy tasks with the 
file and tofile attributes to accomplish this as in the example below. But the 
problem is that every time a new application is introduced into the equation, 
its jar file, as in app2, needs to be copied too, therefore, I will end up 
having so many copy statements.  Is there anyway to use filemapper, globmapper 
or any tasks to accomplish what I'm trying to do?

 

<copy file="${dist}/app1.war.qa" 
tofile="${local.dir}/${build.version}.${build.number}/qa/${appname}.war" 
overwrite="true"/>


<copy file="${dist}/app1.jar.qa" 
tofile="${local.dir}/${build.version}.${build.number}/qa/${appname}.jar" 
overwrite="true"/>


<copy file="${dist}/app2.jar.qa" 
tofile="${local.dir}/${build.version}.${build.number}/qa/${appname}.jar" 
overwrite="true"/>
.
.
.

How can I turn the above example into one copy task like 

 

<copy file="${dist}/*.war.*" 
tofile="${local.dir}/${build.version}.${build.number}/qa/${appname}.war" 
overwrite="true"/>

 

Obviously I can't use the todir attribute because it's going to copy the files 
with their extensions intact.

 

Thanks
                                          
_________________________________________________________________
Hotmail: Free, trusted and rich email service.
http://clk.atdmt.com/GBL/go/201469228/direct/01/

Reply via email to