The XWiki Contrib Project provides hosting for projects related to XWiki. These projects are not part of the official XWiki distributions and are not maintained by the XWiki development team.

Contrib Project List

The full list projects is available on the xwiki-contrib user on GitHub.

Project NameWhat is it?
CurrikiOpen Source Curriculum Sharing and Editing based on the XWiki Platform.
XWiki OfficeMS Office Integration.
XWiki EclipseRemote/offline browsing of XWiki data in a standalone application or as an Eclipse plugin.
XCLAMSAsset Management System and Social Network software for the Education Community.

Hosting tools

The project hosting forge can provide contributors with some or all of the following tools :

  • A GitHub repository, under http://github.com/xwiki-contrib
  • A JIRA project for tracking bugs and feature requests, at http://jira.xwiki.org/ and under the "XWiki Contributed projects" category. Note that each project should have its own JIRA project (we used to have a single generic JIRA project with different components but this was creating difficulties).
  • A generic maven groupId: org.xwiki.contrib (or org.xwiki.contrib.<module name> if the project has several modules). That's until the project reaches a certain size and visibility, in which case it can have its own maven group id.
  • Project pages on extensions.xwiki.org to describe and document the project. When the project reaches a certain visibility and size it can have its own wiki on xwiki.org.

Contributing to an existing project

If you're interested to contribute to an existing project on http://github.com/xwiki-contrib, please send an email to devs AT xwiki.org (after having subscribed), introducing yourself and explaining what you wish to do. Make sure to create an account on GitHub and mention this id in the email so that we can give you access. Thanks for helping out! emoticon_smile

Why join XWiki Contrib

You could very well develop your XWiki extension in your own GitHub organization and you wonder why put your project on XWiki Contrib. Some reasons:

  • You join a Community, the XWiki open source community. We value a lot the community notion and we want to be more like the Apache Software Foundation (strong sense of community) rather than Source Forge (list of independent projects, little community). In particular, this is why we ask you to introduce yourself when requesting a project.
  • This makes your extension visible to the XWiki community and thus other contributors may want to join you in participating to the development of your extension (contribute on code, discussions, promotion, etc).
  • You get some tools setup for your project (GitHub repository, Issue tracker, Wiki pages)

Requesting a project

The contrib project is open for anyone with a project that request it. Simply send us an email at devs AT xwiki.org using "[Contrib]" at the beginning of your email's subject. Let us know the name and a short description of your project. If your project has already been made available for download on extensions.xwiki.org, please precise it and point us to its page (If it is not, then no need to hurry, you will make it available once it's ready). Finally, let us know which of the listed tools you need. For GitHub access, you will need to register a user on http://github.com and let us know about it (a best practice is to have a username composed of the first letter of your first name immediately followed by your last name, the whole with no capital letter, for example jdoe if your name is John Doe).

