From version 36.1
edited by Vincent Massol
on 2019/10/04 17:23
To version 37.1
edited by Vincent Massol
on 2019/11/13 14:38
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -79,7 +79,8 @@
79 79  |##profiles##|No default (empty)|Comma-separated list of Maven profile ids|When specified the defined profiles are active when resolving dependencies from the current POM.
80 80  |##forbiddenServletEngines##|No default (empty)|List of ##ServletEngine##s enums|List of Servlet Engines for which the tests will be skipped (usually because they'd fail on them).
81 81  |##databaseProperties##|No default (empty)|See Docker documentation for the target image|List of database docker commands to use and that will override default commands (example of command ##character-set-server=utf8mb4## which will translate into ##~-~-character-set-server=utf8mb4## at runtime).
82 -|##dependencies##|No default (empty)|Comma-separated list of Maven coordinates|List aritfacts that will be provisioned in the running XWiki instance. When specified then current pom.xml dependencies are not used to find out what to provision. This can be used for example in cases when you don't want to use project dependencies in order to not draw older version of dependencies (such as when you need to run functional docker-based tests in a specific more recent vesion of XWiki than the one used to build the code). Accepted format is ##groupId:artifactId##, ##groupId:artifactId:version## and ##groupId:artifactId:type:version##. {{info}}Since 11.2RC1{{/info}}.
82 +|##dependencies##|No default (empty)|Comma-separated list of Maven coordinates|List artifacts that will be provisioned in the running XWiki instance. When specified then current pom.xml dependencies are not used to find out what to provision. This can be used for example in cases when you don't want to use project dependencies in order to not draw older version of dependencies (such as when you need to run functional docker-based tests in a specific more recent vesion of XWiki than the one used to build the code). Accepted format is ##groupId:artifactId##, ##groupId:artifactId:version## and ##groupId:artifactId:type:version##. {{info}}Since 11.2RC1{{/info}}.
83 +|##extensionOverrides##|No default (empty)|List Extension Manager overrides|See example below for the format. {{info}}Since 11.6RC1{{/info}}.
83 83  
84 84  = Examples =
85 85  
... ... @@ -188,6 +188,51 @@
188 188  </plugin>
189 189  {{/code}}
190 190  
192 +== Example 6: Passing extension overrides ==
193 +
194 +The following tells the Extension Manager to use the existing core extension ##com.google.code.findbugs:annotations## whenever the extension ##com.google.code.findbugs:jsr305## is requested.
195 +
196 +{{code language="java"}}
197 [email protected](extensionOverrides = {
198 + @ExtensionOverride(
199 + extensionId = "com.google.code.findbugs:jsr305",
200 + overrides = {
201 + "features=com.google.code.findbugs:annotations"
202 + }
203 + )
204 +})
205 +...
206 +{{/code}}
207 +
208 +Note that in the XWikio build, these extension overrides are defined in the top level XWiki Platform POM and for this specific case it's defined as:
209 +
210 +{{code language='xml'}}
211 +...
212 +<extensionOverride>
213 + <id>com.google.code.findbugs:jsr305</id>
214 + <features>com.google.code.findbugs:annotations</features>
215 +</extensionOverride>
216 +...
217 +{{/code}}
218 +
219 +Another example:
220 +
221 +{{code language="java"}}
222 +...
223 +extensionOverrides = {
224 + @ExtensionOverride(
225 + extensionId = "org.xwiki.platform:xwiki-platform-web",
226 + overrides = {
227 + // We set a default UI for the subwiki in the webapp, so that the Wiki Creation UI knows which extension
228 + // to install on a subwiki by default (which is something we test)
229 + // Otherwise the wiki creation form will display the flavor picker and the functional tests do not handle it.
230 + "properties=xwiki.extension.distribution.wikiui=org.xwiki.platform:xwiki-platform-wiki-ui-wiki"
231 + }
232 + )
233 +}
234 +...
235 +{{code}}
236 +
191 191  = Best Practices =
192 192  
193 193  == Scenarios ==

Get Connected