PlexusComponents

This is a documentation for the Plexus Components descriptor: META-INF/plexus/components.xml.

An XSD is available at http://plexus.codehaus.org/xsd/components-1.3.0.xsd.

<component-set>
  <components>
    <component>
      <role/>
      <role-hint/>
      <implementation/>
      <version/>
      <component-type/>
      <instantiation-strategy/>
      <lifecycle-handler/>
      <component-profile/>
      <component-composer/>
      <component-configurator/>
      <component-factory/>
      <description/>
      <alias/>
      <isolated-realm/>
      <configuration/>

      <requirements>
        <requirement>
          <role/>
          <field-name/>
          <role-hint/>
          <role-hints/>
          <optional/>
        </requirement>
      </requirements>
    </component>
  </components>

  <dependencies>
    <dependency>
      <artifact-id/>
      <group-id/>
      <type/>
      <version/>
    </dependency>
  </dependencies>
</component-set>

component-set

Contains a set of ComponentDescriptors and the set's dependencies. See javadoc.

Element Type Since Description
components/component* List<ComponentDescriptor> (Many) The component descriptors that can be found within this component set descriptor.
dependencies/dependency* List<ComponentDependency> (Many) The dependencies that are required by the set of components found in this component set descriptor.

component

Component instantiation description. See javadoc.

Element Type Since Description
role String the role of this component.
role-hint String the role-hint of this component.
implementation String the implementation of this component. Implementation is a string denoting a FQCN in normal Java components, or some other name or file for other component factory implementations.
version String a specific point in a components's project timeline. i.e. version 1, or 2.1.4
component-type String the type of this component.
instantiation-strategy String the type of instantiation strategy for this component: one of "per-lookup", "singleton", "keep-alive" or "poolable".
Default value is: singleton.
lifecycle-handler String the lifecycle-handler for this component. For example, "basic", "passive", "bootstrap".
component-profile String
component-composer String the ID of the type of composer this component will use. For example, "setter" or "field" for the different types of dependency injection.
component-configurator String the type of component configurator for this project. For example "basic" for normal, or "map-oriented" for map oriented components.
component-factory String an id of the factory used to create this component. For example, "jruby" will use a JRuby factory.
description String a human-readable description of this component.
alias String an alias for this component. An alias is as an alternate name other than the normal key.
isolated-realm boolean true if this may be in an isolated classrealm.
Default value is: false.
configuration DOM configuration values defined for this component.
requirements/requirement* List<ComponentRequirement> (Many) project requirements to this component.

requirement

This represents a component that is required by another component.

Element Type Since Description
role String the role of the required component.
field-name String the name of the field that will be populated by the required component.
role-hint String the role-hint of the required component.
Default value is: default.
role-hints/role-hint* List<String> (Many) the role-hints of the required component.
optional boolean 1.3.0 Controls whether a failure to satisfy this requirement can be tolerated by host component or whether construction of the host component should also fail.
Default value is: false.

dependency

Element Type Since Description
artifact-id String the dependency's artifact ID.
group-id String the dependency's group ID.
type String the type of dependency, for example a "jar".
version String the point in a project's development timeline