Hello i am testing GKE features and i created gradle java 17 init application, while deployment i have issue with manifest so i generated manually to artifact to resources :
Manifest-Version: 1.0
Main-Class: pl.kathelan.mdbackend.MdBackendApplication
here is my gradle build :
plugins {
id 'org.springframework.boot' version '2.7.3'
id 'io.spring.dependency-management' version '1.0.13.RELEASE'
id 'java'
}
group = 'pl.kathelan'
version = '0.0.1'
sourceCompatibility = '17'
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
tasks.named('test') {
useJUnitPlatform()
}
jar {
manifest {
attributes(
"Class-Path": configurations.runtimeClasspath .collect { it.getName() }.join(' '))
}
}
sourceSets.main.resources.srcDirs = [ "src/" ]
i have tried this solution Gradle - no main manifest attribute , but for me was exception class no found. Looking for any help thanks.