To create your own XIP packages you need to complete the following steps(Linux):
Install Apache Maven:
(Steps originally described in these guide https://tecadmin.net/install-apache-maven-on-centos/ https://dev.xwiki.org/xwiki/bin/view/Community/Building/#HInstallingMaven)
Download the latest release (Binary file, .tar.gz) from https://maven.apache.org/download.cgi , version 3.5.4 or greater
> cd /opt
> wget https://www-us.apache.org/dist/maven/maven-3/X.X.X/binaries/apache-maven-X.X.X-bin.tar.gz (replace URL with correct version)
Extract your archive
> sudo tar xzf apache-maven-X.X.X-bin.tar.gz
> sudo ln -s apache-maven-X.X.X maven
Configure environmental variables
> sudo nano /etc/profile.d/maven.sh
Add the following content to the file and save it:
export M2_HOME=/opt/maven
export PATH=${M2_HOME}/bin:${PATH}
export MAVEN_OPTS="-Xmx1024m"
Now load the variables
> source /etc/profile.d/maven.sh
Test if maven is correctly installed
> mvn -version
Create a ~/.m2/settings.xml file with the XWiki custom remote repository defined as shown below
> nano ~/.m2/settings.xml
xwiki
xwiki-snapshots
XWiki Nexus Snapshot Repository Proxy
https://nexus.xwiki.org/nexus/content/groups/public-snapshots
false
true
xwiki-releases
XWiki Nexus Releases Repository Proxy
https://nexus.xwiki.org/nexus/content/groups/public
true
false
xwiki-snapshots
XWiki Nexus Plugin Snapshot Repository Proxy
https://nexus.xwiki.org/nexus/content/groups/public-snapshots
false
true
xwiki-releases
XWiki Nexus Plugin Releases Repository Proxy
https://nexus.xwiki.org/nexus/content/groups/public
true
false
xwiki
You have now installed and configured Apache Maven to be used for creating xwiki extension XIP files. The following information on how to generate the XIP file parcially comes from https://dev.xwiki.org/xwiki/bin/view/Community/ExtensionPlugin/#HExample and https://forum.xwiki.org/t/issues-creating-packages-for-offline-repository/10773
Create a new empty directory for the XIP file you would like to generate, in this example I'll use the ldap-authentication extension
> mkdir ldap-authentication
Inside the (empty) directory, create a pom.xml file and add the content below. Adjust configuration where needed for the extension you would like to package
> cd ldap-authentication
> nano pom.xml
4.0.0
org.xwiki.platform
xwiki-platform-distribution
14.1
org.xwiki.contrib.ldap
ldap-xip
xip
true
org.xwiki.contrib.ldap
ldap-authenticator
9.7.4
<-- Leave the settings below as they are -->
org.xwiki.commons
xwiki-commons-tool-extension-plugin
${commons.version}
org.xwiki.platform
xwiki-platform-distribution-war-dependencies
${platform.version}
pom
Save the file. You can now build your XIP package
> mvn package
When successful the package will be in the newly created 'target' subdirectory. If for some reason something was messed up and you have to retry but run into some warnings that previous settings are being tried, then include -U to your command. (mvn package -U)