Ok, I've gone ahead and implemented dependency/ordering between extensions
(before_define / after_define)* à la Rake*.

https://svn.apache.org/viewvc?view=revision&revision=833791

alex

On Thu, Nov 5, 2009 at 7:44 AM, Alex Boisvert <[email protected]>wrote:

> (Moving to dev@)
>
> This issue is due to how extensions are handled.
>
> The Test module (which is an extension) adds test.compile.target to the
> classpath:
>
> # lib/buildr/core/test.rb
> after_define do |project|
>   ...
>   test.dependencies.concat [test.compile.target,
> test.resources.target].compact
>   ...
> end
>
> but Peter's custom extension is run only after so the change to
> test.compile.from (which affects the value of test.compile.target) isn't
> taken into account:
>
> after_define do |project|
>   project.test.compile.from project._(:src, 'test-functional', :java)
> end
>
> and thus when JUnit runs the classpath is incorrect and it's too late to
> fix anything since the classpath must be defined early for RJB to accept it.
>
> I've come across the same kind of issue with Eclipse extensions as well...
> and I think we need a way to define dependencies/ordering between extensions
> so we can properly compose them.  Maybe we could borrow the same notation
> from task dependencies?  e.g.,
>
> after_define(:test => :my_extension)
>
> after_define(:my_extension) do |project|
>   ...
> end
>
> Thoughts?  Any better ideas?
>
> alex
>
> On Mon, Nov 2, 2009 at 6:02 AM, Peter Schröder <[email protected]> wrote:
>
>> Hi,
>>
>> I am experiencing a strange behavior of buildr when having an empty
>> test-folder.
>>
>> See the example in the attachment, and look into the readme.txt for
>> the problem.
>>
>> Kind regards
>> Peter
>>
>>
>

Reply via email to