Show last authors
1 {{box cssClass="floatinginfobox" title="**Contents**"}}
2 {{toc/}}
3 {{/box}}
4
5 Various extension-oriented mojos for Maven builds.
6
7 = WAR Mojo =
8
9 Generate a complete extension descriptor (##.xed## file) for all the jars packaged in a WAR (next to each one) as well as for the WAR itself (in ##/META-INF/##).
10
11 To execute it:
12
13 {{code language="xml"}}
14 <plugin>
15 <groupId>org.xwiki.commons</groupId>
16 <artifactId>xwiki-commons-tool-extension-plugin</artifactId>
17 <executions>
18 <execution>
19 <goals>
20 <goal>war</goal>
21 </goals>
22 </execution>
23 </executions>
24 </plugin>
25 {{/code}}
26
27 = Register Mojo =
28
29 Generate complete extension descriptor (##.xed## file) for the current artifact in ##/META-INF/##.
30
31 {{code language="xml"}}
32 <plugin>
33 <groupId>org.xwiki.commons</groupId>
34 <artifactId>xwiki-commons-tool-extension-plugin</artifactId>
35 <executions>
36 <execution>
37 <goals>
38 <goal>register</goal>
39 </goals>
40 </execution>
41 </executions>
42 </plugin>
43 {{/code}}
44
45 = XIP Mojo and extension =
46
47 Generate a ##xip## package (a zip file containing extensions formatted like the local extensions repository) containing the dependencies of the current project by default. It's mostly used in conjunction with ##xip## extensions as a packaging tool.
48
49 To use it:
50
51 {{code language="xml"}}
52 <packaging>xip</packaging>
53 {{/code}}
54
55 If you don't use the right parent you might also need to register the ##xip## packaging in your pom:
56
57 {{code language="xml"}}
58 <build>
59 <extensions>
60 <!-- Needed to add support for the "xip" packaging -->
61 <extension>
62 <groupId>org.xwiki.commons</groupId>
63 <artifactId>xwiki-commons-tool-extension-plugin</artifactId>
64 <version>${commons.version}</version>
65 </extension>
66 </extensions>
67 </build>
68 {{/code}}
69
70 == Excluding dependencies ==
71
72 It's possible to indicate a set of dependencies you don't want to include in your XIP (because they are expected to always be there in the target XWiki version) using for example:
73
74 {{code language="xml"}}
75 <build>
76 <pluginManagement>
77 <plugins>
78 <plugin>
79 <groupId>org.xwiki.commons</groupId>
80 <artifactId>xwiki-commons-tool-extension-plugin</artifactId>
81 <version>${commons.version}</version>
82 <configuration>
83 <coreExtensions>
84 <!-- We exclude what is already in the XWiki Standard WAR -->
85 <coreExtension>
86 <groupId>org.xwiki.platform</groupId>
87 <artifactId>xwiki-platform-distribution-war-dependencies</artifactId>
88 <version>${platform.version}</version>
89 <type>pom</type>
90 </coreExtension>
91 </coreExtensions>
92 </configuration>
93 </plugin>
94 </plugins>
95 </pluginManagement>
96 </build>
97 {{/code}}
98
99 = Common parameters =
100
101 All the Mojos above share a list of parameters. Some of them are described here.
102
103 == disabledComponents ==
104
105 {{info}}
106 Since XWiki 12.2.
107 {{/info}}
108
109 This parameter allows to specify a list of components to unregister from the component manager.
110 Example of an usage:
111
112 {{code}}
113 <configuration>
114 <disabledComponents>
115 <disabledComponent>
116 <type>com.xpn.xwiki.doc.MandatoryDocumentInitializer</type>
117 <role>XWiki.XWikiServerXwiki</role>
118 </disabledComponent>
119 </disabledComponents>
120 </configuration>
121 {{/code}}
122
123 Note that if the role is not filled or given, the default hint will be used.

Get Connected