Sure, my patch is only about fixing the fact that there are a lot
more things you can do with the Configuration object than you can do
with the "DSL". I definitely don't need "per-task" configurations.
In general the war.rb "DSL" is a bit quirky. I think something along
the lines of the standard config/environment.rb would be more
familiar to Rails developers. That would have the added benefit that
we wouldn't need to mirror the API of War::Configuration into a
special War::Configuration DSL.
Example:
War::Configuration.setup do |config|
config.add_jetty_library(config.java_library('jetty', '6.6.1'))
# ... etc ...
end
Cheers,
Jon
----
New from ThoughtWorks: Mingle, an Agile project management application.
Mingle. Project Intelligence. Powerfully Simple.
More at http://studios.thoughtworks.com
On 19/04/2007, at 3:35 PM, Fausto Lelli wrote:
> Hi Jon,
>
> while it is certainly true that configuration per task is
> absolutely needed,
> I wouldn't rule out the use of a DSL to configure the plugin, so
> instead we
> could do in war.rb something along the line of :
>
> init:
> add_jetty_library(java_library('mysql-connector- java', '5.0.5'))
> remove_gem('ActiveRecord-JDBC')
>
> run:
> jetty_port 8081
> java_opts = "-Xmx512m"
>
> what do you think ?
> Also, we're working on a new library syntax and implementation
> (backened by
> some more test cases) to better control the plugin env and config,
> and some
> basic logging) so this would be a perfect time to discuss
> impressions and
> suggestion on these matters.
>
> Cheers,
> Fausto.
>
>
> On 4/19/07, Jon Tirsen <[EMAIL PROTECTED]> wrote:
>> This patch allows for more extensive configuration of
>> War::Configuration/Runner/Creator. We needed to tweak quite a lot of
>> the settings so this patch introduces constants: WAR_CONFIGURATION,
>> WAR_RUNNER and WAR_CREATOR. If you in your application specific rake
>> files (e.g. lib/tasks/application.rake) define a 'war:init' target it
>> can access and modify the above objects
>>
>> Example:
>>
>> task 'war:init' do
>> WAR_CONFIGURATION.add_jetty_library(java_library('mysql-connector-
>> java', '5.0.5'))
>> WAR_CONFIGURATION.remove_gem('ActiveRecord-JDBC')
>>
>> WAR_RUNNER.jetty_port = 8081
>> WAR_RUNNER.java_opts = "-Xmx512m"
>> end
>>
>> This completely removes the need for war.rb but we should probably
>> keep it around for simpler tweaking. In general war.rb is not
>> flexible/powerful enough for extensive tweaking (even if the
>> Configuration/Runner/Creator objects themselves are).
>>
>> This patch is diffed from plugins/war-snapshot.
>>
>>
>>
>>
>> Cheers,
>> Jon
>>
>>
>>
>>
>> ----
>> New from ThoughtWorks: Mingle, an Agile project management
>> application.
>> Mingle. Project Intelligence. Powerfully Simple.
>> More at http://studios.thoughtworks.com
>>
>>
>>
>>
>> _______________________________________________
>> Jruby-extras-devel mailing list
>> [email protected]
>> http://rubyforge.org/mailman/listinfo/jruby-extras-devel
>>
>>
> _______________________________________________
> Jruby-extras-devel mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/jruby-extras-devel
_______________________________________________
Jruby-extras-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/jruby-extras-devel