# Making a Release of a Gerrit Subproject / Core Plugin

version v2.8.1-44-g85b55e2

## Make a Snapshot

- Only for plugins:

  - In the `pom.xml` update the Gerrit version under `properties` > `Gerrit-ApiVersion` to the version of the new Gerrit release.

  - Make sure that the URL for the Maven repository with the id `gerrit-api-repository` in the `pom.xml` is correct.

    If `Gerrit-ApiVersion` references a released Gerrit version it must be `https://gerrit-api.stoarge.googleapis.com/release/`, if `Gerrit-ApiVersion` references a snapshot Gerrit version it must be `https://gerrit-api.storage.googleapis.com/snapshot/`.

- Build the latest snapshot and install it into the local Maven repository:

      mvn clean install

- Test Gerrit with this snapshot locally

## Publish Snapshot

If a Snapshot for a Subproject was created that should be referenced by Gerrit while current Gerrit development is ongoing, this Snapshot needs to be published.

- Make sure you have done the configuration needed for deployment:

  - Configuration in Maven `settings.xml`

  - Configuration for Subprojects in `pom.xml`

- Deploy the new snapshot:

      mvn deploy

- Change the version in the Gerrit parent `pom.xml` for the Subproject to the `SNAPSHOT` version

  When Gerrit gets released, a release of the Subproject has to be done and Gerrit has to reference the released Subproject version.

## Prepare the Release

- First create (and test) the latest snapshot for the subproject/plugin

- Update the top level `pom.xml` in the subproject/plugin to reflect the new project version (the exact value of the tag you will create below)

- Create the Release Tag

      git tag -a -m "prolog-cafe 1.3" v1.3

- Build and install into local Maven repository:

      mvn clean install

## Publish the Release

- Make sure you have done the configuration needed for deployment:

  - Configuration in Maven `settings.xml`

  - Configuration in `pom.xml` for Subprojects or Core Plugins

- Deploy the new release:

      mvn deploy

- Push the pom change(s) to the project’s repository `refs/for/<master|stable>`

- Push the Release Tag

      git push gerrit-review refs/tags/v1.3:refs/tags/v1.3

Part of Gerrit Code Review