Skip to content

Commit c4a6d99

Browse files
authored
Switch to Java 17 as default (#195)
Switches sample to Java 17 as default. Additional space added to the Java backend to accommodate downloaded JRE. Sidecar is also grew bigger.
1 parent bc366d3 commit c4a6d99

5 files changed

Lines changed: 13 additions & 9 deletions

File tree

.github/workflows/maven.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ jobs:
1616

1717
steps:
1818
- uses: actions/checkout@v2
19-
- name: Set up JDK 1.8
19+
- name: Set up JDK
2020
uses: actions/setup-java@v1
2121
with:
22-
java-version: 1.8
22+
java-version: 17
2323
- name: Build with Maven
2424
run: mvn -B clean install

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ Prerequisites:
207207
- Get an SAP Business Technology Platform account to deploy the services and applications.
208208
- [Create a SAP HANA Cloud Instance](https://developers.sap.com/tutorials/hana-cloud-deploying.html) in your SAP Business Technology Platform space.
209209
- Ensure you have an entitlement for `SAP HANA Schemas & HDI Containers` with plan `hdi-shared` in the same space.
210+
- Ensure that your CF instances are connected to Internet to download SAPMachine JRE 17 as it is available in `sap_java_buildpack` in online mode only.
210211

211212
Deploy as Single Tenant Application:
212213
- Rename `mta-single-tenant.yaml` to `mta.yaml`

mta-multi-tenant.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@ modules:
1818
path: srv
1919
parameters:
2020
memory: 1024M
21-
disk-quota: 256M
21+
disk-quota: 512M
2222
buildpack: sap_java_buildpack
2323
properties:
2424
SPRING_PROFILES_ACTIVE: cloud,sandbox
2525
CDS_MULTITENANCY_APPUI_TENANTSEPARATOR: "-"
26+
JBP_CONFIG_COMPONENTS: "jres: ['com.sap.xs.java.buildpack.jre.SAPMachineJRE']"
27+
JBP_CONFIG_SAP_MACHINE_JRE: '{ use_offline_repository: false, version: 17.+ }'
2628
build-parameters:
2729
builder: custom
2830
commands:
@@ -50,7 +52,7 @@ modules:
5052
path: mtx-sidecar
5153
parameters:
5254
memory: 256M
53-
disk-quota: 512M
55+
disk-quota: 1024M
5456
requires:
5557
- name: bookshop-mt-service-manager
5658
- name: bookshop-mt-uaa

mta-single-tenant.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@ modules:
1212
path: srv
1313
parameters:
1414
memory: 1024M
15-
disk-quota: 256M
15+
disk-quota: 512M
1616
buildpack: sap_java_buildpack
1717
properties:
18-
SPRING_PROFILES_ACTIVE: cloud,sandbox
18+
SPRING_PROFILES_ACTIVE: cloud,sandbox
19+
JBP_CONFIG_COMPONENTS: "jres: ['com.sap.xs.java.buildpack.jre.SAPMachineJRE']"
20+
JBP_CONFIG_SAP_MACHINE_JRE: '{ use_offline_repository: false, version: 17.+ }'
1921
build-parameters:
2022
builder: custom
2123
commands:

pom.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<revision>1.0.0-SNAPSHOT</revision>
1616

1717
<!-- DEPENDENCIES VERSION -->
18-
<jdk.version>1.8</jdk.version>
18+
<jdk.version>17</jdk.version>
1919
<cds.services.version>1.31.0</cds.services.version>
2020
<spring.boot.version>2.7.8</spring.boot.version>
2121
<cloud.sdk.version>4.5.0</cloud.sdk.version>
@@ -76,8 +76,7 @@
7676
<artifactId>maven-compiler-plugin</artifactId>
7777
<version>3.8.1</version>
7878
<configuration>
79-
<source>${jdk.version}</source>
80-
<target>${jdk.version}</target>
79+
<release>${jdk.version}</release>
8180
<encoding>UTF-8</encoding>
8281
</configuration>
8382
</plugin>

0 commit comments

Comments
 (0)