All,
     This is what I want to do.

Assuming I 've a properties file as follows.

COMP=
VIEW=
TM_VIEW=system_TM_1.0_integration
SHARED_VIEW=system_SHARED_1.0_integration
CF_VIEW=system_CF_1.0_integration

     I want to supply two values in the command line parameter, like ant
-DVIEW=system_TM_1.0_integration -DCOMP=COMP_TM, and based on that I want
to do the following

<target name="jar" >
     <jar jarfile="/view/${VIEW}/${ROOT_DIR}/${COMP}/${COMP}.jar">
     <fileset dir="/view/${VIEW}/${ROOT_DIR}/${COMP}">
     <include name="**/*.class"/>
     </fileset>
     </jar>

     Here, I need to copy a file from a directory using each variable defined in the 
properties file. Out of these variables one variable is used in
the above target "jar"
and I  want to copy from a different path for that variable alone but the rest from 
the path which has similar pattern. I want to check for the jar
file created in the "jar" target
above and copy that jar for that varibale alone and for the rest copy the files as 
instructed below.

For example, in this case,

     <copy file="${system_TM_1.0_integration}/file" todir="
${CODE_BASE}../"/> --------------> I don't want to copy here and skip this
     <copy file="${system_SHARED_1.0_integration}/file" todir="
${CODE_BASE}../"/>
     <copy file="${system_CF_1.0_integration}/file" todir="
${CODE_BASE}../"/>

One thing I thought of is using the <available> to check for the jar file
created in jar target and call some three targets to do the copy, by
skipping the one I want to. But, something tells me there might be a easy
way. Infact, I 've some 6 variables which are used in this copy business.
I guess, what I need here is something like,

<if>
     <fileavailable >
<then>
     <copythis>
<else>
     <copythis>
and do this for every copy task, I have.

I would appreciate any help with this. If this is not a good idea, I am
open for any suggestion. If I didn't make this clear, please let me know. I
will try to explain better.

Thanks in advance.

Kailash













--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to