From version 3.2
edited by Vincent Massol
on 2016/08/31 13:09
To version 4.1
edited by Thomas Mortagne
on 2017/02/06 14:43
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -xwiki:XWiki.VincentMassol
1 +xwiki:XWiki.ThomasMortagne
Content
... ... @@ -3,6 +3,7 @@
3 3  {{/box}}
4 4  
5 5  There are 2 types of Extensions:
6 +
6 6  * XAR Extensions: they are wiki pages packaged in a [[format that is called XAR>>extensions:Extension.XAR Module Specifications]] (which stands for XWiki Archive). It's a ZIP file with a specific directory structure and an XML syntax to represent the wik pages, along with a package metadata file.
7 7  * JAR Extensions: they are [[XWiki Components>>extensions:Extension.Component Module]] written in Java and packaged in a JAR.
8 8  
... ... @@ -11,6 +11,7 @@
11 11  The simplest strategy is to create the wiki pages in a running XWiki instance and then to [[export them as a XAR>>Features.Exports||anchor="HXARExport"]].
12 12  
13 13  Note that those wiki pages can contain a lot of things:
15 +
14 14  * pure content,
15 15  * [[scripts>>DevGuide.Scripting]],
16 16  * applications (you can even use the [[Applications Within Minutes application>>extensions:Extension.App Within Minutes Application]] to help create some simple application to match your needs),
... ... @@ -22,6 +22,7 @@
22 22  If you wish to save your XAR sources under [[version control>>https://en.wikipedia.org/wiki/Version_control]] and be able to build it, we recommend using [[Maven>>https://maven.apache.org/]]. There's a plugin called the [[XAR Maven plugin>>dev:Community.XARPlugin]] to help with this.
23 23  
24 24  Here's how you can save the XAR you got when exporting pages from the wiki into your source tree:
27 +
25 25  * create a ##[ROOT]## directory to be the root of your Maven project
26 26  * add a ##pom.xml## file (see below for more details)
27 27  * unzip the XAR into the ##[ROOT]/src/main/resources## directory and remove the ##package.xml## file (you don't need to save it since the Maven XAR plugin will regenerate it)
... ... @@ -62,7 +62,7 @@
62 62   <parent>
63 63   <groupId>org.xwiki.contrib</groupId>
64 64   <artifactId>parent-platform</artifactId>
65 - <version>7.4-6</version>
68 + <version>8.4-4</version>
66 66   </parent>
67 67   <groupId>org.xwiki.contrib</groupId>
68 68   <artifactId>your-extension-id</artifactId>
... ... @@ -92,26 +92,23 @@
92 92   <xwiki.revapi.skip>true</xwiki.revapi.skip>
93 93   Otherwise you should use:
94 94   <xwiki.clirr.skip>true</xwiki.clirr.skip>
98 +
95 95   <!-- The Extension name. If not defined, the <name> property is used -->
96 96   <xwiki.extension.name>Your extension's name</xwiki.extension.name>
101 +
97 97   <!-- The extension's category -->
98 98   <xwiki.extension.category>application</xwiki.extension.category>
104 +
105 + <!-- Issue management -->
106 + <xwiki.release.jira.skip>false</xwiki.release.jira.skip>
107 + <xwiki.issueManagement.system>jira</xwiki.issueManagement.system>
108 + <xwiki.issueManagement.url>https://jira.xwiki.org/jira/browse/(your jira project id)</xwiki.issueManagement.url>
99 99   </properties>
100 - <distributionManagement>
101 - <repository>
102 - <id>xwiki-staging</id>
103 - <name>XWiki Staging Repository</name>
104 - <url>http://nexus.xwiki.org/nexus/service/local/staging/deploy/maven2/</url>
105 - </repository>
106 - </distributionManagement>
107 - <issueManagement>
108 - <system>jira</system>
109 - <url>http://jira.xwiki.org/jira/browse/(your jira project id)</url>
110 - </issueManagement>
111 111  </project>
112 112  {{/code}}
113 113  
114 114  It's important that you set the following information as they'll be used by XWiki's Extension Manager when the extension is installed in XWiki (see below):
114 +
115 115  * Extension id
116 116  * Name
117 117  * Description
... ... @@ -142,6 +142,7 @@
142 142  XWiki has a notion of [[Components>>extensions:Extension.Component Module]], and this is how it provides extensibility at the level of Java. XWiki itself is written as a set of Components. This allows extension writers to author Components that can replace (i.e. override) existing Components or add new Components to the system.
143 143  
144 144  Here are some examples:
145 +
145 145  * [[Add a new Macro>>rendering:Main.ExtendingMacro]],
146 146  * [[Write a Listener>>DevGuide.WritingEventListenerTutorial]],
147 147  * [[Implement a new wiki markup syntax>>rendering:Main.Extending||anchor="HAddinganewSyntax"]],

Get Connected