Wiki source code of Fill a local Maven repository with the default user interface extensions
Version 3.3 by Vincent Massol on 2017/09/06
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | {{warning}} | ||
2 | This should only be used if the server in which to install XWiki has no network access, and no other means to install the user interface is available. | ||
3 | {{/warning}} | ||
4 | |||
5 | === Prerequisites === | ||
6 | |||
7 | * a staging / development server which has access to the internet, to collect the necessary resources from there | ||
8 | * a minimal development environment on the staging server including the ##mvn## tool, as if you want to [[build XWiki from Source>>doc:dev:Community.Building]] | ||
9 | * a way to copy the resources from the staging to the production server | ||
10 | * write access to the ##xwiki.properties## on the server | ||
11 | |||
12 | === Download the UI resources === | ||
13 | |||
14 | First make sure that you have the right ##settings.xml## on the staging server, which has the XWiki repositories enabled. | ||
15 | You also might want to move away your current ##$HOME/.m2/repository## temporarily to mimimize the amount of files to be transferred to production later. | ||
16 | |||
17 | Create an empty directory and place the following file as ##pom.xml## in it: | ||
18 | |||
19 | {{code}} | ||
20 | <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
21 | <modelVersion>4.0.0</modelVersion> | ||
22 | <parent> | ||
23 | <groupId>org.xwiki.commons</groupId> | ||
24 | <artifactId>xwiki-commons-pom</artifactId> | ||
25 | <version>7.4</version> | ||
26 | </parent> | ||
27 | <groupId>never-mind</groupId> | ||
28 | <artifactId>never-mind</artifactId> | ||
29 | <version>0.0</version> | ||
30 | <name>dummy download package</name> | ||
31 | <packaging>pom</packaging> | ||
32 | <dependencies> | ||
33 | <dependency> | ||
34 | <groupId>org.xwiki.enterprise</groupId> | ||
35 | <artifactId>xwiki-enterprise-ui-mainwiki</artifactId> | ||
36 | <version>7.4</version> | ||
37 | <type>xar</type> | ||
38 | </dependency> | ||
39 | </dependencies> | ||
40 | </project> | ||
41 | {{/code}} | ||
42 | |||
43 | Make sure to update the version numbers (here ##7.4##) in both the ##<parent>## and the ##<dependencies>##. | ||
44 | |||
45 | Open a command line, change to the directory created in the previous step and issue the command: | ||
46 | |||
47 | {{code}} | ||
48 | mvn clean org.apache.maven.plugins:maven-dependency-plugin:go-offline | ||
49 | {{/code}} | ||
50 | |||
51 | This should download all the required resources and dependencies. | ||
52 | |||
53 | === Install the resources on the server === | ||
54 | |||
55 | As the next step, copy the complete ##/.m2/repository## to a directory on the production server where the user running the XWiki webapp can read it. | ||
56 | (**TODO:** figure out if only parts of the directory are sufficient, i.e. ##/.m2/repository/org/xwiki##) | ||
57 | |||
58 | Configure in the ##xwiki.properties## the destination directory on the server as the "main xwiki" repository: | ||
59 | |||
60 | {{code}} | ||
61 | extension.repositories=maven-xwiki:maven:file:/path/to/copy/of/the/.m2/repository | ||
62 | {{/code}} | ||
63 | |||
64 | Restart the server (if already running), remove/move away the "permanent directory" (wherever the property ##${environment.permanentDirectory}## points to) - just in case it remembers previous failed install attempt (when upgrading, better only move aside ##${environment.permanentDirectory}/jobs## ) - and access XWiki via the browser to see if the distribution wizard comes up again. | ||
65 | |||
66 | This time it should find the necessary files from the local repository and install the UI. |