Wiki source code of XWiki Contrib

Last modified by Vincent Massol on 2023/11/28 10:33

Show last authors
1 {{box cssClass="floatinginfobox" title="**Contents**"}}
2 {{toc/}}
3 {{/box}}
5 **XWiki Contrib** is a community dedicated to collaborative development of XWiki related projects and extensions in the spirit of wiki communities. These projects are not part of the official XWiki distributions and are not maintained by the XWiki development team.
7 = Contrib Project List =
9 The full list of Contrib projects is available on [[GitHub>>]]
11 Note that projects not having an active maintainer are moved to the [[Attic>>]] (The definition of "active" is left to the community and anyone can propose to move inactive projects to the Attic).
13 = Hosting tools =
15 The project hosting forge can provide contributors with some or all of the following tools:
17 * A **GitHub repository**, under
18 * A **JIRA project** for tracking bugs and feature requests, at 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).
19 * 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.
20 * **Project pages** on [[>>extensions:Main.WebHome]] to describe and document the project. When the project reaches a certain visibility and size it can have its own wiki on
21 * A **CI job** on for building the project automatically on each commit (more specifically see [[XWiki Contrib jobs>>]]).
22 * A **Sonar project report** on to analyze the project's quality with various metrics.
23 * **Translations**, under the [[l10n platform>>]].
24 * There's no dedicated Forum. For the moment, all the projects share the [[Development category of the forum>>]], but if a project becomes too active for it, a dedicated forum Category can be requested.
25 * There's no dedicated chat room, the [[main #xwiki chat room>>dev:Community.Chat]] must be used, but if a project becomes too active for it, a dedicated chat room can be requested.
27 = Contributing to an existing project =
29 If you're interested to contribute to an existing project on, please send a post to the [[Forum (dev category)>>]], 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! :)
31 = Why join XWiki Contrib =
33 You could very well develop your XWiki extension in your own GitHub organization and you might wonder why put your project on XWiki Contrib. Some reasons:
35 * 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.
36 * 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).
37 * You get some tools setup for your project (GitHub repository, Issue tracker, Wiki pages)
39 = Development Practices =
41 In order to simplify participating to any project in ##xwiki-contrib##, the recommended development practices to follow are [[all those found on>>dev:Main.WebHome]](i.e. the same as for the ##xwiki## github organization). This prevents the issue that someone who wants to participate to more than 1 project needs to learn several dev practices; they're all the same. Now, these practices are best practices and the intent is that committers try to follow them as much as they can, in their capacity. Other committers reviewing code should be lenient in their comments and sentences like "You must do xxx" should be avoided and instead sentences like "When you have the time, it would be nice if you could...". OTOH, when a committer joins ##xwiki-contrib##, he/she should understand that these best practices exist (and possibly spend some time reading them), and agree about following them as much as he/she can. Obviously anyone is free to discuss an existing rule and propose changing it or dropping it altogether.
43 = Requesting a project =
45 The contrib project is open for anyone who wish to start a new project. Simply send a post on the [[Forum (dev category)>>]] using the ##contrib## tag. Let us know the name and a short description of the project. If your project has already been made available for download on, please mention 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 tools listed above you need. For GitHub access, you will need to register a user on 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).
47 == Choosing the name ==
49 When picking the GitHub name please use a single word (e.g. ##forum##). However, sometimes that is not descriptive enough, so you can either use multiple words next to each other (e.g. ##filemanager##) if that makes sense and looks natural enough or, if not, you should separate the words with a dash (e.g. ##multiselect-suggest##). Whatever you decide, please try to keep it as short and descriptive as possible.
51 Try to avoid using names that would not work well if some new Maven modules need to be added in the future (e.g. avoid using ##figure-macro## since there could be new modules added that wouldn't be macros, such as API, Application (XAR) or other module types. In short, this means having a "business" name, not related to the extension type.
53 If there's already a repo with the name you want to use, consider adding your code as a sub-module if it fits the same domain and can be released together (same release lifecycle). If it doesn't fit, use a different name (adding a qualifier or a different name altogether).
55 Special cases:
57 * ##icon-themes##. This is a reserved name and it's also the name of a [[special repository containing all Icon Themes>>]]. If you want to contribute a new Icon theme, you should add a new ##icon-theme-<yyy>## directory in this repository. We release all Icon Themes together with the same version as we consider them too small to be released separately.
58 * ##color-themes##. This is a reserved name and it's also the name of a [[special repository containing all Color Themes>>]]. If you want to contribute a new Color theme, you should add a new ##color-theme-<yyy>## directory in this repository. We release all Color Themes together with the same version as we consider them too small to be released separately.
60 //Hint//: When in doubt, have a look at [[existing repository names>>]] for inspiration but only for repos created after the 2023-05-16 since the naming strategy was changed at that date!
62 Always avoid using the ##xwiki-## prefix since this one is used by XWiki GitHub organization repositories (i.e. Core modules). You should also avoid using it as a suffix since all Contrib projects are related to XWiki.
64 {{info}}
65 Before the 16th of May 2023, the rules were:
67 When picking the GitHub name please follow the existing conventions:
69 * ##application-<xxx>## for apps
70 * ##macro-<xxx>## for macros only (if you project provides a macro but also provides other wiki pages then it's considered an app)
71 * ##api-<xxx>## for APIs only (same as for macro, if it contains UI as well, then you should call it an app instead)
72 * ##displayer-<xxx>## for custom displayers
73 * ##syntax-<xxx>## for rendering syntaxes
74 * ##authenticator-<xxx>## for authenticators
75 * ##skin-<xxx>## for skins
76 * webjar-<xxx> for webjar packagings
78 For the actual project name part (##<xxx>## of the git repository name) it is preferred to use a single word (e.g. ##application-forum##). However, sometimes that is not descriptive enough, so you can either use multiple words next to each other (e.g. ##application-filemanager##) if that makes sense and looks natural enough or, if not, you should separate the words with a dash (e.g. ##displayer-multiselect-suggest##). Whatever you decide, please try to keep it as short and descriptive as possible.
80 Special cases:
82 * ##icon-themes##. This is a reserved name and it's also the name of a [[special repository containing all Icon Themes~>>>]]. If you want to contribute a new Icon theme, you should add a new ##icon-theme-<yyy>## directory in this repository. We release all Icon Themes together with the same version as we consider them too small to be released separately.
83 * ##color-themes##. This is a reserved name and it's also the name of a [[special repository containing all Color Themes~>>>]]. If you want to contribute a new Color theme, you should add a new ##color-theme-<yyy>## directory in this repository. We release all Color Themes together with the same version as we consider them too small to be released separately.
85 //Hint//: When in doubt, have a look at [[existing repository names>>]] for inspiration.
87 Please try to avoid using the ##xwiki-## prefix since this one is used by XWiki GitHub organization repositories (i.e. Core modules).
88 {{/info}}
90 == Template ==
92 It's very useful for projects to have a file providing various information (who the lead is, the best practices for contributing to this project, etc). We recommend using the following template:
94 {{code language="none"}}
95 # <Pretty name of Extension, e.g. Flash Messages Application>
97 <Short Description of Extension, taken from the description element in the pom.xml>
99 * Project Lead: [<info taken from the jira project, e.g. Vincent Massol>](<url to user profile on>)
100 <if single extension page>
101 * [Documentation & Download](<url on e.x.o, e.g.>)
102 </if single extension page>
103 <if several extension pages>
104 * Documentation & Downloads:
105 * [<pretty name of page1, e.g. My App API](<url1 on e.x.o)
106 ...
107 * [<pretty name of pageN, e.g. My App API](<urlN on e.x.o)
108 </if several extension pages>
109 * [Issue Tracker](<url on, e.g.>)
110 * Communication: [Forum](<url, e.g.></url>), [Chat](<url, e.g.>)
111 <if link pointing to all dev practices>
112 * [Development Practices](<URL pointing to a site defining the list of practices to be followed by contributors when contributing on this project>)
113 </if link pointing to all dev practices>
114 <if no single link pointing to all dev practices>
115 * Development Practices:
116 * <best practice 1, possibly with some link>
117 ...
118 * <best practice N, possibly with some link>
119 </if no single link pointing to all dev practices>
120 * Minimal XWiki version supported: <taken from the pom.xml, e.g. XWiki 6.4.7>
121 * License: <license,taken from the pom.xml, e.g. LGPL 2.1>.
122 <if translation is used>
123 * [Translations](<url on l10n to translations for this extension>)
124 </if translation is used>
125 <if translation is not used>
126 * Translations: N/A
127 </if translation is not used>
128 <if sonar is used>
129 * [Sonar Dashboard](<url to the project’s dashboard on, e.g.>)
130 </if sonar is used>
131 <if sonar is not used>
132 * Sonar Dashboard: N/A
133 </if sonar is not used>
134 <if ci is used>
135 * Continuous Integration Status: [![Build Status](<job name on>/job/master/badge/icon)](<job name on>/job/master/)
136 </if ci is used>
137 <if ci is not used>
138 * Continuous Integration Status: N/A
139 </if ci is not used>
141 <optional>
142 ## Whatever
143 ...
144 </optional>
145 {{/code}}
147 Here's [[an example>>]].
149 {{info}}
150 In order to find the build status URL for the badges, you should navigate to your project on and then click on the "Embeddable Build Status" link ([[example>>]]). Use the "Markdown (with view)" and "unprotected" links.
151 {{/info}}
153 == For XWiki Admins ==
155 You have to create 2 things:
157 * A GitHub repository
158 * a JIRA project
160 === GitHub Repository Creation ===
162 Perform the following steps:
164 * Navigate to the [[GitHub Template Repository>>]] and click the "Use this template" dropdown and select "Create a new repository"
165 * Select ##xwiki-contrib## as the owner and make sure it's public. Choose a proper name and description (see above). Then click "Create repository from template".
166 * Go the new repository settings and perform the following changes:
167 ** Uncheck the "wiki", "issues" and "projects" checkboxes
168 ** Add the ##xwikiorg## group in the "Manage Access" settings. Make sure to select the "Write" permission (it's "Read" by default).
169 ** Under "Notifications", add the notifications AT xwiki DOT org email
171 === JIRA Project Creation ===
173 * Go to the [[JIRA project view>>]]
174 * Click "Create Project" and select "Create with shared configuration" as on:(((
175 {{image reference="jira.png" width="350px"/}}
176 )))
177 * Select the "LATEX" project to copy the config from since it's one project that is known to have the right config.
178 * After it's been created it's nice to add a ##1.0## version
179 * Also make sure to check that the Category is set to "XWiki Contributed Projects - Others" (it's located in "Details" or simply click "Edit" on the [[JIRA project view>>]]).
181 ==== Permissions, Groups & Roles ====
183 * Contrib committers (##xwiki-contrib## GitHub Organization) must be added to the ##contrib-committers## group
184 * XWiki committers (##xwiki## GitHub organization) must be added to the ##xwiki-committers## group
186 When you copy the LATEX jira project you inherit from these rules:
188 * Projects must have the ##Committers## role be including ##contrib-committers## and ##xwiki-committers## groups
189 * Projects must have the ##contrib-committers## and ##xwiki-committers## groups added to the ##Administrators## role so that Contrib & XWiki committers can release the projects in JIRA (in addition to being able to release at the SCM level).
190 * Project permissions must be using the ##Committers## role to decide what user are allowed to access.
191 * TODO: Add rules about special contributors.
193 === Matrix room ===
195 * Click on the + button to create a room
196 [[image:1698328014513-470.png||height="268" width="216"]]
197 * Select "New Room"
198 * Define a name and a topic
199 * Select public room
200 * Define the room address (which must be agreed on during the matrix room forum request)
202 = Requesting CI / Snapshot builds for your project =
204 has a [[continuous build>>dev:Community.ContinuousBuild]] which builds maven projects each time they are modified on GitHub and put the resulting artifact in our [[snapshots Maven repository>>]]. This is useful when you want people using your project as a dependency to continuously benefit from the improvements or to tell users of your Extension try it out before it's released.
206 To have your project added to the continuous build follow thes steps:
208 * First you need to use the XWiki parent pom to have the correct distribution management information. For example for a projects depending on ##xwiki-platform## (See [[Parent POM>>]] for more details):(((
209 {{code language="xml"}}
210 <project>
211 ...
212 <parent>
213 <groupId>org.xwiki.contrib</groupId>
214 <artifactId>parent-platform</artifactId>
215 <version>see the building section below to choose the version</version>
216 </parent>
217 ...
218 </project>
219 {{/code}}
220 )))
221 * Add a [[##Jenkinsfile##>>]] to the root of your module. Here's a simple example that should work fine:(((
222 {{code language="groovy"}}
223 /*
224 * See the NOTICE file distributed with this work for additional
225 * information regarding copyright ownership.
226 *
227 * This is free software; you can redistribute it and/or modify it
228 * under the terms of the GNU Lesser General Public License as
229 * published by the Free Software Foundation; either version 2.1 of
230 * the License, or (at your option) any later version.
231 *
232 * This software is distributed in the hope that it will be useful,
233 * but WITHOUT ANY WARRANTY; without even the implied warranty of
235 * Lesser General Public License for more details.
236 *
237 * You should have received a copy of the GNU Lesser General Public
238 * License along with this software; if not, write to the Free
239 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
240 * 02110-1301 USA, or see the FSF site:
241 */
243 // It's assumed that Jenkins has been configured to implicitly load the vars/xwikiModule.groovy library which exposes
244 // the "xwikiModule" global function/DSL.
245 // Note that the version used is the one defined in Jenkins but it can be overridden as follows:
246 // @Library("XWiki@<branch, tag, sha1>") _
247 // See for details.
249 xwikiModule {
250 }
251 {{/code}}
253 For more examples and details, check the [[Continous Integration documentation>>dev:Community.ContinuousBuild#HJenkinsPipelines]] (and if you wish to see what this ##Jenkinsfile## will do and how to configure it, check the [[xwikiModule source code>>]]).
254 )))
256 {{warning}}
257 If you wish to see your project appear quickly on the [[CI page for XWiki Contrib>>]], ping a dev on IRC or on the [[Forum>>]]. If you don't, then it'll appear automatically within 24 hours.
258 {{/warning}}
260 = Requesting translation component on =
262 and some contrib projects are using Weblate on to manage their translations.
263 You can ask to have your own project translated on the same platform. Don't forget to follow [[our translations best practices>>dev:Community.DevelopmentPractices#HTranslationBestPractices]] in that case to avoid any issue.
265 If you are not a committer the easiest way is to ask on the [[Forum>>]] by providing the following information:
267 * the link to the Github repository
268 * the relative path to the translation sources from the root of the repository (if you have several translation sources, indicate them all)
270 If you are a committer the procedure to follow is available on [[XWiki Weblate configuration page>>dev:Community.Weblate Configuration#HHowtoimporttranslationfilesautomatically]].
272 = Release the project =
274 There are 3 main steps to release your project:
276 {{toc scope="local"/}}
278 == JIRA Release ==
280 * If your project is using JIRA, release the version in JIRA and add a new version label for the next version.
281 * If you're using a [[Contrib Parent POM>>]] then you can configure your POM to [[auto-release on JIRA>>]].
283 == Release using Maven ==
285 allows you to release your project on the [[XWiki Maven Remote Repository>>]] as long as you follow these steps:
287 * Use ##org.xwiki.contrib## as ##groupId## in your maven module
288 * Request for an account on [[Nexus>>]] by sending a post on the [[Forum>>]], mentioning the username you'd wish to have (you could also mention which extension you're planning to release to provide contextual information).
289 * Once you've received your credentials put them in(((
290 ##~~/.m2/settings.xml##
292 {{code language="xml"}}
293 <settings>
294 ...
295 <servers>
296 ...
297 <server>
298 <id>xwiki-staging</id>
299 <username>username</username>
300 <password>********</password>
301 </server>
302 ...
303 </servers>
304 ...
305 </settings>
306 {{/code}}
307 )))
308 * If you're using a [[Contrib Parent>>]] in your POM under ##<parent>## and if you have configured the JIRA plugin to do automatic releases, make sure to also [[update your ##settings.xml## with JIRA credentials>>]].
309 * Put the following configuration in your project(((
310 ##pom.xml##
312 {{code language="xml"}}
313 <project>
314 ...
315 <scm>
316 <connection>scm:git:git://{extensionrepository}.git</connection>
317 <developerConnection>scm:git:[email protected]:xwiki-contrib/{extensionrepository}.git</developerConnection>
318 <url>{extensionrepository}/tree/master</url>
319 </scm>
320 ...
321 </project>
322 {{/code}}
324 Where ##{extensionrepository}## is the name of the repository in [[]].
325 )))
326 * Release the project with the maven release plugin (notice the ##integration-tests## profile that is needed when there are functional tests but that you should always use since it doesn't harm; the full command is important, otherwise only a portion of the modules will get prepared and thus some will have wrong versions afterwards).(((
327 {{code language="none"}}
328 mvn release:prepare -Pintegration-tests,docker -Darguments="-DskipTests" -DskipTests
329 {{/code}}
331 {{warning}}
332 If you want to skip the enforcer plugin, use:
334 {{code language="none"}}
335 mvn release:prepare -Pintegration-tests,docker -Darguments="-DskipTests -Dxwiki.enforcer.skip=true" -DskipTests
336 {{/code}}
337 {{/warning}}
338 )))
339 * The released XWiki artifacts are signed ([[http:~~/~~/>>]]). This helps downloaders check that indeed the binary is what was initially put in there, and was not replaced by an intruder.(((
340 The signing maven plugin is configured in the toplevel pom ( {{code}}<groupId>org.xwiki.commons</groupId><artifactId>xwiki-commons</artifactId>{{/code}} ) 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 ( {{code}}mvn help:effective-pom{{/code}} ) and check if the gpg maven plugin is there (maven-gpg-plugin).
342 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:
344 * Overwrite the settings of the gpg plugin in your pom to disable signing:(((
345 {{code}}
346 <profiles>
347 <profile>
348 <id>release</id>
349 <build>
350 <plugins>
351 <plugin>
352 <groupId>org.apache.maven.plugins</groupId>
353 <artifactId>maven-gpg-plugin</artifactId>
354 <configuration>
355 <skip>true</skip>
356 </configuration>
357 </plugin>
358 </plugins>
359 </build>
360 </profile>
361 </profiles>
362 {{/code}}
363 )))
364 * Configure your setup to sign properly. To do that, you will have to:
365 ** 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 ({{code}}gpg --gen-key{{/code}}, read the man page if you want to know more about the options). On Windows you can use [[Gpg4win>>]], while on Mac you have the [[GPG Suite>>]]. If you don't know what to fill in for the options requested by the tool, keep the defaults.
366 ** Tell maven the passphrase of this key (the one you entered upon key generation), either in the command line when performing the release {{code}}mvn release:perform -Darguments=-Dgpg.passphrase=PASSWORD{{/code}} or set it in your maven settings.xml like this(((
367 {{code}}
368 ...
369 <profile>
370 <id>xwiki</id>
371 <properties>
372 <gpg.passphrase>PASSWORD</gpg.passphrase>
373 </properties>
374 ...
375 {{/code}}
376 )))
377 )))
378 * You're done now, you can go on releasing(((
379 {{code language="none"}}
380 mvn release:perform -Pintegration-tests,docker
381 {{/code}}
383 {{info}}
384 On Windows you can use this command to successfully perform the release:
386 {{code language="none"}}
387 mvn release:perform -Pintegration-tests,docker -Darguments="-Dgpg.passphrase="YourGpg4winPassword" -Dxwiki.enforcer.skip=true"
388 {{/code}}
390 but be careful to replace "YourGpg4winPassword" with the actual password chosen when creating a GPG key with [[Gpg4win>>]].
391 {{/info}}
393 {{info}}
395 On Windows, when you have this issue:
397 {{code language="none"}}
398 gpg: no default secret key: secret key not available
399 gpg: signing failed: secret key not available
400 {{/code}}
402 * Add this to your settings.xml:
404 {{code}}
405 ...
406 <profile>
407 <id>xwiki</id>
408 <properties>
409 <gpg.keyname>your_user_id</gpg.keyname>
410 <gpg.homedir>path_to_your_key</gpg.homedir>
411 <gpg.passphrase>PASSWORD</gpg.passphrase>
412 </properties>
413 ...
414 {{/code}}
416 {{/info}}
418 {{info}}
419 In case you're wondering why we force using this Maven Release plugin version, it's because versions < 2.5 of this plugin have a bug when using Git 1.9+ which leads to not resolving properly SNAPSHOT versions when tagging.
420 {{/info}}
422 {{warning}}
423 If the application has also a special module that execute UI tests and you want to release the modules, but not run the tests, you should:
425 {{code language="none"}}
426 mvn release:perform -Pintegration-tests -Darguments="-DskipTests -Pintegration-tests" -DskipTests
427 {{/code}}
429 {{/warning}}
430 )))
431 * Note that you'll need to push the changes done by the release plugin: {{code}}git push origin master{{/code}}
432 * By default the extension will be automatically released on In case you have configured your extension's POM so that it's not the case then ask for someone (on the [[Forum>>]] or on IRC) to validate your release from the staging repository on [[Nexus>>]] to make your extension available on Alternatively if you've been granted the permissions you can do this yourself by understanding [[Nexus Staging>>]]. To perform promotion do the following:
433 ** Select the repository to validate in the Staging Repositories list
434 ** Click the "Close" button to close it. Wait a few seconds since it's done asynchronously.
435 ** Make sure to test your extension from the closed staging repo first since a released repo cannot be removed!
436 ** Once you want to move your extension from the Staging Repository to the Public Repository click the "Release" button. Wait a few seconds since it's done asynchronously.
437 * After that your release will be available for download on and anyone will be able to use it as a dependency for his own project
439 == Documentation ==
441 * Update the documentation for your project (or create it if there's none) on the [[Extensions Wiki>>extensions:Main.WebHome]] and make sure to add release notes information. See the next sections for more.
442 * Announce the new release on the [[ Blog>>]].
443 ** Use the following templates:
444 *** For the main content:(((
445 {{code language="none"}}
446 The [[(extension name)>>doc:extensions:Extension.(extension spaces).WebHome]] [[(extension version)>>doc:extensions:Extension.(extension spaces).WebHome||anchor="H(extension version)"]] has been released.
448 (text of the release).
449 {{/code}}
450 )))
451 *** For the summary content:(((
452 {{code language="none"}}
453 The [[(extension name)>>doc:extensions:Extension.(extension spaces).WebHome]] [[(extension version)>>doc:extensions:Extension.(extension spaces).WebHome||anchor="H(extension version)"]] has been released. (text of the release).
454 {{/code}}
455 )))
456 ** Use the ##Releases##, ##Extensions## and ##Contrib## categories
457 ** Set the What's New categories so that the announcement is sent to all XWiki instances around the world. To do that:
458 *** Make sure to review your text for typos and quality of English (you can ask for a review on the #xwiki chat for example).
459 *** Set the ##What's New for XWiki## category
460 *** Set the ##What's New for XWiki: Admin User## category (since it's Admin who upgrade or install extensions)
461 *** Set the ##What's New for XWiki: Extension## category (since contrib is about extensions)
462 ** If you don't have permissions to create blog posts, please ask on the [[Matrix chat>>dev:Community.Chat]] or on [[the forum, in the Other category>>]].
464 = Recovering from a failed Release =
466 It may happen that the ##release:perform## fails. In this case you'll want to rollback, fix the problem and release again. Maven generates temporary files in your module's directory. Don't remove them! :)
468 To rollback you need to call the following:
470 {{code language="none"}}
471 mvn release:rollback
472 {{/code}}
474 {{warning}}
475 The document for the [[##release:rollback## mojo>>]] says that currently the deletion of the created tag is not implemented. Thus even if you see the rollback call you will still need to perform step 2 of the manual process below.
476 {{/warning}}
478 Now if you have already deleted those files, don't panic! It's still easy to recover. You'll just need to do manually [[what the ##release:rollback## does>>]]:
480 * Rollback the changes done by the ##release:prepare## call by reverting the changes in Git
481 * Remove the local and remote tag created by the ##release:prepare## call ({{code language="none"}}git tag --delete the_local_tag{{/code}} and {{code language="none"}}git push origin :the_remote_tag{{/code}}).
483 = Publishing on =
485 The first step is to [[release>>#HReleasetheproject]] your extension in the XWiki Maven Remote Repository. Then go the [[Extension wiki home page>>extensions:Main.WebHome]] and click on the [[Import>>extensions:ExtensionCode.ImportExtension]] 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.
487 If you have already created an extension page manually on, 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).
489 {{info}}
490 If you have already imported your Extension and you've just published a new version in and you wish to update the version seen on you should know that this is automatically done every night by a scheduler job so you don't have to do anything. However if you wish to force it, go to your extension page and click the refresh icon located at the top right corner of that page.
491 {{/info}}
493 = Implementing your Maven build =
495 See the [[Creating Extensions tutorial>>xwiki:Documentation.DevGuide.Tutorials.CreatingExtensions.WebHome]].
497 = Retire a Contrib project =
499 See [[Retiring a module>>dev:Community.DevelopmentPractices#HRetiringamodule]].
501 = Application Design =
503 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.
505 * 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:(((
506 {{image reference="spaces.png"/}}
507 )))
508 * 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(((
509 {{image reference="hidden.png"/}}
510 )))
511 * Make sure you add a User Interface Extension (UIX) for the Application Panel extension point. This registers your application into the Application Panel:(((
512 {{image reference="applications-panel.png"/}}
514 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:
515 {{image reference="application-uix.png"/}}
517 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):
519 {{code}}
520 {{include document="XWiki.UIExtensionSheet" /}}
521 {{/code}}
522 )))
524 = Documenting =
526 After you've published your extension in the XWiki Maven Remote Repository, import it on [[>>extensions:Main.WebHome]] (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.
528 {{warning}}
529 If you've already created the page on [[>>extensions:Main.WebHome]] prior to importing the extension then make sure you've used the correct extension id on your extension page as otherwise the import will not be able to import your extension data on the right page and instead it'll create another page and you'll find yourself with 2 pages...
530 {{/warning}}
532 Verify the value of the fields filled automatically by the import, namely:
534 * The page name
535 * The description
536 * The authors
538 If they're wrong you'll need to publish a new version of your extension and re-import it.
540 Edit it and provide nice user-friendly documentation. We recommend the following elements to be present:
542 * Description of what the extension does and the features it has (briefly). Provides an overview screenshot if it makes sense.
543 * Usage: explains how to use it
544 * Document each feature with some text but very importantly with a screenshot
545 * Fill the "General Compatibility" section with the minimal version of XWiki your extension requires to be installed
546 * Fill the "Tested On" section with the versions of XWiki you've tested your extension on. Never remove any existing data from this section since they represent past tests and we need to keep the history.
548 Make sure to follow the [[Documentation guide>>dev:Community.DocGuide]]. For example take a special care to follow the [[Image best practices>>dev:Community.DocGuide#HScreenshots2FImages]] (use the {{{{{image}}}}} macro and don't take large screenshots as mentioned).
550 Make sure that you add documentation for your extension as soon as it's published on [[>>extensions:Main.WebHome]]. Otherwise nobody is going to start using it and people will start wondering what it's about.
552 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? :) Documentation goes a long way towards achieving this!).

Get Connected