lburgazzoli commented on a change in pull request #249: Make xml and jaxb 
disabled by default and opt-in when depending on ca…
URL: https://github.com/apache/camel-quarkus/pull/249#discussion_r334572042
 
 

 ##########
 File path: 
extensions/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/BuildProcessor.java
 ##########
 @@ -105,15 +115,39 @@ CamelRegistryBuildItem registry(
             return new CamelRegistryBuildItem(registry);
         }
 
+        @Overridable
+        @BuildStep
+        public CamelModelJAXBContextFactoryBuildItem 
createJaxbContextFactory() {
+            return new CamelModelJAXBContextFactoryBuildItem(new 
DisabledModelJAXBContextFactory());
+        }
+
+        @Overridable
+        @BuildStep
+        public CamelXmlLoaderBuildItem createXmlLoader() {
+            return new CamelXmlLoaderBuildItem(new DisabledXmlLoader());
+        }
+
+        @BuildStep
+        void disableXmlReifiers(List<FeatureBuildItem> features) {
+            if 
(features.stream().map(FeatureBuildItem::getInfo).noneMatch("camel-xml"::equals))
 {
+                ProcessorReifier.registerReifier(ValidateDefinition.class, 
DisabledValidateReifier::new);
+                
ValidatorReifier.registerReifier(PredicateValidatorDefinition.class, 
DisabledPredicateValidatorReifier::new);
 
 Review comment:
   for my understanding, how this end up being in the generated classes ? 
otherwise my understanding (that could be of course wrong) is that it is gogin 
to be ignored /but likely to work during test as running in the same jvm).

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

Reply via email to