When picking the GitHub name please follow the existing conventions:

  • application-<xxx> for apps
  • macro-<xxx> for macros only (if you project provides a macro but also provides other wiki pages then it's considered an app)

Requesting snapshot builds for your project

XWiki.org has a continuous build which builds maven projects each time they are modified on GitHub and put the resulting artifact in our snapshots repository. This is useful when you want people using your project as a dependency to continuously benefit from the improvements.

Your can ask for your project to be added to the continuous build:

  • First you need to use the xwiki parent pom to have the correct distribution management information:
    <project>
    ...
     <parent>
       <groupId>org.xwiki.commons</groupId>
       <artifactId>xwiki-commons-pom</artifactId>
       <version>See https://github.com/xwiki/xwiki-commons/blob/master/pom.xml</version>
     </parent>
    ...
    </project>
  • Send a vote on the [email protected] mailing list to discuss the addition of your project in the continuous build
    [VOTE] Add myproject to the continuous build

    Hi XWikiers,

    I'm working on myproject and since it's used as a
    dependency by someotherproject it'd be convenient
    if it was built continuously.

    Here's my +1.

    Thanks,
    Me.

Release the project

XWiki.org allows you to release your project on its maven repository as long as you follow the following steps:

  • Use org.xwiki.contrib as groupId in your maven module
  • Request for an account on http://nexus.xwiki.org on [email protected]
  • Once you've received your credentials put them in ~/.m2/settings.xml
    <settings>
    ...
    <servers>
    ...
     <server>
       <id>xwiki-staging</id>
       <username>username</username>
       <password>********</password>
     </server>
    ...
    </servers>
    ...
    </settings>
  • Put the following configuration in your project 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}</url>
     </scm>
    ...
     <distributionManagement>
       <repository>
         <id>xwiki-staging</id>
         <name>XWiki Staging Repository</name>
         <url>http://nexus.xwiki.org/nexus/service/local/staging/deploy/maven2/</url>
       </repository>
     </distributionManagement>
    ...
    </project>

    Where {extensionrepository} is the name of the repository in http://github.com/xwiki-contrib/.

  • Release the project with the maven release plugin
    mvn release:prepare

    If the project you're releasing is transitively using a version of the Maven Release Plugin < 2.5 and you're using Git 1.9+ then it's going to fail. To avoid this this issue you need to force using version 2.5 of the Maven Release Plugin as follows:

    mvn org.apache.maven.plugins:maven-release-plugin:2.5:prepare

    If you are releasing from Microsoft Windows and inherit from standard XWiki Commons root pom < 6.2 you might have issues performing the release (see http://jira.xwiki.org/browse/XCOMMONS-553 for details). The workaround is to skip the enforcer plugin:

    mvn release:perform -Denforcer.skip=true
  • In the recent versions of xwiki, we started signing the produced artifacts (http://en.wikipedia.org/wiki/Digital_signature). This helps downloaders check that indeed the binary is what was initially put in there, and was not replaced by an intruder.

    The signing maven plugin is configured in the toplevel pom ( <groupId>org.xwiki.commons</groupId><artifactId>xwiki-commons</artifactId> ) so any module that's inheriting from that will have the gpg plugin configured by default. To find out, get the effective pom of your module ( mvn help:effective-pom ) and check if the gpg maven plugin is there (maven-gpg-plugin).

    If you're gonna try to release like that, it will probably fail since the gpg plugin expects you to have a gnupg key with a password. You now have 2 options:

    • Overwrite the settings of the gpg plugin in your pom to disable signing:
        <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>
    • Configure your setup to sign properly. To do that, you will have to:
      • generate a gpg key which will be stored in your home folder and will be used by maven. On linux you can do that using the default gpg command (gpg --gen-key
        , read the man page if you want to know more about the options). On win and/or mac, you can use tools like GNUPG or GPGTools. If you don't know what to fill in for the options requested by the tool, keep the defaults.
      • Tell maven the passphrase of this key (the one you entered upon key generation), either in the command line when performing the release mvn release:perform -Darguments=-Dgpg.passphrase=PASSWORD or set it in your maven settings.xml like this
        ...
         <profile>
           <id>xwiki</id>
           <properties>
             <gpg.passphrase>PASSWORD</gpg.passphrase>
           </properties>
        ...
  • You're done now, you can go on releasing
    mvn release:perform

    If the project you're releasing is transitively using a version of the Maven Release Plugin < 2.5 and you're using Git 1.9+ then it's going to fail. To avoid this this issue you need to force using version 2.5 of the Maven Release Plugin as follows:

    mvn org.apache.maven.plugins:maven-release-plugin:2.5:perform
  • Note that you'll need to push the changes done by the release plugin: git push origin master
  • Ask for someone to promote your release (ie. make it available on maven.xwiki.org) in the thread you've created earlier
  • After that your release will be available for download on maven.xwiki.org and anyone will be able to use it as a dependency for his own project
  • If your project is using JIRA, release the version in JIRA and add a new version label for the next version.
  • Update the documentation for your project (or create it if there's none) on the Extensions Wiki and make sure to add release notes information. See the next section for more.

Publishing on extensions.xwiki.org

The first step is to release your extension in the XWiki Maven Remote Repository. Then go the Extension wiki home page and click on the Import button located inside the Contribute box (you'll need to be logged in). Then fill in your extension id (the format is <maven groupId>:<maven artifactId>), select the maven-xwiki repository and press the import button.

If you have already created an extension page manually on extensions.xwiki.org, the import will locate it (provided you've filled the correct extension id in your extension page, you can edit it in Object mode to fill it if that's not the case) and will overwrite data that it finds in your extension's pom.xml file, preserving the rest of the information you've manually entered (like the description).

Implementing your Maven build

Here's an example of how your pom.xml should look like (adapt to your need) if you're contributing an application (XAR):

<?xml version="1.0" encoding="UTF-8"?>

<!--
 *
 * See the NOTICE file distributed with this work for additional
 * information regarding copyright ownership.
 *
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 *
-->


<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 <modelVersion>4.0.0</modelVersion>
 <parent>
   <groupId>org.xwiki.commons</groupId>
   <artifactId>xwiki-commons-pom</artifactId>
   <version>4.5</version>
 </parent>
 <groupId>org.xwiki.contrib</groupId>
 <artifactId>your-extension-id</artifactId>
 <version>1.0-SNAPSHOT</version>
 <name>Your extension's name</name>
 <packaging>xar</packaging>
 <description>Your extension's description</description>
 <scm>
   <connection>scm:git:git://github.com/xwiki-contrib/(your extension id).git</connection>
   <developerConnection>scm:git:[email protected]:xwiki-contrib/(your extension id).git</developerConnection>
   <url>https://github.com/xwiki-contrib/(your extension id)</url>
 </scm>
 <developers>
   <developer>
     <id>id of developer 1</id>
     <name>Full Name of developer 1 as registered on xwiki.org, e.g. Vincent Massol</name>
   </developer>
    ...
   <developer>
     <id>id of developer N</id>
     <name>Full Name of developer N as registered on xwiki.org, e.g. Vincent Massol</name>
   </developer>
 </developers>
 <properties>
   <!-- Don't run CLIRR here since there's no Java code. -->
   <xwiki.clirr.skip>true</xwiki.clirr.skip>
 </properties>
 <build>
   <!-- Needed to add support for the XAR packaging -->
   <extensions>
     <extension>
       <groupId>org.xwiki.commons</groupId>
       <artifactId>xwiki-commons-tool-xar-handlers</artifactId>
       <version>${commons.version}</version>
     </extension>
   </extensions>
   <plugins>
     <!-- The XAR packaging uses the XAR plugin and thus we need to define what version to use -->
     <plugin>
       <groupId>org.xwiki.commons</groupId>
       <artifactId>xwiki-commons-tool-xar-plugin</artifactId>
       <version>${commons.version}</version>
     </plugin>
   </plugins>
 </build>
 <distributionManagement>
   <repository>
     <id>xwiki-staging</id>
     <name>XWiki Staging Repository</name>
     <url>http://nexus.xwiki.org/nexus/service/local/staging/deploy/maven2/</url>
   </repository>
 </distributionManagement>
</project>

It's very important that you set the following information as they'll be used when you publish your extension on extensions.xwiki.org:

  • Extension id
  • Name
  • Description
  • Developers

You'll also need to set the SCM information since using the Maven Release plugin will require those to be set.

If you've modified the groupId or artifactId of the extension you need to tell it to the Extension Manager so that it can handle upgrades and understand it's the same extension being upgraded. For example if the extension previously had an extension id of tdelafosse:meeting-application and you're now using another id, you need to add the following property to your pom.xml:

<properties>
...
 <!-- Old names of this module used for retro compatibility when resolving dependencies of old extensions -->
 <xwiki.extension.features>tdelafosse:meeting-application</xwiki.extension.features>
...
</properties>

In addition you need to pay attention to the version of the dependencies you're going to use (for example the parent POM dependency to org.xwiki.commons:xwiki-commons-pom). If you wish your extension to be used by the maximum number of XWiki users you need to use the oldest dependencies version for which you extension still works. This is because your extension will only be able to be installed in XWiki versions satisfying those dependencies you expressed.

Application Design

This section provides suggested best practices for writing an application. It is there to ensure your application is nice and easy to use by XWiki users.

  • Put all your pages in a space dedicated for your application. This makes your application nicely compartmented. Pick a short space name (e.g. UserDirectory). Examples of space names:

    spaces.png

  • Ensure that all technical pages of your application are marked as hidden so that users don't see them by default. To do so, edit those pages and tick the hidden checkbox

    hidden.png

  • Make sure you add a User Interface Extension (UIX) for the Application Panel extension point. This registers your application into the Application Panel:

    applications-panel.png

    This is done by adding an object of type XWiki.UIExtensionClass in a page in your application space. We recommend having a page named <your space>.ApplicationsPanelEntry (e.g. Blog.ApplicationPanelEntry). For example:
    application-uix.png

    In order to have a nice-looking UIX page, We also recommend to have the following content on that page (insert it in wiki edit mode):

    {{include document="XWiki.UIExtensionSheet" /}}

Documenting

After you've published your extension in the XWiki Maven Remote Repository, import it on extensions.xwiki.org (click on "Import" on that page, you'll need to be logged in after registering yourself). This creates an extension page. Verify that your extension is marked as "Installable with the Extension Manager". This makes it easy for users to install it from within their XWiki instances.

Verify the value of the fields filled automatically by the import, namely:

  • The page name
  • The description
  • The authors

If they're wrong you'll need to publish a new version of your extension and re-import it.

Edit it and provide nice user-friendly documentation. We recommend the following elements to be present:

  • Description of what the extension does and the features it has (briefly). Provides an overview screenshot if it makes sense.
  • Usage: explains how to use it
  • Document each feature with some text but very importantly with a screenshot
  • Fill the Compatibility section with the minimal version of XWiki your extension requires or has been tested with

Make sure to follow the Documentation guide. For example take a special care to follow the Image best practices (use the {{image}} macro and don't take large screenshots as mentioned).

Make sure that you add documentation for your extension as soon as it's published on extensions.xwiki.org. Otherwise nobody is going to start using it and people will start wondering what it's about.

Generally speaking check out documentation of existing extensions and try to mimic what you see (don't hesitate to go beyond the quality of what you see; you want your extension to be the most used, right? emoticon_smile Documentation goes a long way towards achieving this!).

Tags:
   

Get Connected