Skip to content
Open
Show file tree
Hide file tree
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
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
/.idea/
/.idea/
/target/
/build/
/.gradle/
1 change: 0 additions & 1 deletion .gitignore.txt

This file was deleted.

Binary file removed .mvn/wrapper/maven-wrapper.jar
Binary file not shown.
20 changes: 19 additions & 1 deletion .mvn/wrapper/maven-wrapper.properties

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Info: Maven wrapper jar removed in favour of script-only distribution

The head commit deletes .mvn/wrapper/maven-wrapper.jar and switches .mvn/wrapper/maven-wrapper.properties to wrapperVersion=3.3.2 / distributionType=only-script. The regenerated mvnw/mvnw.cmd download and unpack the Maven distribution themselves, so the missing jar is consistent with the new scripts, and CI (./mvnw -B clean package) will work on Linux with wget/curl present. Worth noting for reviewers that some tooling that shells out to the wrapper by classpath (older IDE integrations expecting maven-wrapper.jar, or anyone invoking java -cp .mvn/wrapper/maven-wrapper.jar org.apache.maven.wrapper.MavenWrapperMain) will no longer work with this checkout.

(Refers to lines 35-37)

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct and intended — that's what mvn -N wrapper:wrapper -Dmaven=3.9.6 generates with maven-wrapper-plugin 3.3.2 (default distributionType=only-script), and it was the fix for the previous round's flag about the 2015 Takari jar. Verified: ./mvnw -B clean package -> BUILD SUCCESS locally and the maven CI job is green. Thanks for calling out the java -cp .mvn/wrapper/maven-wrapper.jar ... / old-IDE-integration caveat — if the team wants the jar back, regenerating with -Dtype=bin restores it.

Original file line number Diff line number Diff line change
@@ -1 +1,19 @@
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.3.9/apache-maven-3.3.9-bin.zip
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
wrapperVersion=3.3.2
distributionType=only-script
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip
30 changes: 21 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ buildscript {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:2.0.2.RELEASE")
classpath("org.springframework.boot:spring-boot-gradle-plugin:2.7.18")
classpath("io.spring.gradle:dependency-management-plugin:1.0.15.RELEASE")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Info: Explicit dependency-management-plugin classpath entry duplicates the Boot plugin's own dependency

spring-boot-gradle-plugin:2.7.18 already brings io.spring.gradle:dependency-management-plugin:1.0.15.RELEASE transitively onto the buildscript classpath, so the added explicit entry is redundant (it happens to pin the same version, so no conflict). Harmless today, but it becomes a maintenance trap: bumping the Boot plugin without bumping this line can silently pin an older dependency-management plugin.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intentional, per the agreed upgrade plan, which called for pinning dependency-management-plugin explicitly rather than relying on the Boot plugin's transitive version. Agreed on the maintenance trap you describe — the two versions must be bumped together — but I'd rather not deviate from the plan inside this PR. Removing the line is a safe one-line follow-up if the team prefers the transitive version.

}
}

Expand All @@ -13,20 +14,31 @@ apply plugin: 'idea'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'

group = 'org.springframework'
version = '0.1.0'

java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}

tasks.withType(JavaCompile) {
options.release = 17
}
Comment on lines +20 to +28

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Info: Java toolchain 17 without a toolchain resolver requires a locally installed JDK 17

Gradle 7.6 can only auto-provision toolchains via the (unconfigured here) Adoptium/Foojay resolver plugin; with just java { toolchain { languageVersion = 17 } } the build fails with "No matching toolchains found" on machines whose auto-detected JDKs don't include 17, rather than falling back to the running JVM as sourceCompatibility = 1.8 used to. CI is fine because actions/setup-java installs Temurin 17, but local developers on other JDKs will now hit a hard failure. options.release = 17 on top of the toolchain is redundant but harmless.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Accurate, and it's the intended consequence of the upgrade: the whole point is that this project now requires JDK 17, so a hard "No matching toolchains found" is better than silently compiling with whatever JDK happens to be running. Adding plugins { id 'org.gradle.toolchains.foojay-resolver-convention' version '0.8.0' } to settings.gradle would enable auto-provisioning if the team wants that — say the word and I'll add it. Kept options.release = 17 deliberately (redundant with the toolchain, as you note) so the --release guarantee is explicit and matches the Maven side rather than being implied by the toolchain.


bootJar {
baseName = 'gs-spring-boot'
version = '0.1.0'
archiveBaseName = 'gs-spring-boot'
}
Comment thread
devin-ai-integration[bot] marked this conversation as resolved.

repositories {
mavenCentral()
}

sourceCompatibility = 1.8
targetCompatibility = 1.8

dependencies {
compile("org.springframework.boot:spring-boot-starter-web")
testCompile("junit:junit")
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.boot:spring-boot-starter-jdbc")
implementation("javax.annotation:javax.annotation-api:1.3.2")
runtimeOnly("com.h2database:h2")
testImplementation("junit:junit")
Comment thread
devin-ai-integration[bot] marked this conversation as resolved.
}

Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Thu Mar 01 09:01:15 CST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.4-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-bin.zip
Loading