Limited Time Offer!

For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!

Enroll Now

How to Resolve Apache Ant Copy and Include Issues – Ant Guide

issues-in-apache-ant

issues-in-apache-ant

Question: Why Copy in ant is not working if I am putting includes separately?
Ant version: Apache Ant version 1.5.4 compiled on January 8 2005.

Program 1 is not working and Program 2 is working.  I guess both programs are correct..
Program1:
<copy todir=”${Temp}/uaw/Uaw_compilescripts”>
<fileset dir=”${SVNCheckout}/scripts/compilescripts” >
<include name=”BuildSh,Compsh,vsamc,buildc.sh,script,compl2,main.sh,makefile,makepl1,script”/>

</fileset>
</copy>

Program2:

<copy todir=”${Temp}/uaw/Uaw_compilescripts”>
<fileset dir=”${SVNCheckout}/scripts/compilescripts” includes=”BuildSh,Compsh,vsamc,buildc.sh,script,compl2,main.sh,makefile,makepl1,script” />
</copy>

ANSWER

Because <include name=”> does not split up the name using ‘,’
You need to have :
<include name=”BuildSh”/>
<include name=”Compsh”/>
<include name=”vsamc”/>

etc..

Rajesh Kumar
Follow me
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x