added comments for native build investigation
This commit is contained in:
parent
72d1e6271a
commit
6388898cc0
@ -6,7 +6,10 @@ plugins {
|
||||
dependencies {
|
||||
implementation(project(":layoutparser-service-internal-api"))
|
||||
|
||||
implementation("com.iqser.red.service:persistence-service-shared-api-v1:2.36.0")
|
||||
implementation("com.iqser.red.service:persistence-service-shared-api-v1:2.36.0") {
|
||||
exclude("org.springframework.boot", "spring-boot-starter-security")
|
||||
exclude("org.springframework.boot", "spring-boot-starter-validation")
|
||||
}
|
||||
implementation("com.knecon.fforesight:tenant-commons:0.10.0")
|
||||
implementation("com.iqser.red.commons:storage-commons:2.1.0")
|
||||
|
||||
|
||||
@ -1,12 +1,13 @@
|
||||
import org.springframework.boot.gradle.tasks.bundling.BootBuildImage
|
||||
|
||||
plugins {
|
||||
application
|
||||
id("com.knecon.fforesight.java-conventions")
|
||||
id("org.springframework.boot") version "3.1.2"
|
||||
id("io.spring.dependency-management") version "1.1.0"
|
||||
id("org.sonarqube") version "4.2.1.3168"
|
||||
id("io.freefair.lombok") version "8.1.0"
|
||||
//id("org.graalvm.buildtools.native") version "0.9.23"
|
||||
// id("org.graalvm.buildtools.native") version "0.9.23"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@ -14,11 +15,10 @@ dependencies {
|
||||
|
||||
implementation("com.iqser.red.commons:storage-commons:2.1.0")
|
||||
implementation("com.knecon.fforesight:tenant-commons:0.10.0")
|
||||
|
||||
implementation("org.springframework.boot:spring-boot-starter-actuator:3.1.2")
|
||||
implementation("com.amazonaws:aws-java-sdk-s3:1.12.514")
|
||||
|
||||
|
||||
implementation("com.azure.spring:spring-cloud-azure-native-configuration:4.0.0-beta.1")
|
||||
// for integration testing only
|
||||
testImplementation(project(":layoutparser-service-internal-api"))
|
||||
|
||||
@ -30,7 +30,6 @@ dependencies {
|
||||
testImplementation("org.apache.pdfbox:pdfbox:3.0.0-alpha2")
|
||||
testImplementation("org.apache.pdfbox:pdfbox-tools:3.0.0-alpha2")
|
||||
testImplementation("org.springframework.boot:spring-boot-starter-test:3.0.6")
|
||||
testImplementation("org.apache.logging.log4j:log4j-slf4j-impl:2.19.0")
|
||||
}
|
||||
|
||||
description = "layoutparser-service-server"
|
||||
@ -40,13 +39,14 @@ java {
|
||||
}
|
||||
|
||||
/*
|
||||
TODO: implement native build using GRAALVM, currently the problem is, logback needs runtime configuration using reflections or something
|
||||
kinda weird behavior, since the buildArgs below seem to have no effect at all
|
||||
https://stackoverflow.com/questions/72770461/graalvm-native-image-can-not-compile-logback-dependencies
|
||||
//TODO: implement native build using GRAALVM, currently the problem is, logback needs runtime configuration using reflections or something
|
||||
//kinda weird behavior, since the buildArgs below seem to have no effect at all
|
||||
//https://stackoverflow.com/questions/72770461/graalvm-native-image-can-not-compile-logback-dependencies
|
||||
|
||||
We traced the issue to storage-commons and there to azure blob storage, this is today an open bug with azure spring
|
||||
https://github.com/Azure/azure-sdk-for-java/issues/36001
|
||||
|
||||
// AOT seems to be the name of the generated classes for native images
|
||||
// They are added as a SourceSet, and therefore checkstyle and pmd try to run on it
|
||||
//AOT is springs ahead of time compilation, it is a code analysis which generates new code, therefore checkstyle and pmd can be disabled on them.
|
||||
tasks.named<Checkstyle>("checkstyleAot") {
|
||||
enabled = false
|
||||
}
|
||||
@ -59,28 +59,8 @@ tasks.named<Pmd>("pmdAot") {
|
||||
tasks.named<Pmd>("pmdAotTest") {
|
||||
enabled = false
|
||||
}
|
||||
|
||||
graalvmNative {
|
||||
binaries {
|
||||
all {
|
||||
resources.autodetect()
|
||||
buildArgs.add("--verbose")
|
||||
buildArgs.add("--add-opens=java.base/java.nio=ALL-UNNAMED")
|
||||
buildArgs.add("--add-opens=java.base/jdk.internal.misc=ALL-UNNAMED")
|
||||
buildArgs.add("--add-opens=java.base/jdk.internal.ref=ALL-UNNAMED")
|
||||
buildArgs.add("--trace-class-initialization=ch.qos.logback.classic.Logger")
|
||||
buildArgs.add("--trace-object-instantiation=ch.qos.logback.core.AsyncAppenderBase\$Worker")
|
||||
buildArgs.add("--initialize-at-build-time=org.slf4j.LoggerFactory,ch.qos.logback")
|
||||
buildArgs.add("--initialize-at-run-time=io.netty")
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
nativeBuild {
|
||||
buildArgs("-H:ReflectionConfigurationFiles=../../../src/main/resources/reflection-config.json")
|
||||
}
|
||||
*/
|
||||
|
||||
tasks.named<BootBuildImage>("bootBuildImage") {
|
||||
imageName.set("nexus.knecon.com:5001/ff/${project.name}:${project.version}")
|
||||
if (project.hasProperty("buildbootDockerHostNetwork")) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user