Skip to content

Commit 5410846

Browse files
mofterdingervmikhailenkoCopilot
authored
Bookshop PostgreSQL: Use SAP build pack with JDK 25 (#650)
Successfully deployed and tested in BTP on GCP. BLI: https://github.wdf.sap.corp/cds-java/home/issues/1463 Build Pack Settings: https://help.sap.com/docs/btp/sap-business-technology-platform/application-provided-library-components?state=DRAFT&locale=en-US --------- Co-authored-by: Vladimir Mikhaylenko <vladimir.mikhaylenko@sap.com> Co-authored-by: Copilot <copilot@github.com>
1 parent 65eda9b commit 5410846

4 files changed

Lines changed: 9 additions & 12 deletions

File tree

.github/workflows/maven.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Set up JDK
2525
uses: actions/setup-java@v5
2626
with:
27-
java-version: 21
27+
java-version: 25
2828
distribution: sapmachine
2929

3030
- name: Build with Maven

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ Prerequisites:
109109
- Install the [Cloud Foundry Command Line Interface](https://docs.cloudfoundry.org/cf-cli/install-go-cli.html).
110110
- Get an SAP Business Technology Platform account to deploy the services and applications.
111111
- Ensure you have an entitlement for _PostgreSQL, hyperscaler option_ with appropriate plan in the same space.
112-
- 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 and you run in the landscape where the _PostgreSQL, hyperscaler option_ is available.
113112

114113
Deploy Application:
115114
- Run `mbt build`

mta.yaml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,14 @@ modules:
1313
parameters:
1414
memory: 1024M
1515
disk-quota: 512M
16-
buildpack: java_buildpack
16+
buildpack: sap_java_buildpack_jakarta
1717
properties:
18-
SPRING_PROFILES_ACTIVE: cloud
19-
JBP_CONFIG_COMPONENTS: '{jres: ["JavaBuildpack::Jre::SapMachineJRE"]}'
20-
JBP_CONFIG_SAP_MACHINE_JRE: '{ jre: { version: "21.+" } }'
21-
# We do not want cfenv to configure the DataSource for us
22-
# cfenv uses names of the services, so this variable must be adapted if needed
23-
# as CFENV_SERVICE_[service-name]_ENABLED
24-
# See https://docs.cloudfoundry.org/buildpacks/java/configuring-service-connections.html
25-
CFENV_SERVICE_BOOKSHOP-PG-DB_ENABLED: false
18+
SPRING_PROFILES_ACTIVE: cloud
19+
JBP_CONFIG_COMPONENTS: "jres: ['com.sap.xs.java.buildpack.jdk.SAPMachineJDK']"
20+
JBP_CONFIG_SAP_MACHINE_JDK: '{ version: 25.+ }'
21+
# Skip provided libraries (e.g. PostgreSQL driver) as they are already included in the Bookshop
22+
# See: https://help.sap.com/docs/btp/sap-business-technology-platform/application-provided-library-components?locale=en-US&version=Cloud#jbp_skip_provided_library_components
23+
JBP_SKIP_PROVIDED_LIBRARY_COMPONENTS: true
2624
build-parameters:
2725
builder: custom
2826
commands:

pom.xml

Lines changed: 1 addition & 1 deletion
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>21</jdk.version>
18+
<jdk.version>25</jdk.version>
1919
<cds.services.version>4.9.0</cds.services.version>
2020
<spring.boot.version>3.5.14</spring.boot.version>
2121
<cf-java-logging-support.version>4.2.0</cf-java-logging-support.version>

0 commit comments

Comments
 (0)