You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by David Weintraub <qa...@gmail.com> on 2008/01/01 03:26:30 UTC

Re: Properties for include in fileset

I am not sure what your complaint is. It looks like it is performing
as expected as far as I can tell. It looks like everything is working
according to the output of the debug.

* Are you expecting something specific?

* What is ${model-helper-source.path} being set to? Is it any chance
"**/com/**/model/**/*.java"?

* Do you have Java files in this path?

* What is being returned by the second match?

The pattern "**/*.java" maybe matching *.java files, but these *.java
files might not be under "**/com/**/model/**/*.java" pattern. It's
hard to tell with the information you gave us exactly what is going
wrong.

On Dec 18, 2007 3:11 PM, Daniels, Troy (US SSA)
<tr...@baesystems.com> wrote:
> At several places, I need to build a fileset with the same properties.
> Which files are included is likely to change, so I tried to use a
> property to specify this:
>
>                         <path>
>                                 <fileset dir="..">
>                                         <include
> name="${model-helper-source.path}" />
> <!--                                    <include name="**/*.java" /> -->
>                                 </fileset>
>                         </path>
>
> When I run this with ant -debug, this fails to match anything and
> includes this output:
>
> fileset: Setup scanner in dir d:\Jaguar\dev\relaxRepair\source with
> patternSet{ includes: ["**/com/**/model*/**/*.java"] excludes: [] }
>
> When I uncomment the second include, it finds files and produces this
> output:
>
> fileset: Setup scanner in dir d:\Jaguar\dev\relaxRepair\source with
> patternSet{ includes: ["**/com/**/model*/**/*.java", **/*.java]
> excludes: [] }
>
> Note that there are quotes only around the include pattern specified
> with a property.  It appears that if I use a property, the file path is
> expected to start and end with quotes.  Is this intended?  Is there any
> way to get around this?
>
> Troy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>



-- 
--
David Weintraub
qazwart@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


RE: Properties for include in fileset

Posted by "Daniels, Troy (US SSA)" <tr...@baesystems.com>.
 

> -----Original Message-----
> From: David Weintraub [mailto:qazwart@gmail.com] 
> Sent: Monday, December 31, 2007 9:27 PM
> To: Ant Users List
> Subject: Re: Properties for include in fileset
> 
> I am not sure what your complaint is. It looks like it is 
> performing as expected as far as I can tell. It looks like 
> everything is working according to the output of the debug.
> 
> * Are you expecting something specific?
> 
> * What is ${model-helper-source.path} being set to? Is it any 
> chance "**/com/**/model/**/*.java"?

I was in fact quoting the string when I defined it.  Without the quotes,
it works like expected.

Troy

> 
> * Do you have Java files in this path?
> 
> * What is being returned by the second match?
> 
> The pattern "**/*.java" maybe matching *.java files, but 
> these *.java files might not be under 
> "**/com/**/model/**/*.java" pattern. It's hard to tell with 
> the information you gave us exactly what is going wrong.
> 
> On Dec 18, 2007 3:11 PM, Daniels, Troy (US SSA) 
> <tr...@baesystems.com> wrote:
> > At several places, I need to build a fileset with the same 
> properties.
> > Which files are included is likely to change, so I tried to use a 
> > property to specify this:
> >
> >                         <path>
> >                                 <fileset dir="..">
> >                                         <include 
> > name="${model-helper-source.path}" />
> > <!--                                    <include 
> name="**/*.java" /> -->
> >                                 </fileset>
> >                         </path>
> >
> > When I run this with ant -debug, this fails to match anything and 
> > includes this output:
> >
> > fileset: Setup scanner in dir d:\Jaguar\dev\relaxRepair\source with 
> > patternSet{ includes: ["**/com/**/model*/**/*.java"] excludes: [] }
> >
> > When I uncomment the second include, it finds files and 
> produces this
> > output:
> >
> > fileset: Setup scanner in dir d:\Jaguar\dev\relaxRepair\source with 
> > patternSet{ includes: ["**/com/**/model*/**/*.java", **/*.java]
> > excludes: [] }
> >
> > Note that there are quotes only around the include pattern 
> specified 
> > with a property.  It appears that if I use a property, the 
> file path 
> > is expected to start and end with quotes.  Is this 
> intended?  Is there 
> > any way to get around this?
> >
> > Troy
> >
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For 
> additional 
> > commands, e-mail: user-help@ant.apache.org
> >
> >
> 
> 
> 
> --
> --
> David Weintraub
> qazwart@gmail.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For 
> additional commands, e-mail: user-help@ant.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org