[ 
https://issues.apache.org/jira/browse/BUILDR-116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12619843#action_12619843
 ] 

Lacton commented on BUILDR-116:
-------------------------------

Sorry, my comments were confusing. I had not noticed that the comments I wrote 
while attaching a file were not shown as being related to the file.

My comment "It supersedes the previous one" was about 'BUILDR-116.lib.patch'. I 
had written a previous patch I thought was quite low-quality. So I delete the 
first BUILDR-116.lib.patch and attached a new BUILDR-116.lib.patch that 
superseded it.

On the other hand, the two spec patches were complementary. The first 
illustrates "TestTask should include the main compile target in its 
dependencies, even when using non standard directories". The second one 
illustrates the related but different issue "test compile target is not 
included in the test classpath when using a non standard directory".

Next time, I will provide exactly one lib patch and one spec patch. It will be 
less confusing.

> TestTask should include the main compile target in its dependencies, even 
> when using non standard directories
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: BUILDR-116
>                 URL: https://issues.apache.org/jira/browse/BUILDR-116
>             Project: Buildr
>          Issue Type: Improvement
>          Components: Test frameworks
>         Environment: Trunk revision 680924
>            Reporter: Lacton
>            Priority: Minor
>             Fix For: 1.3.3
>
>         Attachments: BUILDR-116.lib.patch, BUILDR-116.spec.patch, 
> BUILDR-116.spec.patch2
>
>
> TestTask should include the main compile target in its dependencies, even 
> when using non standard directories (e.g., 'src/java' instead of 
> 'src/main/java').
> For instance, I have a project with java sources in 'src/java' and its junit 
> tests in 'src/test'. The buildfile is roughly like this:
> <code>
> define 'my-project' do
>   compile _('src/java')
>   test.compile _('src/test')
> end
> </code>
> 'buildr clean test' fails on test compilation because the main compile target 
> (i.e., 'target/classes') is not in the TestTask's dependencies. The problem 
> is that
> 1. the main CompileTask tries to set its target directory during the 
> 'before_define' phase, which is too early because it is before the "compile 
> _('src/java')" line.
> 2. the TestTask does not add the main compile target during the 
> 'after_define' phase, because the main CompileTask still has no target at 
> that time.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to