• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Ant excludes under fileset not working

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I have the following target to run findbugs in my ant script:
My jars are in the lib folder but there is also a txt file in there that is causing an error when Findbugs runs. I know it is causing the error because if I delete it the error goes away. However, I can't really permanently delete that file. So I want to exclude it.
But the exclude isn't working. I am still getting the error. can anyone tell me why this is happening?

<target name="findbugs" >
<findbugs home="${findbugs.home}" output="xml" outputFile="findbugs_report.xml">
<auxClasspath>
<fileset dir="${env.WORKSPACE}/${env.JOB_NAME}/lib"
excludes="**/*.txt">
</fileset>
</auxClasspath>
<sourcePath path="${env.WORKSPACE}/${env.JOB_NAME}/src" />
<class location="${env.WORKSPACE}/${env.JOB_NAME}/bin" />
</findbugs>
</target>

Thank you
 
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The text file uses upper case in extension?
If that is the case, you should add casesensitive=false, because default value is true.
Hope it helps.
 
Jane Foster
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm confused -- what uppercase extension are you referring to? I'll try your suggestion though
 
Aurelian Tutuianu
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
uppercase extension = if your file is finished with .TXT in place of .txt
 
Jane Foster
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oh! gotcha. no, it is lowercase. I put the casesensitive in there anyway but it didn't work...
i tried this next:
But same error

<findbugs home="${findbugs.home}" output="xml" outputFile="findbugs_report.xml">
<auxClasspath>
<fileset dir="${env.WORKSPACE}/${env.JOB_NAME}/lib" casesensitive="false">
<exclude name="textfile.txt"/>
</fileset>
<fileset dir="${env.WORKSPACE}/${env.JOB_NAME}/lib" casesensitive="false">
<include name="**/*.java"/>
</fileset>
</auxClasspath>
<sourcePath path="${env.WORKSPACE}/${env.JOB_NAME}/src" />
<class location="${env.WORKSPACE}/${env.JOB_NAME}/bin" />
</findbugs>
 
Aurelian Tutuianu
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you try also:

Jane Foster wrote:<auxClasspath>
<fileset dir="${env.WORKSPACE}/${env.JOB_NAME}/lib" casesensitive="false">
<exclude name="textfile.txt"/>
<include name="**/*.java"/>
</fileset>

 
Aurelian Tutuianu
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Other things:
- if txt file is not in root you should do <exclude name="**/*.txt"/>
- in place of <include name="**/*.java"/> shoouldn't you have jar files? like <include name="**/*.jar"/>
 
reply
    Bookmark Topic Watch Topic
  • New Topic