Developing a Project
This page explains how to build your project, get it built by our CI, get it translated, and design an application that's easy to use. Follow the development practices too.
Implementing your Maven build
See the Creating Extensions tutorial.
Requesting CI / Snapshot builds for your project
XWiki.org has a continuous build that builds Maven projects each time they're modified on GitHub, and puts the resulting artifacts in our snapshots Maven repository. This lets people who use your project as a dependency benefit from its improvements continuously, and lets users of your extension try it before it's released.
To add your project to the continuous build:
- Use the XWiki Contrib parent POM, so that you have the correct distribution management information. For example, for a project depending on xwiki-platform (see Parent POM for details):
<project> ... <parent> <groupId>org.xwiki.contrib</groupId> <artifactId>parent-platform</artifactId> <version>see the building section below to choose the version</version> </parent> ... </project> - Add a Jenkinsfile at the root of your module. This simple example should work fine:
/* * 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. */ // It's assumed that Jenkins has been configured to implicitly load the vars/xwikiModule.groovy library which exposes // the "xwikiModule" global function/DSL. // Note that the version used is the one defined in Jenkins but it can be overridden as follows: // @Library("XWiki@<branch, tag, sha1>") _ // See https://github.com/jenkinsci/workflow-cps-global-lib-plugin for details. xwikiModule { }For more examples and details, see the Continuous Integration documentation. To see what this Jenkinsfile does and how to configure it, see the xwikiModule source code.
Your project appears on the CI page for XWiki Contrib automatically within 24 hours. To get it there sooner, ask on the chat or the Forum.
Requesting translation component on l10n.xwiki.org
XWiki.org and some xwiki-contrib projects manage their translations with Weblate on l10n.xwiki.org. You can have your project translated there too. Follow our translation best practices to avoid issues.
- If you don't have admin rights on l10n.xwiki.org, ask on the Forum and give:
- The link to the GitHub repository.
- The path of each translation source, relative to the root of the repository.
- If you do, follow the XWiki Weblate configuration procedure.
Application Design
These best practices make your application nice and easy to use for XWiki users.
- Put all your pages in a space dedicated to your application, so that it's nicely compartmented. Pick a short space name (for example UserDirectory). Examples of space names:

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

- Add a User Interface Extension (UIX) for the Application Panel extension point. This registers your application in the Application Panel:

To do so, add an object of type XWiki.UIExtensionClass to a page of your application space. We recommend a page named <your space>.ApplicationsPanelEntry (for example Blog.ApplicationsPanelEntry). For example:

For a nice-looking UIX page, also put the following content on that page (in wiki edit mode):
{{include document="XWiki.UIExtensionSheet" /}}