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 7647089
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T10:22:39+00:00 2026-05-31T10:22:39+00:00

I am working on a generalized base of a validation util which I want

  • 0

I am working on a generalized base of a validation util which I want distribute as a JAR and automate using Ant. Using Java alone, I can do something like

...
int validationResults = this.validate();
System.exit(validationResults) // via Ant: 1 = "BUILD FAILED", 0 = "BUILD SUCCESSFUL"
...

to use the validation util in scheduled builds using CI-systems.

I am however writing this in jRuby instead of Java (for learning). I have tried the below ways but they do not trigger “BUILD FAILED” in Ant.

java.lang.System.exit(1) # using "require 'java'" at the the top of the file
Kernel.exit 1
exit 1

I have seen tickets in the jRuby issue tracker about this (for example JRUBY-1650) but I have not managed to find a solution to my problem.

I am running jRuby v1.6.6 and Warbler v1.3.2. The Ant target looks like this:

<target name="validate">
  <java jar="./validator.jar" fork="true" />
</target>

Is it me not doing it right, or does jRuby not support this (yet)?

  • 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-05-31T10:22:41+00:00Added an answer on May 31, 2026 at 10:22 am

    I suppose you start your jRuby code from the java Ant task.

    To get Ant fail in case of a non-zero exit code from your jRuby process, you have to set the failonerror attribute of the java task to true.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Working with python interactively, it's sometimes necessary to display a result which is some
Working in Eclipse on a Dynamic Web Project (using Tomcat (v5.5) as the app
Working with an Oracle 9i database from an ASP.NET 2.0 (VB) application using OLEDB.
I'm working on a program in Java and I have run into a small
I've been working on a Java application where I have to use JUnit for
I am working on access a database using F# and my initial attempt at
I'm working on a system using lots of MySQL queries and I'm running into
I'm working on a graphical application which looks something like this: while (Simulator.simulating) {
I'm now working on a problem I can't find a name for, so googling
For the site I'm working on, I want a user to have the ability

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.