You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@gump.apache.org by Nicola Ken Barozzi <ni...@apache.org> on 2003/12/04 10:11:51 UTC

Injecting new tools in PyGump

- ccing also on forrest-dev, please reply only on the gump list -

I am trying to summarize the latest ForrestBot and JavaSrc requests in a 
single issue: configurable tool support.

Use case: I want projects that use Forrest to be able to generate the 
site, and see the java source of all projects, even if it's not in their 
build.

A way of uniting all these is to create pluggable build handlers.

I imagine that base PyGump is just a system that creates the OM, checks 
out modules and then gives the OM to a list of handlers.

So we would have:

  - java handler
  - ant handler
  - maven handler
  - forrest handler
  - javasrc handler
  - etc...

This means that the descriptor should be made to be extensible, as it 
has to be parsed regardless of what handlers are added.

So instead of <ant> and <maven>, we would have:

  <build type="ant"/>
  <build type="maven"/>

And also

  <site type="forrest"/>
  <site type="anakia"/>

and

  <source type="java"/>
  <source type="python"/>

So after the object model is in memory, for each project every build 
handler is called in turn, and gets a chance to do stuff.

The handlers are declared in the Gump *installation*, so that an 
installed Gump can be instructed to be a Forrestbot-like tool or a 
simple build tool.

So now that I want to install javasrc, I could just create a javasrc 
Forrest plugin, and Gump will run it on all projects, and it would 
effectively do stuff only if it finds <source type="java"/>.

Finally, the Maven descriptor IIRC has a section that describes where 
source dirs are, so we could use that notation and it would be easy to 
convert them to our format in the future.

What do you think?

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------