Wiki source code of ContributingExtensions
Version 5.1 by Caleb James DeLisle on 2015/02/13
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | |||
2 | How to contribute an extension on http://extensions.xwiki.org ? | ||
3 | |||
4 | == **step 1**== | ||
5 | |||
6 | Go to http://extensions.xwiki.org and login (You can create an account on http://www.xwiki.org/xwiki/bin/view/XWiki/RealRegistration). | ||
7 | |||
8 | Then type the name of the extension to create (TotemApplication) into the "contribute extension" box and click "add". | ||
9 | |||
10 | [[image:new-extension.png||style="border:1px solid #cccccc;width:90%"]] | ||
11 | |||
12 | == **step 2**== | ||
13 | After clicking the Add button you will be redirected to the edit form of your new extension. | ||
14 | in the "**Source**" field, you can put the URL of github repo containing your application code. | ||
15 | **Description/license/summary** are whatever you want, we're creating an extension which can be installed with the ExtensionManager so "**custom installation"** and "**custom installation instructions**" should remain blank/unchecked. | ||
16 | |||
17 | [[image:extension-info.png||style="border:1px solid #cccccc;width:90%"]] | ||
18 | |||
19 | Once you've done that, just save the TotemApplication page (save & view). | ||
20 | |||
21 | == **step 3**== | ||
22 | Add the .xar file as an attachment to your extension document. | ||
23 | |||
24 | == **step 4**== | ||
25 | So after you've finished uploading the .xar file, click "edit" on the page and then scroll down almost to the bottom... | ||
26 | and click: "Add Download information for the new attachment by filing in a new Extension Version". | ||
27 | |||
28 | [[image:add-down-info.png||style="border:1px solid #cccccc;width:90%"]] | ||
29 | |||
30 | Now you should be back at the edit page with a "Current Downloads" section added. | ||
31 | |||
32 | [[image:current-down.png||style="border:1px solid #cccccc;width:90%"]] | ||
33 | |||
34 | With "Release notes", "download URL" "id" and "version" download url should be attach:<the name of your attachment> | ||
35 | for example: "attach:totem-1.0.xar" | ||
36 | |||
37 | id is just a generic name like "totem" | ||
38 | version is whatever the version number is, for example 1.0 | ||
39 | |||
40 | Make sure to use only <major>.<minor> in the version number, a version number such as 1.0.0 or 1.0-feb13 will cause problems. | ||
41 | |||
42 | Save the extension page (save & view). | ||
43 | |||
44 | == **step 5**== | ||
45 | So when you go back to the page, you should see a field saying "Installable with extension manager". | ||
46 | |||
47 | Notice on this extension, there is that field: http://extensions.xwiki.org/xwiki/bin/view/Extension/Wiki+Flavor+Application. | ||
48 | |||
49 | If there is no "Installable with extension manager" then there is a problem. you have to go back to the edit page and check the extension information as mentionned above in this document. | ||
50 | |||
51 | == **step 6**== | ||
52 | {{info}} | ||
53 | Skip this step if your extension do not depend on other extensions. | ||
54 | {{/info}} | ||
55 | |||
56 | In our example the extension depends on the following extension : http://extensions.xwiki.org/xwiki/bin/view/Extension/Multiselect+custom+display | ||
57 | We need the ID of the dependency extension (In our example : **org.xwiki.contrib:displayer-multiselect-suggest**). | ||
58 | |||
59 | To get the ID of the dependency extension, you can edit the extension in edit object mode. | ||
60 | Click Edit on extension page and append **?editor=object** to the URL in order to be switched into Object Edit mode. | ||
61 | In our example the URL is the following : | ||
62 | http://extensions.xwiki.org/xwiki/bin/edit/Extension/Multiselect+custom+display?editor=object | ||
63 | |||
64 | Now expand the first entry in "**Objects of type ExtensionCode.ExtensionClass (1)**" | ||
65 | Select "id" which is the first entry in that (the value is "**org.xwiki.contrib:displayer-multiselect-suggest**") | ||
66 | Click cancel or close the tab. | ||
67 | |||
68 | So when you got the ID, go back to your extension edit page to declare the dependency. | ||
69 | Scroll down almost to the bottom ... and click: "You can also associate dependencies to each version by filing in the following information in a new Dependency". | ||
70 | |||
71 | [[image:add-new-dep.png||style="border:1px solid #cccccc;width:90%"]] | ||
72 | |||
73 | Now you should be back at the edit page with a "Current Dependencies" section added. | ||
74 | |||
75 | **Extension version** is the version on which this dependency is assigned | ||
76 | **Dependency id** is the identifier of the dependency extension on the repository where it is localed | ||
77 | **Dependency version** constraint is the version related information of the dependency. Can be a version (e.g. 1.0) or one or several ranges of versions based on Maven standard syntax, for example: [1.0,) which would mean "at least 1.0". | ||
78 | |||
79 | Save the extension page (save & view). | ||
80 | |||
81 | [[image:current-dep.png||style="border:1px solid #cccccc;width:90%"]] | ||
82 | |||
83 | To check if dependency was added successfully, go back to the main page and check that the "Installable with the Extension Manager" tag still exists. | ||
84 | extensions.xwiki.org will automatically remove it if something is broken with the extension after adding a dependency. | ||
85 | |||
86 | == **step 7**== | ||
87 | |||
88 | The last step is to start up a fresh wiki on your machine, go to "Administer Wiki", click "Install Extensions" on the left and type the name of your extension, in our example "totem". | ||
89 | |||
90 | Once you verify that the extension has successfully installed (and works) on your local wiki, then the process of creating the extension is complete. | ||
91 | |||
92 | [[image:install-extension.png||style="border:1px solid #cccccc;width:90%"]] |