diff --git a/CHANGELOG.md b/CHANGELOG.md index 3611263a7..d1c98cd34 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ - Rust QS enable dynamic toolchain/version support ([#1119](https://github.com/opendevstack/ods-quickstarters/issues/1119)) ### Fixed - +- Fix Springboot version parameter ([#1138](https://github.com/opendevstack/ods-quickstarters/issues/1138)) ## [4.10.0] - 2025-10-13 ### Changed diff --git a/be-java-springboot/Jenkinsfile b/be-java-springboot/Jenkinsfile index cc2ee64f3..db5fc4e6a 100644 --- a/be-java-springboot/Jenkinsfile +++ b/be-java-springboot/Jenkinsfile @@ -21,22 +21,25 @@ odsQuickstarterPipeline( stage('Build spring project') { dir(context.targetDir) { - def springBootVersion = '3.3.3' + def springBootVersion = '4.0.0' echo "--- create spring boot (v${springBootVersion}) project via spring initializr ---" - sh "curl https://start.spring.io/starter.tgz \ - -d type=gradle-project \ - -d language=java \ - -d dependencies='web,data-rest,data-jpa,h2,security,devtools' \ - -d platformVersion=${springBootVersion} \ - -d packaging=jar \ - -d jvmVersion=${javaVersion} \ - -d groupId=${context.projectId} \ - -d artifactId=${context.componentId} \ - -d name=${context.componentId} \ - -d description='OpenDevStack%20Demo%20Project%20for%20Spring%20Boot' \ - -d packageName='${context.packageName}' \ - | tar -zxvf - " + def springInitializrUrl = "https://start.spring.io/starter.tgz?" + + "type=gradle-project&" + + "language=java&" + + "dependencies=web,data-rest,data-jpa,h2,security,devtools&" + + "bootVersion=${springBootVersion}&" + + "packaging=jar&" + + "jvmVersion=${javaVersion}&" + + "groupId=${context.projectId}&" + + "artifactId=${context.componentId}&" + + "name=${context.componentId}&" + + "description=OpenDevStack%20Demo%20Project%20for%20Spring%20Boot&" + + "packageName=${context.packageName}" + + sh """ + curl -L "${springInitializrUrl}" | tar -xzvf - + """ echo "--- configure application.properties ---" diff --git a/be-java-springboot/files/gradle/wrapper/gradle-wrapper.properties b/be-java-springboot/files/gradle/wrapper/gradle-wrapper.properties index e1adfb493..ac57dd155 100644 --- a/be-java-springboot/files/gradle/wrapper/gradle-wrapper.properties +++ b/be-java-springboot/files/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/docs/modules/quickstarters/pages/be-java-springboot.adoc b/docs/modules/quickstarters/pages/be-java-springboot.adoc index 2fca904ed..25d05639d 100644 --- a/docs/modules/quickstarters/pages/be-java-springboot.adoc +++ b/docs/modules/quickstarters/pages/be-java-springboot.adoc @@ -12,9 +12,9 @@ The quickstarter uses the spring boot project generator service hosted by Spring This is implemented in the quickstarter jenkins build script called `Jenkinsfile` (open it to understand the internal of the code generation of this quickstarter). -When provisioning this quickstarter in the provisioning app a spring boot project based on version `3.3.3` will be generated and pushed to your git repository. +When provisioning this quickstarter in the provisioning app a spring boot project based on version `4.0.0` will be generated and pushed to your git repository. -The generated project requires `java 21` and includes the required gradle build and wrapper artifact based on gradle version `8.10`. +The generated project requires `java 21` and includes the required gradle build and wrapper artifact based on gradle version `9.2.1`. == Project Structure @@ -111,7 +111,7 @@ version: 1.0.1 type: ods role: backend runtime: spring-boot -runtimeVersion: 3.3.3 +runtimeVersion: 4.0.0 ``` == How this quickstarter is built thru jenkins @@ -149,9 +149,9 @@ The default version is `java 17`. This makes the agent backwards compatible. If you are migrating an ODS-based spring boot project to `java 21` following instructions provide a some guidance about the typical steps to achieve this: - change the agent version as indicated in https://github.com/opendevstack/ods-quickstarters/tree/master/common/jenkins-agents/jdk[jdk builder agent] -- upgrade the gradle wrapper to version `8.10` running this gradle command at the root folder of your spring project: +- upgrade the gradle wrapper to version `9.2.1` running this gradle command at the root folder of your spring project: ``` -gradle wrapper --gradle-version 8.10 --distribution-type bin +gradle wrapper --gradle-version 9.2.1 --distribution-type bin ``` NOTE: this command use just `gradle` instead of the wrapper.