apache / incubator-kie-kogito-runtimes

Kogito Runtimes - Kogito is a cloud-native business automation technology for building cloud-ready business applications.
http://kogito.kie.org
Apache License 2.0
491 stars 192 forks source link

Gradle quarkusAppPartsBuild task failure #3565

Open deepakkapoor23 opened 4 days ago

deepakkapoor23 commented 4 days ago

Describe the bug

Build fails with gradle after quarkus version upgrade while it build fine with Maven

Quarkus platform and plugin version is 3.8.5

Expected behavior

Gradle build should work same as Maven and produce the same output.

Actual behavior

Gradle build fails with the following error:

Caused by: io.quarkus.builder.BuildException: Build failure: Build failed due to errors [error]: Build step org.drools.quarkus.deployment.DroolsAssetsProcessor#generateSources threw an exception: java.lang.UnsupportedOperationException
at java.base/java.util.AbstractCollection.add(AbstractCollection.java:251) at org.drools.quarkus.deployment.DroolsAssetsProcessor.generateSources(DroolsAssetsProcessor.java:116) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:849) at io.quarkus.builder.BuildContext.run(BuildContext.java:256) at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18) at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538) at java.base/java.lang.Thread.run(Thread.java:833) at org.jboss.threads.JBossThread.run(JBossThread.java:501)

    at io.quarkus.builder.Execution.run(Execution.java:123)
    at io.quarkus.builder.BuildExecutionBuilder.execute(BuildExecutionBuilder.java:79)
    at io.quarkus.deployment.QuarkusAugmentor.run(QuarkusAugmentor.java:160)
    at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:330)
    ... 26 more

Caused by: java.lang.UnsupportedOperationException at org.drools.quarkus.deployment.DroolsAssetsProcessor.generateSources(DroolsAssetsProcessor.java:116) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:849) at io.quarkus.builder.BuildContext.run(BuildContext.java:256) at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18) at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538) at org.jboss.threads.JBossThread.run(JBossThread.java:501)

How to Reproduce?

Create a gradle project with kogito dependencies and plugin and run the build as follows:

gradlew clean build --no-build-cache --stacktrace

Output of uname -a or ver

Windows

Output of java -version

17

GraalVM version (if different from Java)

No response

Kogito version or git rev (or at least Quarkus version if you are using Kogito via Quarkus platform BOM)

999-SNAPSHOT

Build tool (ie. output of mvnw --version or gradlew --version)

gradle 8.6

Additional information

Intermittently missing classes from org.jbpm and org.drools packages are also reported in the build log with NoClassDefFoundError

gitgabrio commented 3 days ago

Hi @deepakkapoor23 : could you please include a minimal reproducer, i.e. a very trimmed down project that recreates the problem you are facing ? Thanks!

deepakkapoor23 commented 1 day ago

kogito-reproducer.zip Please find attached kogito-reproducer project with both maven and gradle builds. The maven build completes successfully but gradle fails for the same set of properties and dependencies.

Commands:

mvnw clean package -U

gradlew clean build --no-build-cache