ashishm07 opened a new pull request, #7710:
URL: https://github.com/apache/ignite-3/pull/7710

   Running any example that requires a deployment unit directly via Gradle 
fails with:
   
   java.lang.IllegalStateException: Deployment unit JAR not found at: 
.../examples/java/build/libs/deploymentunit-example-1.0.0.jar
   
   Root Cause:
   
   deploymentUnitJar was only wired into the build lifecycle. Direct class 
execution via Gradle uses a JavaExec task that only depends on classes, 
bypassing deploymentUnitJar. As a result, the JAR is never built unless 
./gradlew :ignite-examples:build is run explicitly beforehand.
   
   Affected Examples:
   
   code/deployment/CodeDeploymentExample
   
   compute/ComputeAsyncExample
   
   compute/ComputeBroadcastExample
   
   compute/ComputeCancellationExample
   
   compute/ComputeColocatedExample
   
   compute/ComputeExample
   
   compute/ComputeJobPriorityExample
   
   compute/ComputeJobStateExample
   
   compute/ComputeMapReduceExample
   
   compute/ComputeWithCustomResultMarshallerExample
   
   compute/ComputeWithResultExample
   
   serialization/SerializationExample
   
   streaming/DistributedComputeWithReceiverExample
   
   streaming/MultiTableDataStreamerExample
   
   
   Fix:
   
   Added to examples/java/build.gradle:
   
   groovy
   tasks.withType(JavaExec).configureEach {
       dependsOn deploymentUnitJar
   }
   This ensures the deployment unit JAR is always built before any example 
class is executed via Gradle, regardless of whether build was run first.


-- 
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]

Reply via email to