Problems with deploying a spring boot application
marcelmilka
HOBBYOP

4 months ago

Hey there! As described above I encountered problems while deploying my spring boot application via GitHub.

The error from build logs:
Build failed with an exception.

  • What went wrong:
    Could not determine the dependencies of task ':compileKotlin'.
    >
    Cannot find a Java installation on your machine (Linux 6.1.0-37-cloud-amd64 amd64) matching: {languageVersion=17, vendor=any vendor, implementation=vendor-specific, nativeImageCapable=false}. Toolchain download repositories have not been configured.

current build.gradle.kts file:
plugins {
kotlin("jvm") version "1.9.25"
kotlin("plugin.spring") version "1.9.25"
kotlin("plugin.jpa") version "2.0.21"
id("org.springframework.boot") version "3.5.7"
id("io.spring.dependency-management") version "1.1.7"
}

group = "eu.project"
version = "0.0.1-SNAPSHOT"
description = "Demo project for Spring Boot"

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

repositories {
mavenCentral()
}

dependencies {…}

kotlin {
compilerOptions {
freeCompilerArgs.addAll("-Xjsr305=strict")
}
}

tasks.withType {
useJUnitPlatform()
}

tasks.withType {
options.release.set(17)
}

$10 Bounty

1 Replies

4 months ago

Are you using a Dockerfile? Railway has some guides on how to deploy a Spring Boot application
See here: https://docs.railway.com/guides/spring-boot


Loading...