buildr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Boisvert <alex.boisv...@gmail.com>
Subject Re: Add tasks to attach generation tasks to?
Date Sat, 10 Nov 2012 19:34:07 GMT
On Fri, Nov 9, 2012 at 7:32 PM, Peter Donald <peter@realityforge.org> wrote:

> Hi,
>
> Another thing I noticed across a whole bunch of projects is that they
> usually create a per project task off which they can hang all the code
> generation tasks off. i.e. They add a task like "myproject:generate"
> that does all the source generation required for the project. Mostly
> this is so they can generate code and then do most of their
> development out of an IDE. However I notice that when I look at mavens
> lifecycle at [1] they actually include phases by the names
>
> * generate-sources: (Generate the main source code)
> * generate-resources: (Generate the main resources)
> * generate-test-sources: (Generate the test source code)
> * generate-test-resources: (Generate the test resources)
>
> I was thinking about trying to incorporate something similar into
> buildr. What do you think would be the best approach?
> * Add one "generate" task
> * Add the maven generate tasks
> * Add both tasks and have the generate task have all the maven
> generate taks as dependencies
>
> There would then be a process of updating all the addons to use this
> new approach.
>
> Thoughts?
>

I think it's a good idea to standardize on the task(s) names.  I would go
with defining separate task names and associating them with their most
relevant tasks e.g. "resources" depends on "generate-resources", "compile"
depends on "generate-sources", etc.   I'm not sure about the utility of the
overall "generate" task but I guess we could add it as a dependency of
"build".

Whatever we opt for, we should update our basic dependency graph at
https://cwiki.apache.org/confluence/display/BUILDR/12+Things+to+Know+About+Buildr
.

alex

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message