How do I exclude a folder in an ant jar task?
<p>I am trying to build a java project using ant. I have to exclude a particular directory from base directory for jar packaging. Here is the code snippet.</p>

<pre><code>&lt;target name="jar" depends="wsdl2java,oss.init,oss.request.compile"&gt;
    &lt;copy todir="${build.lib.dir}"&gt;
            &lt;fileset dir="${oss.lib.dir}" includes="**/*.*" excludes="**/weblogic.jar"/&gt;
    &lt;/copy&gt;
    &lt;copy todir="${build.conf.dir}"&gt;
                    &lt;fileset dir="${oss.conf.dir}" includes="**/*.*"/&gt;
    &lt;/copy&gt;
    &lt;copy todir="${oss.build.dir}"&gt;
                    &lt;fileset dir="${oss.run.dir}" includes="**/*.*"/&gt;
    &lt;/copy&gt;
    &lt;jar destfile="${oss.build.dir}/osstool2.5.5.jar" basedir="${oss.class.dir}" excludes="**/dms/*"&gt;

        &lt;manifest&gt;
            &lt;attribute name="Main-Class" value="${main-class}"/&gt;
            &lt;attribute name="Created-By" value="${owner}"/&gt;
            &lt;attribute name="Class-Path" value=". lib/antlr-runtime-3.0.1.jar.jar lib/log4j.jar
                lib/commons-discovery-0.2.jar lib/commons-logging-1.1.1.jar
                lib/spring.jar lib/axis.jar lib/axis-ant.jar lib/jaxrpc-api.jar 
                lib/webserviceclient.jar lib/webserviceclient+ssl.jar 
                lib/wlclient.jar lib/wsdl4j-1.5.1.jar lib/wsse.jar lib/ala-castor.jar lib/log4j.jar lib/log4j.jar lib/xercesImpl.jar 
                lib/ala-nbi-commons-1.3.0.jar lib/ala-nbi-notification-plugins.jar lib/ala-nbi-webservice-client-1.3.0.jar 
                lib/axis.jar lib/axis-ant.jar lib/dom4j-1.6.1.jar lib/jaxrpc-api.jar lib/webserviceclient.jar lib/webserviceclient+ssl.jar 
                lib/wlclient.jar lib/wsdl4j-1.5.1.jar lib/wsse.jar lib/commons-logging.jar"&gt;
            &lt;/attribute&gt;
        &lt;/manifest&gt;
    &lt;/jar&gt;
&lt;/target&gt;   
</code></pre>

<p>What am I missing here?
Thanks in advance.</p>