Hi list,

I'm currently working on a plugin that gathers build metrics for a bunch
of
projects and generates a one page report for all of them.

For each category of metrics, I've created a mojo which contributes to
the
results using a 'singleton-keep-alive' BuildStore component which I
inject into the mojo's using this snippet:

/**
 * @parameter expression="${component.storage.BuildStore}"
 */
private BuildStore buildStore;

Now my problem is that the BuildStore component is instantiated once for
each
mojo, while I would have expected it to be instantiated once in the Plexus
container's lifecycle, and the same instance would be available to all
mojo's
that reference it.

Is this a feature? If so, what would be the way to achieve cross mojo
data sharing (apart from serialization strategies)?

Thanks in advance for thoughts and answers.

Cheers,
Walco

More relevant info:
I've configured the plexus component using:

<component-set>
  <components>
    <component>
      <role>storage.BuildStore</role>
      <role-hint>build-store</role-hint>
      <implementation>storage.DBStore</implementation>
     
<instantiation-strategy>singleton-keep-alive</instantiation-strategy>
    </component>
  </components>
</component-set>

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

Reply via email to