You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@buildr.apache.org by Peter Donald <pe...@realityforge.org> on 2012/11/10 04:20:03 UTC

Moving _(:target, :generated) to top level of project

Hi,

So I have been looking at a bunch of different projects (mostly
commercial) and how they use buildr. One thing I noticed is that a
large proportion of them move  _(:target, :generated) to the top level
of the project. So a typical project may look like;

layout = Layout::Default.new
layout[:target, :generated] = "generated"

define "myproject", :layout => layout do
  ...
  project.clean { rm_rf _(:target, :generated) }
end

The main reason for this seems to be ease of integration into IDEs.

I only really use IntelliJs IDEA but I know that at least for that IDE
we exclude the intermediate directory (i.e. _(:target) ) from the
project and this makes it impossible to view the generated source in
the IDE. So to enable development in the IDE they move it out of the
target hierarchy.

* Do you think we should make this the default?
* Alternatively, should we create an addon that makes this the
"default" behaviour?

-- 
Cheers,

Peter Donald

Re: Moving _(:target, :generated) to top level of project

Posted by Alex Boisvert <al...@gmail.com>.
On Fri, Nov 9, 2012 at 7:20 PM, Peter Donald <pe...@realityforge.org> wrote:

>
> layout = Layout::Default.new
> layout[:target, :generated] = "generated"
>
> define "myproject", :layout => layout do
>   ...
>   project.clean { rm_rf _(:target, :generated) }
> end
>
> The main reason for this seems to be ease of integration into IDEs.
>
> I only really use IntelliJs IDEA but I know that at least for that IDE
> we exclude the intermediate directory (i.e. _(:target) ) from the
> project and this makes it impossible to view the generated source in
> the IDE. So to enable development in the IDE they move it out of the
> target hierarchy.
>
> * Do you think we should make this the default?
>

We use target/generated because it's the Maven standard and the least
surprising for most people. Since it's the default, it's hard(er) to find
evidence that it suits people's needs.

I think it would rather stick with what we have now given the precedent and
the somewhat arbitrary nature of layouts.


> * Alternatively, should we create an addon that makes this the
> "default" behaviour?
>

Yep, I think that would be the right way to go.

alex