dfiai commented on issue #3565:
URL:
https://github.com/apache/incubator-kie-kogito-runtimes/issues/3565#issuecomment-2268348310
Hi @deepakkapoor23 I have the same issue, as a workaround I did use
`maven-publish` plugin
build.gradle.kts
```kotlin
val javaVersion: String by project
val quarkusVersion: String by project
val kogitoVersion: String by project
val cloudEventVersion: String by project
val kotlinVersion: String by project
plugins {
kotlin("jvm")
kotlin("plugin.allopen")
id("io.quarkus")
id("maven-publish")
}
repositories {
mavenCentral()
mavenLocal()
maven {
url = uri("https://repository.apache.org/content/groups/public")
}
}
dependencies {
implementation(enforcedPlatform("io.quarkus.platform:quarkus-bom:$quarkusVersion"))
implementation("io.quarkus:quarkus-kotlin")
implementation("io.quarkus:quarkus-arc")
implementation("io.quarkus:quarkus-resteasy")
implementation("io.quarkus:quarkus-resteasy-jackson")
implementation("io.quarkus:quarkus-smallrye-health")
implementation("io.quarkus:quarkus-smallrye-reactive-messaging-kafka")
implementation("io.quarkus:quarkus-container-image-jib")
implementation("io.quarkus:quarkus-opentelemetry")
implementation("io.quarkus:quarkus-micrometer-registry-prometheus")
implementation("io.quarkus:quarkus-smallrye-openapi")
implementation(enforcedPlatform("org.kie.kogito:kogito-bom:$kogitoVersion"))
implementation("org.apache.kie.sonataflow:sonataflow-quarkus")
implementation("org.kie:kie-addons-quarkus-messaging")
implementation("org.kie:kie-addons-quarkus-events-process")
implementation("org.kie:kie-addons-quarkus-persistence-infinispan")
implementation("org.kie:kie-addons-quarkus-monitoring-prometheus")
implementation("org.kie:kie-addons-quarkus-source-files")
implementation("org.kie:kie-addons-quarkus-process-management")
implementation("io.cloudevents:cloudevents-kafka:$cloudEventVersion")
}
group = "io.kong"
version = "0.0.1-SNAPSHOT"
java {
sourceCompatibility = JavaVersion.toVersion(javaVersion)
targetCompatibility = JavaVersion.toVersion(javaVersion)
}
tasks.withType<Test> {
systemProperty("java.util.logging.manager",
"org.jboss.logmanager.LogManager")
}
allOpen {
annotation("jakarta.ws.rs.Path")
annotation("jakarta.enterprise.context.ApplicationScoped")
annotation("jakarta.persistence.Entity")
annotation("io.quarkus.test.junit.QuarkusTest")
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions.jvmTarget = javaVersion
kotlinOptions.javaParameters = true
}
publishing {
publications {
create<MavenPublication>("maven") {
groupId = "io.kong"
artifactId = "kogitotemplate"
version = "0.0.1-SNAPSHOT"
from(components["java"])
pom.withXml {
asNode().appendNode("repositories").apply {
appendNode("repository").apply {
appendNode("id", "central")
appendNode("name", "Maven Central")
appendNode("url", "https://repo.maven.apache.org/maven2")
}
appendNode("repository").apply {
appendNode("id", "apache")
appendNode("name", "Apache Public Repository")
appendNode("url",
"https://repository.apache.org/content/groups/public")
}
}
asNode().appendNode("build").appendNode("plugins").apply {
appendNode("plugin").apply {
appendNode("groupId", "io.quarkus")
appendNode("artifactId", "quarkus-maven-plugin")
appendNode("version", quarkusVersion)
appendNode("executions").appendNode("execution").apply {
appendNode("goals").appendNode("goal", "build")
}
}
appendNode("plugin").apply {
appendNode("groupId", "org.jetbrains.kotlin")
appendNode("artifactId", "kotlin-maven-plugin")
appendNode("version", kotlinVersion)
appendNode("executions").appendNode("execution").apply {
appendNode("phase", "compile")
appendNode("goals").appendNode("goal", "compile")
}
}
appendNode("plugin").apply {
appendNode("groupId", "org.jetbrains.kotlin")
appendNode("artifactId", "kotlin-maven-allopen")
appendNode("version", kotlinVersion)
appendNode("configuration").apply {
appendNode("compilerPlugins").appendNode("plugin", "all-open")
appendNode("pluginOptions").apply {
appendNode("option",
"all-open:annotation=jakarta.ws.rs.Path")
appendNode(
"option",
"all-open:annotation=jakarta.enterprise.context.ApplicationScoped"
)
appendNode("option",
"all-open:annotation=jakarta.persistence.Entity")
appendNode("option",
"all-open:annotation=io.quarkus.test.junit.QuarkusTest")
}
}
}
}
}
}
}
}
```
gradle.properties
```
# Gradle properties
org.gradle.jvmargs=-Xmx2048m
javaVersion=17
cloudEventVersion=2.3.0
kogitoVersion=10.0.999-20240728-SNAPSHOT
kotlinVersion=1.9.22
quarkusVersion=3.8.4
# workaround: Quarkus Kogito plugin does not recognize Gradle build type
systemProp.org.gradle.appname=gradle
```
run `generatePomFileFromMavenPublication` to get pom.xml inside
`build/publications/maven`

--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]