Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ant must be installed to run rake targets, but we don't use ant anymore #2236

Open
headius opened this issue Nov 24, 2014 · 4 comments
Open

Comments

@headius
Copy link
Member

headius commented Nov 24, 2014

Several of our build targets in rake depend on 'ant' library, for example to exec a subprocess JVM for test runs. This is an additional build dependency above and beyond Maven, and ideally we'd get rid of it or have the bootstrap put ant somewhere we can use it.

@headius
Copy link
Member Author

headius commented Nov 24, 2014

The error produced when you don't have ant installed is also rather cryptic. Here it is with full trace output: https://gist.github.com/headius/6c6d83229d5a979ae8cf

@perlun
Copy link
Contributor

perlun commented Apr 13, 2018

The error you get right now looks like this:

$ rake spec:ruby
could not load ant: #<Errno::ENOENT: No such file or directory - ant>
MSPEC: {:compile_mode=>"OFF", :format=>"d", :jit_threshold=>20, :jit_max=>-1, :objectspace_enabled=>true, :thread_pooling=>false, :reflection=>false}
rm -rf rubyspec_temp
rake aborted!
NameError: undefined local variable or method `ant' for main:Object
/Volumes/git/3rd-party/jruby/rakelib/commands.rake:27:in `initialize_paths'
/Volumes/git/3rd-party/jruby/rakelib/commands.rake:45:in `jruby'
/Volumes/git/3rd-party/jruby/rakelib/commands.rake:90:in `mspec'
/Volumes/git/3rd-party/jruby/rakelib/rubyspec.rake:63:in `block in (root)'
/Users/plundberg/.rvm/gems/jruby-9.1.16.0/gems/rake-12.3.1/exe/rake:27:in `<main>'
Tasks: TOP => spec:ruby => spec:ci_interpreted => spec:interpreted
(See full trace by running task with --trace)

(Also, worth mentioning is that if you are using macOS, a simple way to get a working ant command is brew install ant, if you have a working Homebrew install.)

@headius
Copy link
Member Author

headius commented Apr 13, 2018

Yeah the main thing keeping Ant in the build is that we're using its Java-launching task throughout our test runs. We need a good replacement for that, one that allows us to customize JRuby and Java opts from callers.

@headius
Copy link
Member Author

headius commented Apr 13, 2018

See rakelib/commands.rake for the primary calls to Ant we need to replace. Basically the java task in our Ant integration has a set of properties we can set, like classpath etc. Perhaps we fake them by making a look-alike Struct and then peeling out the piece and building our own command line?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants