JiriOndrusek commented on a change in pull request #3609: URL: https://github.com/apache/camel-quarkus/pull/3609#discussion_r824640556
########## File path: extensions/quartz/deployment/src/main/java/org/apache/camel/quarkus/component/quartz/deployment/QuartzProcessor.java ########## @@ -44,4 +61,43 @@ NativeImageResourceBuildItem nativeImageResources() { ReflectiveClassBuildItem registerForReflection() { return new ReflectiveClassBuildItem(false, false, QUARTZ_JOB_CLASSES); } + + @BuildStep + ReflectiveClassBuildItem registerForReflectionWithMethods() { + return new ReflectiveClassBuildItem(true, false, QUARTZ_JOB_CLASSES_WITH_METHODS); + } + + @BuildStep + void registerForReflection(BuildProducer<ReflectiveClassBuildItem> reflectiveClasses, + CombinedIndexBuildItem combinedIndex, CurateOutcomeBuildItem curateOutcome) { + IndexView index = combinedIndex.getIndex(); + + ApplicationModel applicationModel = curateOutcome.getApplicationModel(); + boolean oracleBlobIsPresent = applicationModel.getDependencies().stream() + .anyMatch(d -> d.getGroupId().equals("com.oracle.database.jdbc")); + + final String[] delegatesImpl = index + .getAllKnownSubclasses(SQL_JDBC_DELEGATE) + .stream() + .map(c -> c.name().toString()) + .filter(n -> oracleBlobIsPresent || !n.contains("oracle")) + .toArray(String[]::new); + + reflectiveClasses.produce(new ReflectiveClassBuildItem(false, true, delegatesImpl)); + + } + + @BuildStep + void indexSaxonHe(BuildProducer<IndexDependencyBuildItem> deps) { + deps.produce(new IndexDependencyBuildItem("org.quartz-scheduler", "quartz")); + deps.produce(new IndexDependencyBuildItem("org.apache.camel.quarkus", "camel-quarkus-quartz")); Review comment: That is the fact where I'm not sure why it is wrong. I put `@RegisterForReflection` on `org.apache.camel.quarkus.component.quartz.CamelQuarkusQuartzConnectionProvider` in extensions/quartz/runtime module. I thought, that classes from the extensions are registered automatically. But it works only in case, that index contains own extension dependency. There is no need from the user to register it. -- 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: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org