With a maven plugin that generates sources it ignores parts of target, but
adds target/generated-sources as a source dir, we could do the same thing
with Gradle.

On Tue, May 10, 2011 at 19:56, Adam Murdoch <[email protected]>wrote:

>
> On 10/05/2011, at 11:57 PM, Steve Ebersole wrote:
>
> +1 to this whole branch of discussion.  This is exactly the convention we
> decided on in the Hibernate build.  We generate various types of sources;
> some production (main), some test.  In fact we decided on a single grouping
> directory under {buildDir} also to keep things "neat".  But we also split
> out the various types of things being generated.  So we end up with
> directories such as (we use 'target' instead of 'build'):
> target/generated-src/logging/main
> target/generated-src/antlr/main
> target/generated-src/jpamodelgen/test
>
> This has worked great for us.  Except of course IDE project generation.
>
> This is a good point. And one we don't have a good solution for yet. There
> are 2 things we want to configure the IDE to do, but they conflict with each
> other. First, we want to treat generated source directories as source
> directories in the IDE. Second, we want to exclude everything under build/
> from the IDE, as most of it is either not interesting or an annoyance in the
> IDE.
>
> The problem is, in IDEA at least, that the exclusion of build/ also
> excludes the generated source directories under build/. Anyone have any
> suggestions for how we might configure IDEA to make this work? How about
> Eclipse?
>
>
>  --
> Adam Murdoch
> Gradle Co-founder
> http://www.gradle.org
> VP of Engineering, Gradleware Inc. - Gradle Training, Support, Consulting
> http://www.gradleware.com
>
>


-- 
Jason Porter
http://lightguard-jp.blogspot.com
http://twitter.com/lightguardjp

Software Engineer
Open Source Advocate
Author of Seam Catch - Next Generation Java Exception Handling

PGP key id: 926CCFF5
PGP key available at: keyserver.net, pgp.mit.edu

Reply via email to