ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Reilly <>
Subject Re: Nested patternset, patternset intersection
Date Wed, 21 Jan 2004 17:57:24 GMT
If the class RouterDeviceAgentAdapter is used by any of
the classes to be compiled, javac will attempt to compile it
even if it not in the list of files to be compiled.

2) (not too sure about this)
The order of includes and excludes is important, put the
includes first and then the excludes.


Daniels, Doug wrote:

>I want to match a certain pattern in my package directory structure but want
>to exclude a certain subdirectory in there, I'm looking to do an <include
>.../> AND <exclude..../> which I assume is what the patternset allows me to
>do, but it isn't working. My second question is can I nest a patternset
>within another patternset?
>Here is my problem:
>  <patternset id="ExcPresentationFiles"> 
>      <exclude
>a" />
>      <exclude
>name="**/${PackageName}/presentation/presUtil/" />
>      <exclude
>name="**/${PackageName}/presentation/presUtil/" />
>  </patternset>
>  <patternset id="BuildDirs">
>    <patternset refid="ExcPresentationFiles" />
>   <!-- include only at the level of particular package -->
>     <include name="**/${PackageName}/**" />
>  </patternset>
>where the /presentation... code is within the package I'm trying to match. I
>then use this patternset in my compile, and jar targets as so:
>  <target name="compile">
><!-- fork the compile task and give it 1gb of memory to use -->
>     <javac srcdir="${Src}" classpathref="project.class.path" fork="true"
><!-- only compile whats in the application we need -->
>	 <patternset refid="BuildDirs" /> 
>     </javac>
>  </target>
>But when it runs it still tries to compile the code in the
>${PackageName}/presentation/adaptation/ file,
>and the other ones that I listed as excluded. I've tried putting the
>excludes directly in the BuildDirs patternset, no luck, it seems to me that
>its doing a union instead of an intersection of the patterns, is this how
>the patternset is supposed to work, or am I just not doing something
>correctly? Any suggestions.
>~Doug Daniels
>To unsubscribe, e-mail:
>For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message