Changes for page Creating XWiki Components
Last modified by Simon Urli on 2023/10/10
From version 47.1
edited by Vincent Massol
on 2011/12/06
on 2011/12/06
Change comment:
Fix tutorial now that our archetype is on maven central
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. VincentMassol1 +XWiki.slauriere - Content
-
... ... @@ -23,9 +23,7 @@ 23 23 To make it easier for you to get started, we have created a [[Maven Archetype>>http://maven.apache.org/plugins/maven-archetype-plugin/]] to help create a simple component module with a single command. 24 24 25 25 After you've [[installed Maven>>http://maven.apache.org]], open a shell prompt an type: 26 -{{code language="none"}} 27 -mvn archetype:generate 28 -{{/code}} 26 +{{code language="none"}}mvn archetype:generate{{/code}} 29 29 30 30 This will list all archetypes available on Maven Central. If instead you wish to directly use the XWiki Component Archetype, you can directly type (update the version to use the version you wish to use): 31 31 ... ... @@ -323,7 +323,7 @@ 323 323 324 324 In the component world, the current request information is held in an **[[execution context>>http://maven.xwiki.org/site/xwiki-core-parent/xwiki-core-context/apidocs/org/xwiki/context/ExecutionContext.html]]**. This is actually more powerful than the old XWiki context, as it is a generic execution context, and you can create one anytime you want and use it anyway you want. And you don't have to manually pass it around with all method calls, as execution contexts are managed by the **[[Execution component>>http://maven.xwiki.org/site/xwiki-core-parent/xwiki-core-context/apidocs/org/xwiki/context/Execution.html]]**, which you can use just like any other XWiki component. 325 325 326 -In short, if you want to get access to the execution context (which holds context information inserted by the new components), you must declare an injection point on the ##Execution## component (located in the ##xwiki-co re-context## module), and then you can write:324 +In short, if you want to get access to the execution context (which holds context information inserted by the new components), you must declare an injection point on the ##Execution## component (located in the ##xwiki-commons-context## module), and then you can write: 327 327 328 328 {{code}} 329 329 /** Provides access to the request context. Injected by the Component Manager. */