---
date_published: 2026-10-29
date_modified: 2026-10-29
canonical_url: https://metricshub.org/metricshub-connector-maven-plugin/index.html
---

# MetricsHub Connector Maven Plugin

This is a Maven Report plugin, which is invoked by Maven's site plugin in the `site` lifecycle.

This plugin is designed to be used with the [MetricsHub Community Connectors](https://github.com/metricshub/community-connectors).

It reads the connector files from a source directory (E.g. `./src/main/connector`), parses the `.yaml` files and produces the corresponding Reference Guide, as a set of HTML documents (through Doxia's Sink API), which is integrated into the project's documentation.

## How to Use

The plugin is published to the MetricsHub Maven repository (`https://repo.metricshub.com/repository/maven-public/`), which must be declared as a plugin repository, with the corresponding credentials in the `metricshub` server of your `settings.xml`.

Add the plugin to the `<reporting>` element in the `pom.xml` file of the **MetricsHub Community Connectors** project:

```xml
<project>
	...
	<pluginRepositories>
		<pluginRepository>
			<id>metricshub</id>
			<url>https://repo.metricshub.com/repository/maven-public/</url>
		</pluginRepository>
	</pluginRepositories>
	...
	<reporting>
		<plugins>
			<!-- MetricsHub Connector Maven Plugin -->
			<plugin>
				<groupId>org.metricshub.maven</groupId>
				<artifactId>metricshub-connector-maven-plugin</artifactId>
				<version>1.0.16</version>
			</plugin>

	</reporting>
	...
</project>
```

To ensure that the **MetricsHub Community Connectors** project's documentation incorporates the [Sentry Maven Skin](https://sentrysoftware.org/sentry-maven-skin/), make sure to include a `./src/site/site.xml` file with the following configuration:

```xml
<project name="${esc.d}{project.name}">

	<skin>
		<groupId>org.sentrysoftware.maven</groupId>
		<artifactId>sentry-maven-skin</artifactId>
		<version>6.4.01</version>
	</skin>

	<body>

		<menu name="User Documentation">
			<item name="Supported Platforms" href="supported-platforms.html"/>
			<item name="Connectors Directory" href="connectors-directory.html"/>
		</menu>

	</body>

</project>
```

## Help

As any Maven plugin, the online help provides you with all the necessary information about it:

```sh
mvn org.metricshub.maven:metricshub-connector-maven-plugin:help
```

## How to Build

You can build the plugin with the usual command:

```sh
$ mvn verify
```

## How to Run

In order to run your plugin, you will need to setup the **MetricsHub Community Connectors** project as described above.

First, from the root directory of your `metricshub-connector-maven-plugin` project, install the plugin in your local repository with:

```sh
$ mvn install
```

Then, from the root directory of the **MetricsHub Community Connectors** project, generate the project's documentation with:

```sh
$ mvn clean site -o
```

The `-o` flag is to make sure Maven uses the version of the `metricshub-connector-maven-plugin` that you just installed in your local repository (and not the one from a remote repository).
