Hi,

I have two xml file one with a target copy.dir.targetdir
that contain one patternset local_file_to_be_removed and a target ant
antfile to the second xml file.

targetdir.xml file .

 <target name="copy.dir.targetdir" depends="title" >
        <patternset id="local_file_to_be_removed" >
                <exclude name="**/*Ie/List/List.vbs"/>
        </patternset>

        <!-- Dir Number 1 !!!! MetaTemplates !!!! -->


<ant antfile="../copy.xml" target="copy.dir" dir=".">
        <property name="sources.dir"
value="${compile.directory}/MetaTemplates"/>
        <property name="destination.dir"
value="${global.destination.dir}/MetaTemplates"/>
        <property name="attrib.dir" value="-r"/>
        <property name="local.file.to.be.removed"
refid="local_file_to_be_removed"/>
</ant>
</target>       


in copy.xml I perform a copy target with the property from targetdir.xml.

        <target name="copy.dir.available" >
                
                <available file="${sources.dir}" property="source.exist"/>
                <patternset id="file_not_to_be_copy" >
                        <exclude name="**/*.bak"/>
                        <exclude name="**/create.dir"/>
                        <exclude name="**/*.scc"/>
                        <exclude name="**/*.lib"/>
                        <exclude name="**/*.ilk"/>
                        <exclude name="**/*.bdy"/>
                        <exclude name="**/*.hdr"/>
                        <exclude name="**/*.exp"/>
                </patternset>


        </target>


        <target name="copy.dir" depends="copy.dir.echo" if="source.exist">
                <!-- Sources -->
                <copy preservelastmodified="YES" overwrite="YES"
todir="${destination.dir}">
                        <fileset dir="${sources.dir}">
                                <patternset refid="file_not_to_be_copy"/>
                                <patternset
refid="local.file.to.be.removed"/>
                        </fileset>
                </copy>
                <record name="${success.log.file}" action="start" />
                <exec executable="cmd.exe" os="Windows 2000">
                        <arg line="/c attrib ${attrib.dir} /S"/>
                        <arg value="${destination.dir}/*.*"/>
                </exec>
                <exec executable="cmd.exe" os="Windows 2000">
                        <arg line="/c DIR /S /B "/>
                        <arg value="${destination.dir}"/>
                </exec>
                <record name="${success.log.file}" action="stop" />

        </target>

after I run ant I got the following error.

C:\BW Unifier\Config\Build\copy.xml:194: Reference local.file.to.be.removed
not found.

is any one now what I do wrong ??

regards zacky




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

Reply via email to