I would like to know whether it is possible to import extensions using .xar files from:
Administration → Import → Add File → Import
in the context of a standalone, offline demo installation of XWiki.
I am using the following version: xwiki-platform-distribution-flavor-xip-17.10.3
Context
My XWiki instance is running on a completely offline machine (no Internet access).
I can only download files from another computer that has Internet access, and then transfer them manually.
Issue encountered
I am trying to use the XWiki Blog Application.
When I create a blog post, instead of displaying my content, I only see the following text:
Trying to install a complex extension offline using XAR and JAR is often hard (mainly because of the hunting down the right dependencies part, as you noticed).
What generally give better results is to produce a XIP package (like the one you used to install the flavor) with the extension(s) you need (and their dependencies) in it. It involves Maven, and it’s not very complex, but it’s a bit of learning if you never used Maven before.
Thank you very much for your reply. It’s really not as simple as you say because I’ve never used Maven and I’m not very comfortable with it. Furthermore, I don’t know how to handle dependencies that don’t have a .xar or .jar file. For example for blog application: org.xwiki.platform:xwiki-platform-localization-macro 12.10.3. There are many dependancies like this that don’t have jar or xar files.
To make what is in the link that you sent, Do I need to add all .jar and .xar in the folder with the pom.xml?
And is it possible to make the command “mvn package” offline?
No, the idea is that Maven automatically download everything needed automatically from the repository. You just indicate the identifier of the top level extension (so the blog in your case).
No, you would create a XIP package on a computer which have access to internet and then use the produced XIP package on the offline XWiki instance.
I wasn’t able to create XIP packages; the pom.xml (based on the one in the documentation you sent me) threw errors when I ran the “mvn package” command. However, I was able to create a pom.xml that sets up a local repository containing everything needed for an extension, and in the pom.xml, I had to add the missing repositories for it to work. My extensions seem to be working this way.