Set up a local Extension Repository- This seems to work, but I cannot find a good way of downloading all available extensions to host internally. Manually installing extensions will take too long due to the dependency chains.
Install the standalone distribution: XWiki failed to run when I installed using the exe installer for windows. Furthermore, we are looking at deploying several applications, so I’d rather host manually using our own database and Tomcat (which works fine, but I can’t easily import packages).
Import default wiki pages using the XAR import feature- this worked, but the pages and theme were different than what was installed when I did this with an online server.
Use the offline packager maven plugin - I tried this option, but it didn’t seem to work.
The best option seems to be to somehow clone the XWiki extension database for offline use- is there any way to do this?
We’d like to deploy XWiki in a manner similar to a production deployment. Is there a simple way of moving the packages from the ZIP download to an extracted WAR set up in Tomcat? How would we upgrade / manage packages going forward?
That’s good news that it is being worked on in 9.5.
Maven issues:
I’m not sure how to find the extension groupid and artifactid for extensions listed on the online repository. Is there a way to simply add all extensions?
2a) using the pom contained on github:, the .jar file is created in the /target directory (there is no data folder), but the zip archive is not created.).2017-06-15 mvnlog.txt (4.3 KB)
2b) using the pom documented on github (which is different than the file downloaded with the package) generates several errors and no output files.
nothing seems to happen when I load the .jar file (there was no zip file generated to go along with it.
As suggested by its name this is a Maven plugin. So you are not supposed to build it, you are supposed to create a custom pom with what you want to package and use the plugin to package them.
"You can build your project with mvn package , and you will get your repository packaged in the target folder, under the data folder, and a ready to transfer zip file in my.artifact.id-version.zip .
To use that repository, in a fresh installation of XWiki (no database, nor existing extensions installed yet), unzip the resulting package in the permanent directory. Be careful to give appropriate rights to allow the servlet container to write over the extracted files."
I assumed the refence to “you will get your repository packaged in the target folder” would create a .jar file. The output was created when issuing the mvn package command as instructed.
I added a few things to the example pom.xml to make it more accurate.
The goal here is to create a package containing a bunch of extensions in a zip so that you can put them in your XWiki instance and most of those extension are not JARs but packaged wiki pages. Then XWiki will find and install the extensions you added.
Now I’m getting a build failure stating that Plugin org.xwiki.contrib:offline-xwiki-repository-packager-maven-plugin:1.0 could not be resolved. I’ve downloaded this from github and extracted to .m2\repository… am I missing something?
That did the trick! I just simply installed Maven (I’ve never used it before) and I didn’t realize I needed to create the settings.xml file first. Thanks so much!
Ok - so I tried this out and I am able to get to the user interface installation page when configuring XWiki, but the installation fails when it gets to “Resolving extension dependency [org.xwiki.platform:xwiki-platform-livetable-ui-8.4] on namespace [Home]”
I’m guessing I need to add this package to the Maven pom file? How do I establish the groupID, artifactID, and version?
How is it going?
Have you done that challenge?
I faced the same needs - to make offline repository and still cannot understand how it should work.
Can you show me pls your pom.xml and settings.xml?
Hi - yes, I was able to figure this out with the help of Thomas. I currently don’t have access to my personal laptop, but I will put together a set of instructions and send the appropriate files. The offline installation package has helped tremendously as now I only need to do this for extensions which are not included/bundled by default.
I believe you need to set up Maven as if you were going to compile XWiki as described here
Here’s a copy of my pom.xml file pom.txt (10.8 KB)
As you can see there are quite a few extensions commented out. I’m not sure why, but for some reason all extensions would not package correctly in the zip file, so I would note any missing extensions, and then repeat the process with just those extensions until all were loaded and available on my offline installation. I started with the pom.xml listed on GitHub and modified accordingly.
Thank you very much for your file, but I couldn’t setup offline repository.
I do the next steps:
put pom.xml pom.txt (10.8 KB) and offline-repository.xml at the /var/lib/tomcat8/webapps/ROOT/
I run command “mvn package” and wait some time
while it’s downloading(~450Mb), I open xwiki.properties and add there “extension.repositories=local:maven:file://var/lib/tomcat8/webapps/ROOT/.m2/repository”
But there are no extensions - “Administer xWiki - Extensions - Extensions - Local - Local Extensions - Scope button” shows nothing.
I was trying to restart xWiki with changed xwiki.properties.
Where is/are mistake(s)?
I think:
in my .m2/repository only directories, maybe there is should be *.xml also?
Please, let me know about any yours assumptions.
Could you please tell me: which arguments of command “mvn” do you use, when you make an repository?
I try to make repository with “mvn -X -f /tmp/pom.xml -s /var/maven/.m2/settings.xml -Duser.home=/var/maven install” but then, when I add repository /var/maven to xwiki`s config it find no any plugins.
The whole Maven setup / offline repo should NOT be done under your Tomcat folder- In fact, it shouldn’t be possible as you’re production machine is “offline”. I literally have two machines - production (no internet access) and development (internet access).
No need to edit any XWiki/Tomcat configuration files (xwiki.properties) as we’re not standing up a new repository site- we’re simply deploying extensions (and their dependencies directly to XWiki)
You need to follow the instructions here on the development machine - you don’t need tomcat installed at all!
On your development machine:
Follow the instructions described in the above link:
1a. Install and setup Maven
1b. Create a new Maven project (folder)
1c. Create pom.xml and offline-repository.xml and place as instructed
1d. Execute “mvn package”
Copy the .zip file to your production machine
On your production machine:
Extract the zip file to a temporary location
Copy or move the extensions (just like deploying the offline XIP package) (extension\repository) to your XWiki permanent directory extension repository (Tomcat\work\Catalina\localhost\xwiki\extension\repository) - note: mine is called “xwiki” you’re free to name yours whatever you’d like. Note- you should copy and merge the extensions as I’m assuming you’ve already deployed the offline XIP package
Restart Tomcat and you should see your extensions within XWiki when you change the dropdown to “local”