ppalaga commented on a change in pull request #323: Fix #322 Make camel-attachments an optional dependency of platform-http URL: https://github.com/apache/camel-quarkus/pull/323#discussion_r337954645
########## File path: extensions/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/BuildProcessor.java ########## @@ -272,4 +274,27 @@ void start( recorder.start(shutdown, main.getInstance()); } } + + /** + * Build steps related to Camel Attachments. + */ + public static class Attachments { + + /** + * Produces an {@link UploadAttacherBuildItem} holding a no-op {@link UploadAttacher}. + * <p> + * Note that this {@link BuildStep} is effective only if {@code camel-quarkus-attachments} extension is not in + * the class path. + * + * @param recorder the {@link CoreAttachmentsRecorder} + * @return a new {@link UploadAttacherBuildItem} + */ + @Overridable + @Record(value = ExecutionTime.STATIC_INIT, optional = true) + @BuildStep(onlyIfNot = Flags.AttachmentsAvailable.class) Review comment: Hm... It works without the flag, but `optional = true` must be there. Otherwise it throws `Cannot provide/consume multiple values for class org.apache.camel.quarkus.core.deployment.UploadAttacherBuildItem` That's a bit strange. I would not spontaneously consider UploadAttacherBuildItem to be optional. One or the other provider is always there. Anyway, thanks for the catch and let me remove the flag. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services