Anush
Anush

Reputation: 395

excludindg a directory from ant copy not working

I have a folder structure like this,

 samples/soap-client/target/layout/srcdist/etc/wsdl/v1/...
 samples/soap-client/target/layout/srcdist/etc/wsdl/v2
 samples/soap-client/target/layout/war/.....

i want to copy the all content of layout folder to another location except wsdl folder. my code is like this

<copy todir="${pse-layout.dir}/sdk/partnersdk/new-soap-client">
    <fileset dir="samples/soap-client/target/layout">               
        <exclude name="**/**/wsdl/"/>
        <include name="**/*"/>              
    </fileset>
</copy>

but this is not working.this copies the whole content of layout folder including wsdl folder. please help me.

Upvotes: 1

Views: 39

Answers (1)

Stanislav
Stanislav

Reputation: 28136

Try to change your copy task to:

<copy todir="${pse-layout.dir}/sdk/partnersdk/new-soap-client">
  <fileset dir="samples/soap-client/target/layout">               
    <include name="**/*"/>              
    <exclude name="**/wsdl/**"/>
  </fileset>
</copy>

This will exclude all the wsdl folders you have in your layout folder.

Upvotes: 1

Related Questions