0

I'm trying to copy the schema files from my workspace to a config folder as part of build.

I've achieved that by using the sync task.

These are my requirements:

1.Need to replace only the latest not every file each time.
2.Need to display in console, what are the files being changed (copied /removed)

<target name="copy-schema">
    <sync todir="C:/config/schema">
        <fileset dir="${schema.dir}" id="schema_dir"/>
        <preserveintarget preserveemptydirs="true">
            <include name="**/**" />
        </preserveintarget>
    </sync>
</target>

This copies the schema Files, but I'm not able to see what are the files copied.

I've tried the below,

<target name="copy-schema">
    <sync todir="C:/config/schema">
        <fileset dir="${schema.dir}" id="schema_dir"/>
        <preserveintarget preserveemptydirs="true">
            <include name="**/**" />
        </preserveintarget>
    </sync>
    <property name="filesCopied" refid="schema_dir"/>
    <echo>${fileCopied}</echo>
</target>

But it prints all the files in the directory.

Any help is appreciated.

Thanks in advance

ewan.chalmers
  • 16,145
  • 43
  • 60
sathya_dev
  • 513
  • 3
  • 15

1 Answers1

2

The sync task supports a verbose attribute to log the files that are being copied.

Try adding the verbose attribute in your sync:

<sync todir="C:/config/schema" verbose="true">
ewan.chalmers
  • 16,145
  • 43
  • 60