Releasing a Project
Releasing an extension is reserved to its committers and to core committers. This page explains how to release it, publish it on extensions.xwiki.org, document it and announce it.
Release the project
There are 3 main steps to release your project:
Release using Maven
You release your project on the XWiki Maven Remote Repository:
- Use org.xwiki.contrib as groupId in your Maven modules.
- Request an account on Nexus with a post on the Forum. Give the username you'd like, and the extension you plan to release.
- Once you have your credentials, put them in
~/.m2/settings.xml
<settings> ... <servers> ... <server> <id>xwiki-staging</id> <username>username</username> <password>********</password> </server> ... </servers> ... </settings> - If your POM uses a Contrib Parent under <parent> and you've configured the JIRA plugin to do automatic releases, also add your JIRA credentials to your settings.xml.
- Put the following configuration in your project's
pom.xml
<project> ... <scm> <connection>scm:git:git://github.com/xwiki-contrib/{extensionrepository}.git</connection> <developerConnection>scm:git:[email protected]:xwiki-contrib/{extensionrepository}.git</developerConnection> <url>https://github.com/xwiki-contrib/{extensionrepository}/tree/master</url> </scm> ... </project>Where {extensionrepository} is the name of the repository in https://github.com/xwiki-contrib/.
- Prepare the release with the Maven release plugin. Use the full command below, otherwise only some of the modules get prepared and the others end up with wrong versions. The integration-tests profile is needed when there are functional tests; always use it, it doesn't harm.
mvn release:prepare -Pintegration-tests,docker -Darguments="-DskipTests" -DskipTests - Released XWiki artifacts are signed, so that downloaders can check that the binary is the one that was released and wasn't replaced by an intruder.
The signing plugin is configured in the top-level POM (
<groupId>org.xwiki.commons</groupId><artifactId>xwiki-commons</artifactId>), so any module inheriting from it has the GPG plugin configured by default. To check, get the effective POM of your module (mvn help:effective-pom) and look for maven-gpg-plugin.A release will then probably fail, since the GPG plugin expects a GnuPG key with a passphrase. You have 2 options:
- Disable signing by overriding the GPG plugin settings in your POM:
<profiles> <profile> <id>release</id> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-gpg-plugin</artifactId> <configuration> <skip>true</skip> </configuration> </plugin> </plugins> </build> </profile> </profiles> - Set up signing:
- Generate a GPG key, stored in your home folder and used by Maven. On Linux, use the
gpg --gen-keycommand (see its man page for the options). On Windows, use Gpg4win; on Mac, the GPG Suite. If you don't know what to answer to the tool's questions, keep the defaults. - Give Maven the passphrase of this key, either on the command line when performing the release (
mvn release:perform -Darguments=-Dgpg.passphrase=PASSWORD) or in your Maven settings.xml:... <profile> <id>xwiki</id> <properties> <gpg.passphrase>PASSWORD</gpg.passphrase> </properties> ...
- Generate a GPG key, stored in your home folder and used by Maven. On Linux, use the
- Disable signing by overriding the GPG plugin settings in your POM:
- Perform the release:
mvn release:perform -Pintegration-tests,docker -Darguments="-DskipTests -Pintegration-tests,docker" -DskipTests - Push the changes made by the release plugin:
git push origin master - By default, the extension is released on nexus.xwiki.org automatically. If you've configured your POM otherwise, the release stays in a staging repository on Nexus and must be promoted. Ask a committer of the repository or a core committer to do it (on the Forum or the chat), or, if you have the permission, do it yourself (see Nexus Staging):
- Select the repository in the Staging Repositories list.
- Click "Close" and wait a few seconds (it's asynchronous).
- Test your extension from the closed staging repository first: a released repository can't be removed.
- Click "Release" to move your extension to the public repository, and wait a few seconds.
- Your release is then available on nexus.xwiki.org, and anyone can use it as a dependency.
JIRA Release
- If your POM uses a Contrib Parent POM configured to auto-release on JIRA, just add the next version in JIRA.
- Otherwise, release the version in JIRA by hand, and add the next version.
As a committer of the repository, you're an administrator of its JIRA project, which lets you release versions.
Documentation
- Document your extension on its extensions.xwiki.org page as soon as it's published there, otherwise users won't know how to use it or what it's for. Good documentation is key to getting your extension widely used.
Follow the Documentation guide closely, and create new documentation (documentation is undergoing a migration and refactoring).
When you edit the extension page with the object editor, more fields are available (for example ID, website, last version). Review and complete them where applicable. We recommend having:
- A summary explaining briefly what the extension does.
- The "General Compatibility" section, filled with the minimal XWiki version your extension requires.
- The "Tested On" section, filled with the XWiki versions you've tested your extension on. Never remove existing data from it: it's the history of past tests. (There's an ongoing discussion about keeping this section.)
- The Documentation button.
- Add release notes information.
- Announce the release on the XWiki.org Blog (see Announcing the release).
Announcing the release
Create a blog post on the XWiki.org Blog:
- Page name: lowercase kebab-case, <xxx>-extension-<nnn>-released, where <xxx> is the name of your extension and <nnn> its version. Example: blog-extension-1.5.0-released.
- Title: <XXX> Extension <NNN> Released. Example: Blog Extension 1.5.0 Released.
- Main content:
The [[(extension name)>>doc:extensions:Extension.(extension spaces).WebHome]] [[(extension version)>>doc:extensions:Extension.(extension spaces).Versions.(extension version).WebHome]] has been released. (text of the release). - Summary content:
The [[(extension name)>>doc:extensions:Extension.(extension spaces).WebHome]] [[(extension version)>>doc:extensions:Extension.(extension spaces).Versions.(extension version).WebHome]] has been released. (text of the release). - Since (extension version) contains dots, escape them in the reference (for example version 1.10.0 → ...Versions.1\.10\.0.WebHome), because . is the entity separator in XWiki references.
- Categories: Releases, Extensions and Contrib.
- Set the What's New categories, so that the announcement is sent to all XWiki instances around the world:
- First review your text for typos and quality of English (you can ask for a review on the #xwiki chat, for example).
- Set What's New for XWiki.
- Set What's New for XWiki: Admin User (admins are the ones who install and upgrade extensions).
- Set What's New for XWiki: Extension (xwiki-contrib is about extensions).
- If you don't have the permission to create blog posts, ask on the Matrix chat or in the Other category of the forum.
Recovering from a failed Release
If release:perform fails, roll back, fix the problem and release again. Maven generates temporary files in your module's directory: don't remove them.
To roll back, run:
mvn release:rollbackIf you've already deleted those files, you can still recover by doing manually what release:rollback does:
- Revert, in Git, the changes made by release:prepare.
- Delete the local and remote tags created by release:prepare (
git tag --delete the_local_tagandgit push origin :the_remote_tag).
Publishing on extensions.xwiki.org
- First release your extension on the XWiki Maven Remote Repository.
- Go to the Extension wiki home page and click the Import button in the Contribute box (you need to be logged in).
- Enter your extension id (<maven groupId>:<maven artifactId>), select the maven-xwiki repository and click Import. This creates the extension page.
- Check that your extension is marked as "Installable with the Extension Manager", so that users can install it from their XWiki instances.
- Check the fields the import filled: the page name and the authors. If they're wrong, publish a new version of your extension and import it again.
- Fill in the metadata (name, type, category, etc.).
- Add documentation for your extension.
If you've already created an extension page by hand, the import finds it, provided it has the correct extension id (edit the page in Object mode to set it). The import overwrites the data it takes from your pom.xml and keeps the rest (like the description).