Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7962703
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T05:24:42+00:00 2026-06-04T05:24:42+00:00

I am building my application using ANT and I am checking my code for

  • 0

I am building my application using ANT and I am checking my code for any Findbugs violations.

Now, my objective is to stop the build whenever my code contains particular findbug violation.

Is this possible using ANT & Findbugs?

N.B. Preferably not to write to any custom class.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T05:24:44+00:00Added an answer on June 4, 2026 at 5:24 am

    Use the warningsProperty attribute on your findbugs task to set a property for any warnings:

    <findbugs ... warningsProperty="findbugsFailure"/> 
    

    and fail task if warnings are produced:

    <fail if="findbugsFailure">
    

    For example:

      <property name="findbugs.home" value="/export/home/daveho/work/findbugs" />
    
      <target name="findbugs" depends="jar">
    
        <findbugs home="${findbugs.home}"
                  output="xml"
                  outputFile="bcel-fb.xml" 
                  warningsProperty="findbugsFailure">
          <auxClasspath path="${basedir}/lib/Regex.jar" />
          <sourcePath path="${basedir}/src/java" />
          <class location="${basedir}/bin/bcel.jar" />
        </findbugs>
    
        <fail if="findbugsFailure">
    
      </target>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm building a Java application (using Ant with build.xml and build.property files). Now I'd
After building an application by using ant, i am copied the component to a
I'm building an application using gevent. My app is getting rather big now as
I have application building using third party apis, j2me apis,application code distributed in various
I'm building an application using jsp's, servlets, and all that fun stuff. Right now,
Unlike this question: Linker Error while building application using Boost Asio in Visual Studio
I'm building an application using the Supervising Controller pattern (Model View Presenter) and I
I am currently building an application using Tomcat, Spring and JAVA. I am using
Currently I'm building an application using latest Prism for Silverlight 4. I've a module
I'm building WP7 application using DropNet. I have successfully managed to log in and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.