|
16 | 16 |
|
17 | 17 | set -Eeo pipefail |
18 | 18 |
|
| 19 | +INFINISPAN_CLIENT_VERSION=${INFINISPAN_CLIENT_VERSION:-10.1.3.Final} |
| 20 | +INFINISPAN_USE_LATEST_COMPATIBLE=${INFINISPAN_USE_LATEST_COMPATIBLE:-false} |
| 21 | + |
19 | 22 | pkgcmd=yum |
20 | 23 | if ! command $pkgcmd |
21 | 24 | then |
|
25 | 28 | $pkgcmd update -y |
26 | 29 | $pkgcmd install -y maven |
27 | 30 | mkdir -p /opt/ibm/wlp/usr/shared/resources/infinispan |
28 | | -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 |
29 | | -mvn -f /opt/ibm/wlp/usr/shared/resources/infinispan/pom.xml versions:use-latest-releases -DallowMajorUpdates=false |
| 31 | +cat << EOF > /opt/ibm/wlp/usr/shared/resources/infinispan/pom.xml |
| 32 | +<project xmlns="http://maven.apache.org/POM/4.0.0" |
| 33 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 34 | + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| 35 | + <modelVersion>4.0.0</modelVersion> |
| 36 | + <groupId>io.openliberty</groupId> |
| 37 | + <artifactId>openliberty-infinispan-client</artifactId> |
| 38 | + <version>1.0</version> |
| 39 | + <!-- https://mvnrepository.com/artifact/org.infinispan/infinispan-jcache-remote --> |
| 40 | + <dependencies> |
| 41 | + <dependency> |
| 42 | + <groupId>org.infinispan</groupId> |
| 43 | + <artifactId>infinispan-jcache-remote</artifactId> |
| 44 | + <version>${INFINISPAN_CLIENT_VERSION}</version> |
| 45 | + </dependency> |
| 46 | + </dependencies> |
| 47 | +</project> |
| 48 | +EOF |
| 49 | + |
| 50 | +if [ "${INFINISPAN_USE_LATEST_COMPATIBLE}" = "true" ]; then |
| 51 | + echo "Finding latest compatible Infinispan client version..." |
| 52 | + mvn -f /opt/ibm/wlp/usr/shared/resources/infinispan/pom.xml versions:use-latest-releases -DallowMajorUpdates=false |
| 53 | +fi |
30 | 54 | mvn -f /opt/ibm/wlp/usr/shared/resources/infinispan/pom.xml dependency:copy-dependencies -DoutputDirectory=/opt/ibm/wlp/usr/shared/resources/infinispan |
31 | 55 | # This fails with dependency errors using microdnf on ubi-minimal, but it is okay to let it fail |
32 | 56 | yum remove -y maven || true |
|
0 commit comments