Brett Porter <[EMAIL PROTECTED]> writes:

>>  2. How can I retrieve a mojo instance from another mojo in the same
>>  or a sub project ?
>
> I think the answer is that you can't. All plugin communication is
> meant to happen through the project instance.
>
> We certainly need to find a way to make that extensible, but I'd
> suggest for now that you should be taking in XML output files that
> most plugins generate and processing them for starters.
>

That's really annoying if I want to handle aggregation properly (and
this is the whole point of what I am trying to do :-) ) What I really need is
way to climb back in the project's tree to retrieve some configuration
value of a mojo. For instance, I may have the following config:

  root project (database: foo.rdf) 
    |
    +---- project A (agg: yes, database: FooA.rdf)
      |
      +----- subbproject A1 
      +----- subbproject A2
    |
    +---- project B (agg: no)
      +----- subbproject B1 
      +----- subbproject B2

When I am executing mojo for project B2, I want to retrieve RDF
database for root. But in A1, I need database FooA.

I maybe could do it using the MavenProject object but I could not
share database instance and that will lead to really messy code I
think.

> I have seen some people think about it from time to time, but not in
> any detail. Definitely worth investigating, particularly as a way of
> reviewing how we handle the lifecycle concurrency issues.

To delve deeper into this, I am having a hard time finding maven's big picture 
and unfortunately,
comments in code are rather fragmentary and barely useful (when they
exist). Is there a document on maven architecture somewhere ? Think
the answer is no, but asking anyway :-) 

Thx for your reply,
-- 
OQube < software engineering \ génie logiciel >
Arnaud Bailly, Dr.
\web> http://www.oqube.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to