Open atz opened 10 years ago
Are you suggesting something like:
$ rake jetty:download JETTY_URL=http://blah/master.zip
Partially. See https://github.com/jimweirich/rake/blob/master/doc/rakefile.rdoc#task-arguments-and-the-environment
This would also be sufficient:
rake jetty:download[http://blah/master.zip]
The difference is that rake knows that the task takes an argument, it shows up in rake -T
, etc. And the user doesn't have to know all the various internal variable names that they don't actually care about. Also, if your rake task is prerequisite to other tasks, those tasks don't have to bounce off a GLOBAL variable or coordinate args outside the API.
@atz so long as the argument isn't required, it's fine with me.
Several of the rake tasks should take arguments, and certainly the underlying
jettywrapper.rb
methods should. For rake, at least:jettywrapper.rb
's download() method already takes a url argument, but rake doesn't expose it.In general, you should be able to target a jetty version directly from the command line, without setting global ZIP_URL or previous magic call to
jettywrapper.instance.url=
or passing arguments to stop(). Side note: I don't get the convenience of "configure via stop() call".