Hi,
I am running an offline xwiki that for security reasons is running in a shielded environment which has no internet connectivity whatsoever. The installation went fine (RHEL) using the settings for the offline repository. Now I want to add some extensions to my install, however I run into some issues. I hope someone here can point me in the right direction and shed some light on where I should be looking next.
So far I have never used Apache’s maven, so I am probably doing some obvious stuff wrong, but I really cannot find what it is that I am messing up.
What I did so far is (obviously) install maven and set the correct environment variables. The data that I’ll post here comes from a test machine that is online itself, I’m trying to create the packages on there.
[root@localhost xwiki-platform-export]# mvn --version
Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63)
Maven home: /opt/maven
Java version: 11.0.16, vendor: Red Hat, Inc., runtime: /usr/lib/jvm/java-11-openjdk-11.0.16.0.8-1.el7_9.x86_64
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-1160.66.1.el7.x86_64", arch: "amd64", family: "unix"
I’ve cloned the repo with GIT
git clone https://github.com/xwiki/xwiki-platform.git
git checkout stable-14.6.x
Then from the xwiki-platform directory I tried to build the packages for test using ‘mvn package’. Here I would continuesly run into the following error:
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for org.xwiki.platform:xwiki-platform-tools:14.6.1-SNAPSHOT: Could not find artifact org.xwiki.platform:xwiki-platform:pom:14.6.1-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 25, column 11
After some probing and testing and googling I decided to replace the version number as test as I could not find any reference to the .1-SNAPSHOT part.
grep -rli '14.6.1-SNAPSHOT' * | xargs -i@ sed -i 's/14.6.1-SNAPSHOT/14.6/g' @
This seemed to have worked as after that it started downloading all sorts of things and attempted to build stuff, until it ran into the following error:
[INFO] --- maven-compiler-plugin:3.10.1:compile (default-compile) @ xwiki-platform-tool-jetty-listener ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 2 source files to /home/tomcat/xwiki-platform/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-listener/target/classes
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for XWiki Platform - Parent POM 14.6:
[INFO]
[INFO] XWiki Platform - Parent POM ........................ SUCCESS [ 0.914 s]
[INFO] XWiki Platform - Tools - Parent POM ................ SUCCESS [ 0.098 s]
[INFO] XWiki Platform - Tools - XWiki Configuration Resources SUCCESS [ 9.947 s]
[INFO] XWiki Platform - Tools - Jetty - Parent POM ........ SUCCESS [ 0.062 s]
[INFO] XWiki Platform - Tools - Jetty - Jetty Lifecycle Listener FAILURE [ 0.535 s]
[INFO] XWiki Platform - Tools - Jetty - Jetty Configuration Resources SKIPPED
<rest of output omitted>
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:compile (default-compile) on project xwiki-platform-tool-jetty-listener: Fatal error compiling: error: release version 11 not supported -> [Help 1]
Because I really just want the PDF export extension I went into that sub-directory and tried a mvn package in there, but it would run into the same ‘version 11 not supported’ error.
This is where I get stuck and don’t know how to continue on my path. I googled all afternoon but all solutions to this error point to setting the correct JAVA_HOME env, but this is set correct at the system
[root@localhost xwiki-platform]# echo $JAVA_HOME
/usr/lib/jvm/jre
[root@localhost xwiki-platform]# ls -als /usr/lib/jvm/jre
0 lrwxrwxrwx. 1 root root 21 Jul 28 16:34 /usr/lib/jvm/jre -> /etc/alternatives/jre
[root@localhost xwiki-platform]# ls -als /etc/alternatives/jre
0 lrwxrwxrwx. 1 root root 55 Jul 28 16:34 /etc/alternatives/jre -> /usr/lib/jvm/java-11-openjdk-11.0.16.0.8-1.el7_9.x86_64
From here on my google skills appear insufficient as I cannot find anything that could get me past this error.
Is there someone who can point me into a new direction?
Cheers,
Tnias