Skip to content

Infinispan client update #691

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: vNext
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 30 additions & 2 deletions ga/latest/kernel/helpers/build/infinispan-client-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@

set -Eeox pipefail

INFINISPAN_CLIENT_VERSION=${INFINISPAN_CLIENT_VERSION:-10.1.3.Final}
USE_LATEST_COMPATIBLE=${USE_LATEST_COMPATIBLE:-false}

pkgcmd=yum
if ! command $pkgcmd
then
Expand All @@ -25,8 +28,29 @@ fi
$pkgcmd update -y
$pkgcmd install -y maven
mkdir -p /opt/ibm/wlp/usr/shared/resources/infinispan
echo '<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>io.openliberty</groupId> <artifactId>openliberty-infinispan-client</artifactId> <version>1.0</version> <!-- https://mvnrepository.com/artifact/org.infinispan/infinispan-jcache-remote --> <dependencies> <dependency> <groupId>org.infinispan</groupId> <artifactId>infinispan-jcache-remote</artifactId> <version>10.1.3.Final</version> </dependency> </dependencies></project>' > /opt/ibm/wlp/usr/shared/resources/infinispan/pom.xml
mvn -f /opt/ibm/wlp/usr/shared/resources/infinispan/pom.xml versions:use-latest-releases -DallowMajorUpdates=false
cat << EOF > /opt/ibm/wlp/usr/shared/resources/infinispan/pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>io.openliberty</groupId>
<artifactId>openliberty-infinispan-client</artifactId>
<version>1.0</version>
<!-- https://mvnrepository.com/artifact/org.infinispan/infinispan-jcache-remote -->
<dependencies>
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-jcache-remote</artifactId>
<version>${INFINISPAN_CLIENT_VERSION}</version>
</dependency>
</dependencies>
</project>
EOF

if [ "${USE_LATEST_COMPATIBLE}" = "true" ]; then
echo "Finding latest compatible Infinispan client version..."
mvn -f /opt/ibm/wlp/usr/shared/resources/infinispan/pom.xml versions:use-latest-releases -DallowMajorUpdates=false
fi
mvn -f /opt/ibm/wlp/usr/shared/resources/infinispan/pom.xml dependency:copy-dependencies -DoutputDirectory=/opt/ibm/wlp/usr/shared/resources/infinispan
# This fails with dependency errors using microdnf on ubi-minimal, but it is okay to let it fail
yum remove -y maven || true
Expand All @@ -38,3 +62,7 @@ rm -rf ~/.m2
chown -R 1001:0 /opt/ibm/wlp/usr/shared/resources/infinispan
chmod -R g+rw /opt/ibm/wlp/usr/shared/resources/infinispan

INSTALLED_VERSION=$(find /opt/ibm/wlp/usr/shared/resources/infinispan/ -name "*infinispan-commons*.jar" -printf "%f" | sed 's/infinispan-commons-\(.*\).jar/\1/')
if [ -n "$INSTALLED_VERSION" ]; then
echo "Successfully installed Infinispan client version: ${INSTALLED_VERSION}"
fi