Skip to content

Migrate build tooling from Gradle to Maven#1

Open
hermanngeorge15 wants to merge 1 commit into
mainfrom
migrate-gradle-to-maven
Open

Migrate build tooling from Gradle to Maven#1
hermanngeorge15 wants to merge 1 commit into
mainfrom
migrate-gradle-to-maven

Conversation

@hermanngeorge15

Copy link
Copy Markdown
Contributor

Why

Gradle is unusable in the target corporate environment (download/proxy restrictions), so the workshop must build with Maven to actually run on attendees' machines.

What changed

  • Add pom.xml to all 16 lesson projects (session-01, start + finish): Kotlin 2.0.21, kotlin-maven-plugin with jvmTarget=21 (matches the former jvmToolchain(21)), sourceDirectory=src/main/kotlin (no file moves), exec-maven-plugin for mvn compile exec:java.
  • Remove Gradle files (96): build.gradle.kts, settings.gradle.kts, gradlew, gradlew.bat, gradle/wrapper/.
  • Docs: SETUP.md, README.md, lesson-01/README.md updated Gradle → Maven.
  • .gitignore: build/ + .gradle/target/ (+ .kotlin/).

Student UX preserved

IntelliJ green-▶-on-main() works identically for Maven, using IntelliJ's bundled Maven — no CLI install, which also avoids the corporate Gradle-download issue. No mvnw added for the same reason.

Validation

Tested on JDK 24 (the env that triggered the prior Gradle class-version-68 errors):

  • All 16/16 projects compile clean
  • lesson-08-final/finish compiles and runs with correct Expense Report output

🤖 Generated with Claude Code

Gradle is unusable in the target corporate environment, so all 16 lesson
projects (session-01, start + finish) now build with Maven instead.

- Add pom.xml per project: Kotlin 2.0.21, kotlin-maven-plugin with
  jvmTarget=21 (matches former jvmToolchain(21)), sourceDirectory=src/main/kotlin,
  exec-maven-plugin for `mvn compile exec:java`
- Remove build.gradle.kts, settings.gradle.kts, gradlew, gradlew.bat,
  and gradle/wrapper/ (96 files)
- Update SETUP.md, README.md, lesson-01/README.md: Gradle -> Maven
- .gitignore: build/ + .gradle/ -> target/ (+ .kotlin/)

IntelliJ green-button workflow is preserved (bundled Maven, no CLI needed),
which also avoids the corporate Gradle-download issue.

Validated on JDK 24: all 16 projects compile clean; lesson-08-final runs
with correct output (no more class-version-68 error).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant