You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by hetan shah <he...@yahoo.com> on 2000/12/12 21:38:35 UTC

exclude directory.

Hello,

What would be the best way to exclude a directory and/or everything under that directory in a target ? Here is my setup.

<target name="init">
    <!-- Set up application info -->
    <property name="app.name" value="geoPage"/>
    <property name="app.version" value="0.0.1"/>
    <property name="app.year" value="2000"/>

    <!-- source code and document info -->
    <property name="src.dir"  value="."/>
    <property name="doc.dir"  value="./doc"/>
    <property name="lib.dir"  value="./lib"/>
    <property name="ssi.dir"  value="./geoPage/resources/base"/>

    <!-- package to be javadocs -->
    <property name="packages" value="geoPage.*"/>

    <!-- build info -->
    <!--property name="build.dir"          value="ant.build"/-->
    <property name="build.dir"          value="ant.output"/>
    <property name="build.classes"      value="classes"/>
    <property name="build.lib"          value="${build.dir}/lib"/>
    <property name="build.javadocs"     value="${build.dir}/javadocs"/>
    <property name="build.xmlc.dir"     value="${build.dir}/xmlcout/"/>
    <property name="build.debug"        value="on"/>

    <property name="dist.dir" value="./${app.name}-${app.version}"/>
  </target>

 

 <target name="xmlc" depends="prepare">
    <mkdir dir="${build.xmlc.dir}"/>
    <xmlc srcdir="${src.dir}" sourceout="${build.xmlc.dir}" includes="**/*.html" 
    excludes="${build.xmlc.dir}/jdoc/**">
        <arg name="dom" param1="xerces"/>
        <arg name="ssi"/>
        <arg name="warnings" param1="false"/>
        <arg name="generate" param1="both"/>
    </xmlc>
  </target>

For some reason ant does not exclude anything from the build.xmlc.dir/jdoc directory. Any pointers are much appreciated.

-Hetan



---------------------------------
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.

Re: exclude directory.

Posted by Stefan Bodewig <bo...@apache.org>.
hetan shah <he...@yahoo.com> wrote:

> Hello,
> 
> What would be the best way to exclude a directory and/or everything
> under that directory in a target ?

<snip/>

>     <xmlc srcdir="${src.dir}"
>           sourceout="${build.xmlc.dir}" 
>           includes="**/*.html"
>           excludes="${build.xmlc.dir}/jdoc/**">

<snip/>

not knowing the task you are using I can only hope it is working the
same way all other directory based tasks in Ant do.

The patterns you specify are taken as relative file patterns, relative
to the basedir (or whatever a given task calls it) of your task. You
seem to specify an absolute path. Does excludes="jdoc/**" work?

Stefan