The contents of this document are a work in progress

Component Configuration


For each component plexus creates a component profile. The profiles keeps track of the following things for each component:

  • The configuration for the component

Component Descriptor

Let's take a look at the component descriptor. It starts off with a block for the component:


You can then declare the role and the role hint of the component. The role and the hint are what you use to look up your component from plexus. The hint is optional. The hint is just an extra id that allows you to differentiate components of the same type.


The implementation attribute tells plexus what you want to use to implement the specified role:


You can specify how your class should be created via the component factory. The default is java. But, there are additional [Component Factories] as well for groovy, bsh, and jpython.


If you want to use a personality that is not the default personality, you can specify a lifecycle handler. You will need this when you are mixing and matching component personalities.


Then, there is the instantiation strategy. This controls how often plexus creates your components. There are the following options:

Strategy Description
per-lookup Every time you lookup a component one will be created.
singleton Only one instance of your component will ever be created.
keep-alive This ensures a component is only used as a singleton, and is only shutdown when the container shuts down.
poolable Pools several component instances.

The default is singleton and you can change the strategy like this: