Wiki source code of Dependencies
Last modified by Thomas Mortagne on 2020/03/23 10:15
Hide last authors
author | version | line-number | content |
---|---|---|---|
2.1 | 1 | Extensions can define dependencies. Those will automatically be installed by Extension Manager when installing the extension. It's also a good way to make sure the extension is installed on the right version of XWiki. | |
2 | |||
3.1 | 3 | See also [[Maven repository handler documentation>>Extension.Extension Module.Repositories.Maven]] to have more details on how exactly to define dependencies in the Maven build. | |
4 | |||
9.1 | 5 | {{toc/}} | |
6 | |||
4.1 | 7 | = Optional dependencies = | |
2.1 | 8 | ||
7.1 | 9 | It's possible to indicate that a dependency is optional. This means that Extension Manager will install all of them by default but optional dependencies won't have any impact on the validity of the extension: | |
4.1 | 10 | ||
2.1 | 11 | * if the optional dependency install plan fail the extension is installed without it | |
12 | * if the optional dependency is uninstalled it won't uninstall the extension | ||
13 | * if the optional dependency is missing at startup it won't make the extension invalid | ||
14 | |||
6.1 | 15 | {{info}} | |
7.1 | 16 | Since 11.7RC1, in the context of Maven repositories, this apply only to extensions using the custom Maven property ##xwiki.extension.optionalIncluded## with ##true## to avoid going against Maven default behavior (for retro compatibility reasons it's ##true## by default for grouIds prefixes known to be XWiki often be extensions: "org.xwiki" and "com.xwiki"). See [[custom Maven properties>>Extension.Extension Module.Repositories.Maven||anchor="HCustomproperties"]] for more details. | |
6.1 | 17 | {{/info}} | |
2.1 | 18 | ||
4.1 | 19 | = Managed dependencies = | |
20 | |||
1.1 | 21 | Since 8.1, Extension Manager support the concept of managed dependencies. | |
22 | |||
23 | Its the same idea than Maven's {{code}}<dependencyManagement>{{/code}} element. It allows the following: | ||
4.1 | 24 | ||
1.1 | 25 | * indicate the version or other properties associated to a dependency in managed dependencies and just indicate the id in the actual dependencies | |
26 | * overwrite the version or other properties associated to any corresponding transitive dependency | ||
8.1 | 27 | ||
28 | = Ignored dependencies = | ||
29 | |||
30 | Since 12.2 and 11.10.4 you can force Extension Manager to ignore a set of dependencies using the property #### in ##xwiki.properties## file: | ||
31 | |||
32 | {{code language="properties"}} | ||
33 | extension.ignoredDependencies=stax:stax | ||
34 | extension.ignoredDependencies=javax.xml.stream:stax-api | ||
35 | extension.ignoredDependencies=stax:stax-api | ||
36 | extension.ignoredDependencies=xalan:xalan | ||
37 | extension.ignoredDependencies=xalan:serializer | ||
38 | {{/code}} |