ExtensionDescriptor

Extension descriptor, stored in META-INF/maven/extension.xml in an extension's jar artifact to precisely control parts of the extension and dependencies to expose in the API class loader. Maven uses Plexus Classworlds to build the class loader hierarchy, therefore some concepts used in this extensions stem from Plexus Classworlds originally.

Notice: this documentation is generated from a Modello model but the code executed is not generated from this descriptor. Please report if you find anything wrong.

<extension>
  <exportedPackages/>
  <exportedArtifacts/>
</extension>

extension

Root element of the extension.xml file.

Element Type Description
exportedPackages/exportedPackage* List<String> (Many) Restricts the classes/resources from the current artifact's CoreExtension class realm that are exposed. Values ending with ".*" expose all classes/resources which are directly contained in the given package in binary form. Other values define only the prefix of classes/resources being exposed. Their binary name must be equal to the prefix or starting with the prefix (followed by "." or "$"). In particular this includes all subpackages. Despite the element name one can also only expose individual classes of a particular package by adding its binary name as value.
exportedArtifacts/exportedArtifact* List<String> (Many) Artifacts in the format groupId:artifactId. All the ones listed here are filtered (i.e. removed) from plugin and build extension class realms, i.e. referencing any of those coordinates in plugin/build extension dependencies has no effect.