Preparing a New Snapshot for Publishing
-
You will need to have the following in the pom.xml to make it deployable to the gerrit-maven storage bucket:
<distributionManagement>
<repository>
<id>gerrit-maven</id>
<name>gerrit Maven Repository</name>
<url>s3://gerrit-maven@commondatastorage.googleapis.com</url>
<uniqueVersion>true</uniqueVersion>
</repository>
</distributionManagement>
-
Add this to the pom.xml to enable the wagon provider:
<build>
<extensions>
<extension>
<groupId>net.anzix.aws</groupId>
<artifactId>s3-maven-wagon</artifactId>
<version>3.2</version>
</extension>
</extensions>
</build>
-
Add your username and password to your ~/.m2/settings.xml file. These need to come from the API Console.
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>gerrit-maven</id>
<username>GOOG..EXAMPLE.....EXAMPLE</username>
<password>EXAMPLE..EXAMPLE..EXAMPLE</password>
</server>
</servers>
</settings>
Making 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
-
First build and deploy the latest snapshot and ensure that Gerrit builds/runs with this snapshot
-
Deploy the snapshot:
mvn deploy
Making a Release
-
First deploy (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)
-
Commit the pom change and push to the project’s repo refs/for/<master/stable>
-
Tag the version you just pushed (and push the tag)
git tag -a -m "prolog-cafe 1.3" v1.3 git push gerrit-review refs/tags/v1.3:refs/tags/v1.3
-
Deploy the new release:
mvn deploy
Part of Gerrit Code Review