How to Contribute to an Extension

Finding the Extension Point Where to Contribute

Whatever the tools you're using (Nuxeo Studio or Nuxeo CLI), your first step is to find the open door configuration where you want to contribute. We call these open doors Extension points.
Nuxeo lists all extension points for a given version in the Nuxeo Explorer.

Click on Extension points.

Filter what you want using the combobox.

Click on the extension point you're interested in.
The documentation of this extension point is displayed.

Contributing Using Nuxeo Studio

In the Advanced Settings > XML extensions, click on the New button.

Give the extension a name and click on the Next button.

Type the content of your extension directly in the area.
The editor helps you: start typing < and it will suggest possible values. While you are typing, some suggestion happens sometimes when typing on space, and you can always call the suggester using the key CTRL+space.

Click on Save.

Notes

Pay attention to always start with an <extension> element, or a <require> element followed by an <extension> element. There is a minimal check done so as to avoid you contribute non correct XML. The <require> mechanism can be used to make sure you deploy after another contribution that is deployed by some built-in plugins for instance. You need to reference the component name in the require content.

You can contribute several extension points in the same XML Extensions feature. This is useful to group extensions that are contributed for the same high level functional goal.
Thus, you can have:

Declaring Your Contribution into Your Bundle

In the previous section you have created your configuration. You must now declare your component in your bundle so it's deployed in your Nuxeo Server. This declaration is made through the src/main/resources/META-INF/MANIFEST.MF file.

If the Nuxeo-Component entry already exists with another component declaration, separate them by commas.

Formatting

The trickiest and most important part of a MANIFEST.MF file is its formatting. One mistake and the OSGi context can't be correctly started, leading to unexpected issues and an unreachable bundle. Here are the three formatting rules to respect:

Each property name:

begins at the first character of the line;

ends with a colon without space between the name of the property and the colon itself.

Each value:

must be preceded by a space;

ends with a "end of line" with eventually a comma before it.

There MUST be an EMPTY LINE at the END OF THE FILE.

Overriding the Nuxeo Default Configuration

Most of the time you will want to override an existing Nuxeo Component. Each extension point has its own logic (even if most of the time you will just have to contribute the same item with the same name). So look into the extension point definition to see how to override an existing configuration.

Components deployment is linear, so if you want to override an existing configuration, it must be deployed AFTER the existing component.