ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <pe...@apache.org>
Subject Re: [myrmidon] Project/Target as Tasks
Date Sun, 21 Apr 2002 03:53:35 GMT
On Sun, 21 Apr 2002 13:04, Adam Murdoch wrote:
> On Sun, 21 Apr 2002 11:46, Peter Donald wrote:
> > Hi,
> >
> > What do you think about disapearing the recognition of Project/Target as
> > separate objects? We could make Project/Target actual tasks and thus
> > allow much more power when creating the model.
>
> Can you give a little more detail of how this might work?

Ill try. At the moment we build the project inside ProjectBuilder and it has 
to conform to a very specific pattern. ie

project
 +--Imports
 +--References
 +--Top Level Tasks
 +-- Targets
        +-- Tasks 

If we had more advanced access to ExecutionFrame for imports/references then 
there would be nothing that could not be modelled as a task. 

basically we would have a class like

class Project extends AbstractContainerTask {}

And does all the special processing. The the ProjectBuilder would be renamed 
to ModelBuilder (or something) as it does not do any of that special 
processing (it just 

> I like the idea of turning targets into tasks.  Not so sure about project,
> though -  might be getting a little too abstract.  I think the model where
> a project is a set of named, executable tasks (ie targets) is a good one. 
> It allows, for example, portions of a project to be reused outside that
> project, without regard to the type of projects involved.

Thats precisely what prompted this actually. I am rewriting a cron/job server 
to fit into with "J2EE" patterns and each "user" has a cron sheet that 
basically looks like

<cron version="..." ...>
  <principle>
    <userid>peter</userid>
    <name>Peter Donald</name>
    <email>peter@realityforge.net</email>
  </principle>

  <schedule name="..." job-ref="...">
    ...insert times to run job here...
  </schedule>

  <job name="...">
   ...tasks here...
  </job>

</cron>

Currently I have to rework a lot of infrastructure in myrmidon to get it to 
fly (ie new embeddor, new builders, new workspace-like object, new model). 
However if we were to go go to a generic infrastructure where
project/target etc were just tasks, workspace just contains instance data and 
ProjectBuilder were genericised then I would not have to do anything more 
than write a few tasks and set a few properties and that would be all good ;)

> Perhaps if we were to explicitly model container tasks, that would work for
> projects and targets as well.

Im not sure I understand - wanna enlighten me ? :)

> Anyway, a definite +1 for the general direction.

excellent!

-- 
Cheers,

Peter Donald


--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message