How to install extensions in a dockerized setup with no internet access

Hi,
my xWiki setup in the cloud does NOT have Internet access. Therefore I can’t use Extension Manager to install new extensions.

Is there a way to point XE_WAR_HOME/WEB-INF/lib to external docker volume - path on the hosting machine, just like it’s done for “/usr/local/xwiki”?

Any other way? (yeah, maven is not an option either)

I know, I’ll have to manually manage dependencies, but that’s OK…

I’m using docker-compose

Thanks

Hi, if you google for “xwiki installation offline” you should land on https://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Installation/#HInstallingwithoutinternetconnection

So we offer a XIP for the XWiki Standard Flavor but not for all contrib extensions. You might need to build one.

Thanks. you are fast!
Yes, I’ve used the XIP method to bring up the initial setup. But now I’m stuck at adding other extensions.

Sorry, but I don’t understand what do you mean by this “You might need to build one.”

I meant you might need to build a XIP for the extensions you’re using if one is not provided (and as I said we only provide a XIP for the XWiki Standard Flavor).

See Extension Maven Plugin (Community.ExtensionPlugin.WebHome) - XWiki

This requires some small Maven knowledge though (but not much, you can invoke the xip mojo from the command line).

Would it work if I collect all dependencies (jar) and copy everything into a directory in the container:

/usr/local/tomcat/webapps/ROOT/WEB-INF/lib/

You shouldn’t do this since it would mean bypassing the Extension Manager (EM) and thus you wouldn’t be able to upgrade, remove, control the extension using the EM.

But it’s not too hard to generate a XIP and configure XWiki to use it.

I’ve just created a FAQ/tutorial entry on xwiki.org for this:
How to generate a XIP file for an Extension? (XWiki.org)

Hope it helps

Vincent, thank you very much!

Since I haven’t worked with java for a long time, I just want to clarify one thing - I’ll have to build XIP from sources, right?
And dependencies, do I need sources as well, or they can be .jar files?

Thanks again and I apologize for beginner questions

yes, using Maven.

No need for sources for deps, they’ll be included automatically as JARs by Maven in the generated XIP.

This is likely more a Maven question (which I’m a complete beginner with), but do you have any suggestions for how to do this with the OIDC plugin?

Using the docker container to build the plugin with the FAQ you created, as well as the other XIP info from the documentation, I’ve encountered:

root@79ebe037721e:~/workingdir/oidc# mvn clean install
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[WARNING] 'parent.relativePath' of POM org.xwiki.contrib.oidc:oidc:1.29.2-SNAPSHOT (/root/workingdir/oidc/pom.xml) points at org.xwiki.contrib.oidc:oidc instead of org.xwiki.contrib:parent-platform, please verify your project structure @ line 25, column 11
[ERROR] 'packaging' with value 'xip' is invalid. Aggregator projects require 'pom' as packaging. @ line 35, column 14
 @ 
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project org.xwiki.contrib.oidc:oidc:1.29.2-SNAPSHOT (/root/workingdir/oidc/pom.xml) has 1 error
[ERROR]     'packaging' with value 'xip' is invalid. Aggregator projects require 'pom' as packaging. @ line 35, column 14
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException

Which looks like I’m trying to do something that isn’t supported by Maven, but I’m not sure.