This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit f5787d710ce774b5d530798d223358f45239808f Author: lburgazzoli <lburgazz...@gmail.com> AuthorDate: Mon Nov 25 14:22:13 2019 +0100 Upgrade to camel 3.0.0 #469 --- .../pages/list-of-camel-quarkus-extensions.adoc | 4 +-- .../org/apache/camel/quarkus/core/BaseModel.java | 30 ++++++++++++++++++++++ .../camel/quarkus/core/FastCamelContext.java | 7 +++++ .../org/apache/camel/quarkus/core/FastModel.java | 4 --- .../component/fhir/deployment/FhirProcessor.java | 15 +++-------- extensions/fhir/runtime/pom.xml | 9 ++++--- .../fhir/graal/FhirContextSubstitution.java | 30 ++++++++++++++++++++++ .../hystrix/deployment/HystrixProcessor.java | 14 +++++----- extensions/readme.adoc | 4 +-- .../xml/deployment/XmlSupportProcessor.java | 5 ++-- .../quarkus/component/xslt/CamelXsltRecorder.java | 12 +++++---- .../component/hystrix/it/HystrixRoutes.java | 4 +-- pom.xml | 23 ++++++++++++++++- poms/bom/pom.xml | 15 ----------- tooling/maven/package-maven-plugin/pom.xml | 15 +++++++++++ .../quarkus/maven/UpdateDocExtensionsListMojo.java | 8 +++--- 16 files changed, 138 insertions(+), 61 deletions(-) diff --git a/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc b/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc index adb2613..8fb9c3e 100644 --- a/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc +++ b/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc @@ -13,10 +13,10 @@ Number of Camel components: 44 in 37 JAR artifacts (0 deprecated) | Component | Since | Description | link:https://camel.apache.org/components/latest/aws-ecs-component.html[AWS ECS] (camel-quarkus-aws-ecs) + -`aws-ecs:label` | 0.5 | The aws-kms is used for managing Amazon ECS +`aws-ecs:label` | 0.5 | The aws-ecs is used for managing Amazon ECS | link:https://camel.apache.org/components/latest/aws-eks-component.html[AWS EKS] (camel-quarkus-aws-eks) + -`aws-eks:label` | 0.2 | The aws-kms is used for managing Amazon EKS +`aws-eks:label` | 0.2 | The aws-eks is used for managing Amazon EKS | link:https://camel.apache.org/components/latest/aws-kms-component.html[AWS KMS] (camel-quarkus-aws-kms) + `aws-kms:label` | 0.5 | The aws-kms is used for managing Amazon KMS diff --git a/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/BaseModel.java b/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/BaseModel.java index 9845a58..0a11942 100644 --- a/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/BaseModel.java +++ b/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/BaseModel.java @@ -34,6 +34,7 @@ import org.apache.camel.model.HystrixConfigurationDefinition; import org.apache.camel.model.Model; import org.apache.camel.model.ProcessorDefinition; import org.apache.camel.model.ProcessorDefinitionHelper; +import org.apache.camel.model.Resilience4jConfigurationDefinition; import org.apache.camel.model.RouteDefinition; import org.apache.camel.model.RouteDefinitionHelper; import org.apache.camel.model.RouteFilters; @@ -53,6 +54,7 @@ public abstract class BaseModel implements Model { private List<ValidatorDefinition> validators = new ArrayList<>(); private Map<String, ServiceCallConfigurationDefinition> serviceCallConfigurations = new ConcurrentHashMap<>(); private Map<String, HystrixConfigurationDefinition> hystrixConfigurations = new ConcurrentHashMap<>(); + private Map<String, Resilience4jConfigurationDefinition> resilience4jConfigurations = new ConcurrentHashMap<>(); private Function<RouteDefinition, Boolean> routeFilter; public BaseModel(CamelContext camelContext) { @@ -201,6 +203,34 @@ public abstract class BaseModel implements Model { } @Override + public Resilience4jConfigurationDefinition getResilience4jConfiguration(String id) { + if (id == null) { + id = ""; + } + + return resilience4jConfigurations.get(id); + } + + @Override + public void setResilience4jConfiguration(Resilience4jConfigurationDefinition configuration) { + resilience4jConfigurations.put("", configuration); + } + + @Override + public void setResilience4jConfigurations(List<Resilience4jConfigurationDefinition> configurations) { + if (configurations != null) { + for (Resilience4jConfigurationDefinition configuration : configurations) { + resilience4jConfigurations.put(configuration.getId(), configuration); + } + } + } + + @Override + public void addResilience4jConfiguration(String id, Resilience4jConfigurationDefinition configuration) { + resilience4jConfigurations.put(id, configuration); + } + + @Override public DataFormatDefinition resolveDataFormatDefinition(String name) { // lookup type and create the data format from it DataFormatDefinition type = lookup(camelContext, name, DataFormatDefinition.class); diff --git a/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/FastCamelContext.java b/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/FastCamelContext.java index a2bcaca..57d9741 100644 --- a/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/FastCamelContext.java +++ b/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/FastCamelContext.java @@ -47,6 +47,7 @@ import org.apache.camel.impl.engine.DefaultInjector; import org.apache.camel.impl.engine.DefaultMessageHistoryFactory; import org.apache.camel.impl.engine.DefaultNodeIdFactory; import org.apache.camel.impl.engine.DefaultPackageScanClassResolver; +import org.apache.camel.impl.engine.DefaultPackageScanResourceResolver; import org.apache.camel.impl.engine.DefaultProcessorFactory; import org.apache.camel.impl.engine.DefaultReactiveExecutor; import org.apache.camel.impl.engine.DefaultRouteController; @@ -88,6 +89,7 @@ import org.apache.camel.spi.MessageHistoryFactory; import org.apache.camel.spi.ModelJAXBContextFactory; import org.apache.camel.spi.NodeIdFactory; import org.apache.camel.spi.PackageScanClassResolver; +import org.apache.camel.spi.PackageScanResourceResolver; import org.apache.camel.spi.ProcessorFactory; import org.apache.camel.spi.PropertiesComponent; import org.apache.camel.spi.ReactiveExecutor; @@ -320,6 +322,11 @@ public class FastCamelContext extends AbstractCamelContext { } @Override + protected PackageScanResourceResolver createPackageScanResourceResolver() { + return new DefaultPackageScanResourceResolver(); + } + + @Override protected Tracer createTracer() { Tracer tracer = null; if (getRegistry() != null) { diff --git a/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/FastModel.java b/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/FastModel.java index 497ef29..05f5aa4 100644 --- a/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/FastModel.java +++ b/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/FastModel.java @@ -16,7 +16,6 @@ */ package org.apache.camel.quarkus.core; -import java.io.InputStream; import java.util.ArrayList; import java.util.List; @@ -28,7 +27,6 @@ import org.apache.camel.Navigate; import org.apache.camel.Processor; import org.apache.camel.Route; import org.apache.camel.Service; -import org.apache.camel.impl.DefaultModel; import org.apache.camel.impl.engine.AbstractCamelContext; import org.apache.camel.impl.engine.BaseRouteService; import org.apache.camel.impl.engine.DefaultRouteContext; @@ -37,8 +35,6 @@ import org.apache.camel.model.OnExceptionDefinition; import org.apache.camel.model.ProcessorDefinition; import org.apache.camel.model.RouteDefinition; import org.apache.camel.model.RouteDefinitionHelper; -import org.apache.camel.model.RoutesDefinition; -import org.apache.camel.model.rest.RestsDefinition; import org.apache.camel.processor.channel.DefaultChannel; import org.apache.camel.reifier.RouteReifier; import org.apache.camel.support.CamelContextHelper; diff --git a/extensions/fhir/deployment/src/main/java/org/apache/camel/quarkus/component/fhir/deployment/FhirProcessor.java b/extensions/fhir/deployment/src/main/java/org/apache/camel/quarkus/component/fhir/deployment/FhirProcessor.java index 9cd60f1..03e88fc 100644 --- a/extensions/fhir/deployment/src/main/java/org/apache/camel/quarkus/component/fhir/deployment/FhirProcessor.java +++ b/extensions/fhir/deployment/src/main/java/org/apache/camel/quarkus/component/fhir/deployment/FhirProcessor.java @@ -95,20 +95,11 @@ class FhirProcessor { return new NativeImageResourceBundleBuildItem("ca.uhn.fhir.i18n.hapi-messages"); } - @BuildStep - ReflectiveClassBuildItem xmlOutputFactory() { - return new ReflectiveClassBuildItem(false, false, - "com.sun.xml.internal.stream.XMLOutputFactoryImpl"); - } - @BuildStep(applicationArchiveMarkers = { "org/hl7/fhir", "ca/uhn/fhir" }) void processFhir(BuildProducer<ReflectiveClassBuildItem> reflectiveClass) { - Set<String> classes = new HashSet<>(); - classes.add(SchematronBaseValidator.class.getCanonicalName()); - classes.add(DependencyLogImpl.class.getCanonicalName()); - reflectiveClass.produce(new ReflectiveClassBuildItem(true, false, true, classes.toArray(new String[0]))); - reflectiveClass - .produce(new ReflectiveClassBuildItem(true, true, true, ApacheRestfulClientFactory.class.getCanonicalName())); + reflectiveClass.produce(new ReflectiveClassBuildItem(true, false, true, SchematronBaseValidator.class)); + reflectiveClass.produce(new ReflectiveClassBuildItem(true, false, true, DependencyLogImpl.class)); + reflectiveClass.produce(new ReflectiveClassBuildItem(true, true, true, ApacheRestfulClientFactory.class)); } @BuildStep(onlyIf = FhirFlags.Dstu2Enabled.class, applicationArchiveMarkers = { "org/hl7/fhir", "ca/uhn/fhir" }) diff --git a/extensions/fhir/runtime/pom.xml b/extensions/fhir/runtime/pom.xml index b699dd1..469755f 100644 --- a/extensions/fhir/runtime/pom.xml +++ b/extensions/fhir/runtime/pom.xml @@ -63,10 +63,6 @@ <artifactId>camel-fhir</artifactId> </dependency> <dependency> - <groupId>ca.uhn.hapi.fhir</groupId> - <artifactId>hapi-fhir-structures-r4</artifactId> - </dependency> - <dependency> <groupId>org.jboss.spec.javax.xml.bind</groupId> <artifactId>jboss-jaxb-api_2.3_spec</artifactId> </dependency> @@ -74,6 +70,11 @@ <groupId>org.jboss.logging</groupId> <artifactId>commons-logging-jboss-logging</artifactId> </dependency> + + <dependency> + <groupId>com.oracle.substratevm</groupId> + <artifactId>svm</artifactId> + </dependency> </dependencies> <build> diff --git a/extensions/fhir/runtime/src/main/java/org/apache/camel/quarkus/component/fhir/graal/FhirContextSubstitution.java b/extensions/fhir/runtime/src/main/java/org/apache/camel/quarkus/component/fhir/graal/FhirContextSubstitution.java new file mode 100644 index 0000000..bc3b4e6 --- /dev/null +++ b/extensions/fhir/runtime/src/main/java/org/apache/camel/quarkus/component/fhir/graal/FhirContextSubstitution.java @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.quarkus.component.fhir.graal; + +import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.parser.IParser; +import com.oracle.svm.core.annotate.Substitute; +import com.oracle.svm.core.annotate.TargetClass; + +@TargetClass(FhirContext.class) +final class FhirContextSubstitution { + @Substitute + public IParser newRDFParser() { + throw new UnsupportedOperationException(); + } +} diff --git a/extensions/hystrix/deployment/src/main/java/org/apache/camel/quarkus/component/hystrix/deployment/HystrixProcessor.java b/extensions/hystrix/deployment/src/main/java/org/apache/camel/quarkus/component/hystrix/deployment/HystrixProcessor.java index bbb2e83..a33ad5f 100644 --- a/extensions/hystrix/deployment/src/main/java/org/apache/camel/quarkus/component/hystrix/deployment/HystrixProcessor.java +++ b/extensions/hystrix/deployment/src/main/java/org/apache/camel/quarkus/component/hystrix/deployment/HystrixProcessor.java @@ -16,6 +16,11 @@ */ package org.apache.camel.quarkus.component.hystrix.deployment; +import org.apache.camel.model.CircuitBreakerDefinition; +import org.apache.camel.model.HystrixConfigurationCommon; +import org.apache.camel.model.HystrixConfigurationDefinition; +import org.apache.camel.model.OnFallbackDefinition; + import io.quarkus.deployment.annotations.BuildProducer; import io.quarkus.deployment.annotations.BuildStep; import io.quarkus.deployment.builditem.FeatureBuildItem; @@ -23,11 +28,6 @@ import io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem; import io.quarkus.deployment.builditem.nativeimage.NativeImageSystemPropertyBuildItem; import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem; -import org.apache.camel.model.HystrixConfigurationCommon; -import org.apache.camel.model.HystrixConfigurationDefinition; -import org.apache.camel.model.HystrixDefinition; -import org.apache.camel.model.OnFallbackDefinition; - class HystrixProcessor { private static final String FEATURE = "camel-hystrix"; @@ -45,10 +45,10 @@ class HystrixProcessor { reflectiveClass.produce(new ReflectiveClassBuildItem(true, true, HystrixConfigurationCommon.class, HystrixConfigurationDefinition.class, - HystrixDefinition.class, + CircuitBreakerDefinition.class, OnFallbackDefinition.class)); - resource.produce(new NativeImageResourceBuildItem("META-INF/services/org/apache/camel/model/HystrixDefinition")); + resource.produce(new NativeImageResourceBuildItem("META-INF/services/org/apache/camel/model/CircuitBreakerDefinition")); // Force RxJava to not use Unsafe API systemProperty.produce(new NativeImageSystemPropertyBuildItem("rx.unsafe-disable", "true")); diff --git a/extensions/readme.adoc b/extensions/readme.adoc index 389bf11..d11891f 100644 --- a/extensions/readme.adoc +++ b/extensions/readme.adoc @@ -12,10 +12,10 @@ Number of Camel components: 44 in 37 JAR artifacts (0 deprecated) | Component | Since | Description | link:https://camel.apache.org/components/latest/aws-ecs-component.html[AWS ECS] (camel-quarkus-aws-ecs) + -`aws-ecs:label` | 0.5 | The aws-kms is used for managing Amazon ECS +`aws-ecs:label` | 0.5 | The aws-ecs is used for managing Amazon ECS | link:https://camel.apache.org/components/latest/aws-eks-component.html[AWS EKS] (camel-quarkus-aws-eks) + -`aws-eks:label` | 0.2 | The aws-kms is used for managing Amazon EKS +`aws-eks:label` | 0.2 | The aws-eks is used for managing Amazon EKS | link:https://camel.apache.org/components/latest/aws-kms-component.html[AWS KMS] (camel-quarkus-aws-kms) + `aws-kms:label` | 0.5 | The aws-kms is used for managing Amazon KMS diff --git a/extensions/support/xml/deployment/src/main/java/org/apache/camel/quarkus/support/xml/deployment/XmlSupportProcessor.java b/extensions/support/xml/deployment/src/main/java/org/apache/camel/quarkus/support/xml/deployment/XmlSupportProcessor.java index bbf7628..3fd64d1 100644 --- a/extensions/support/xml/deployment/src/main/java/org/apache/camel/quarkus/support/xml/deployment/XmlSupportProcessor.java +++ b/extensions/support/xml/deployment/src/main/java/org/apache/camel/quarkus/support/xml/deployment/XmlSupportProcessor.java @@ -27,11 +27,12 @@ public class XmlSupportProcessor { new ReflectiveClassBuildItem( false, false, - "com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl", "com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl", + "com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl", "com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl", + "com.sun.org.apache.xerces.internal.parsers.SAXParser", "com.sun.xml.internal.stream.XMLInputFactoryImpl", - "com.sun.org.apache.xerces.internal.parsers.SAXParser")); + "com.sun.xml.internal.stream.XMLOutputFactoryImpl")); reflectiveClass.produce( new ReflectiveClassBuildItem( diff --git a/extensions/xslt/runtime/src/main/java/org/apache/camel/quarkus/component/xslt/CamelXsltRecorder.java b/extensions/xslt/runtime/src/main/java/org/apache/camel/quarkus/component/xslt/CamelXsltRecorder.java index b5d44ed..f5f249c 100644 --- a/extensions/xslt/runtime/src/main/java/org/apache/camel/quarkus/component/xslt/CamelXsltRecorder.java +++ b/extensions/xslt/runtime/src/main/java/org/apache/camel/quarkus/component/xslt/CamelXsltRecorder.java @@ -21,6 +21,7 @@ import javax.xml.transform.TransformerFactory; import io.quarkus.runtime.RuntimeValue; import io.quarkus.runtime.annotations.Recorder; +import org.apache.camel.Endpoint; import org.apache.camel.component.xslt.XsltComponent; import org.apache.camel.component.xslt.XsltEndpoint; import org.apache.camel.quarkus.support.xalan.XalanSupport; @@ -33,7 +34,7 @@ public class CamelXsltRecorder { } public RuntimeValue<RuntimeUriResolver.Builder> createRuntimeUriResolverBuilder() { - return new RuntimeValue<RuntimeUriResolver.Builder>(new RuntimeUriResolver.Builder()); + return new RuntimeValue<>(new RuntimeUriResolver.Builder()); } public void addRuntimeUriResolverEntry(RuntimeValue<RuntimeUriResolver.Builder> builder, String templateUri, @@ -52,10 +53,11 @@ public class CamelXsltRecorder { @Override protected void configureEndpoint( - XsltEndpoint endpoint, + Endpoint endpoint, String remaining, Map<String, Object> parameters) throws Exception { + final XsltEndpoint xsltEndpoint = (XsltEndpoint) endpoint; final String className = uriResolver.getTransletClassName(remaining); TransformerFactory tf = XalanSupport.newTransformerFactoryInstance(); @@ -64,11 +66,11 @@ public class CamelXsltRecorder { tf.setAttribute("package-name", this.config.packageName); tf.setErrorListener(new CamelXsltErrorListener()); - endpoint.setTransformerFactory(tf); + xsltEndpoint.setTransformerFactory(tf); super.configureEndpoint(endpoint, remaining, parameters); - endpoint.setUriResolver(uriResolver); + + xsltEndpoint.setUriResolver(uriResolver); } } - } diff --git a/integration-tests/hystrix/src/main/java/org/apache/camel/quarkus/component/hystrix/it/HystrixRoutes.java b/integration-tests/hystrix/src/main/java/org/apache/camel/quarkus/component/hystrix/it/HystrixRoutes.java index 80c5d82..56ea292 100644 --- a/integration-tests/hystrix/src/main/java/org/apache/camel/quarkus/component/hystrix/it/HystrixRoutes.java +++ b/integration-tests/hystrix/src/main/java/org/apache/camel/quarkus/component/hystrix/it/HystrixRoutes.java @@ -23,7 +23,7 @@ public class HystrixRoutes extends RouteBuilder { @Override public void configure() throws Exception { from("direct:fallback") - .hystrix() + .circuitBreaker() .hystrixConfiguration() .executionTimeoutInMilliseconds(100) .end() @@ -33,7 +33,7 @@ public class HystrixRoutes extends RouteBuilder { .end(); from("direct:fallbackViaNetwork") - .hystrix() + .circuitBreaker() .throwException(new IllegalStateException("Forced exception")) .onFallbackViaNetwork() .to("netty-http:http://localhost:8999/network/fallback") diff --git a/pom.xml b/pom.xml index b6d5270..9158618 100644 --- a/pom.xml +++ b/pom.xml @@ -42,7 +42,6 @@ <camel.version>3.0.0-RC3</camel.version> <hapi.version>3.7.0</hapi.version> - <hapi.server.version>4.1.0</hapi.server.version> <quarkus.version>1.0.0.CR2</quarkus.version> <jetty.version>9.4.18.v20190429</jetty.version> <xstream.version>1.4.11</xstream.version> @@ -168,6 +167,17 @@ <enabled>false</enabled> </releases> </repository> + <repository> + <id>apache.staging</id> + <url>https://repository.apache.org/content/repositories/orgapachecamel-1164/</url> + <name>Apache Snapshot Repo</name> + <snapshots> + <enabled>false</enabled> + </snapshots> + <releases> + <enabled>true</enabled> + </releases> + </repository> </repositories> <pluginRepositories> @@ -181,6 +191,17 @@ <enabled>false</enabled> </releases> </pluginRepository> + <pluginRepository> + <id>apache.staging</id> + <url>https://repository.apache.org/content/repositories/orgapachecamel-1164/</url> + <name>Apache Snapshot Repo</name> + <snapshots> + <enabled>false</enabled> + </snapshots> + <releases> + <enabled>true</enabled> + </releases> + </pluginRepository> </pluginRepositories> <build> diff --git a/poms/bom/pom.xml b/poms/bom/pom.xml index d3d9a4a..f58bf8e 100644 --- a/poms/bom/pom.xml +++ b/poms/bom/pom.xml @@ -661,21 +661,6 @@ <!-- Other third party dependencies (in alphabetical order by groupId:artifactId) --> <dependency> - <groupId>ca.uhn.hapi.fhir</groupId> - <artifactId>hapi-fhir-structures-r4</artifactId> - <version>${hapi.version}</version> - <exclusions> - <exclusion> - <groupId>org.slf4j</groupId> - <artifactId>jcl-over-slf4j</artifactId> - </exclusion> - <exclusion> - <groupId>jakarta.xml.bind</groupId> - <artifactId>jakarta.xml.bind-api</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> <groupId>org.eclipse.jetty</groupId> <artifactId>jetty-client</artifactId> <version>${jetty.version}</version> diff --git a/tooling/maven/package-maven-plugin/pom.xml b/tooling/maven/package-maven-plugin/pom.xml index 5990e28..d108c3f 100644 --- a/tooling/maven/package-maven-plugin/pom.xml +++ b/tooling/maven/package-maven-plugin/pom.xml @@ -54,6 +54,10 @@ <groupId>org.codehaus.plexus</groupId> <artifactId>plexus-component-annotations</artifactId> </exclusion> + <exclusion> + <groupId>org.asciidoctor</groupId> + <artifactId>asciidoctorj</artifactId> + </exclusion> </exclusions> </dependency> <dependency> @@ -123,6 +127,17 @@ </mojoDependencies> </configuration> </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-enforcer-plugin</artifactId> + <configuration> + <!-- + compatibility issue with asciidoc 2.1.0 (camel) vs 2.0.0 (quarkus) + TODO: investigate a better option + --> + <skip/> + </configuration> + </plugin> </plugins> </build> diff --git a/tooling/maven/package-maven-plugin/src/main/java/org/apache/camel/quarkus/maven/UpdateDocExtensionsListMojo.java b/tooling/maven/package-maven-plugin/src/main/java/org/apache/camel/quarkus/maven/UpdateDocExtensionsListMojo.java index 268c09e..a5285e8 100644 --- a/tooling/maven/package-maven-plugin/src/main/java/org/apache/camel/quarkus/maven/UpdateDocExtensionsListMojo.java +++ b/tooling/maven/package-maven-plugin/src/main/java/org/apache/camel/quarkus/maven/UpdateDocExtensionsListMojo.java @@ -19,8 +19,6 @@ package org.apache.camel.quarkus.maven; import java.io.File; import java.io.FileInputStream; import java.io.IOException; -import java.lang.reflect.Field; -import java.lang.reflect.InvocationTargetException; import java.nio.file.Path; import java.nio.file.Paths; import java.util.ArrayList; @@ -33,8 +31,9 @@ import java.util.Map; import java.util.Set; import java.util.TreeSet; +import static java.util.stream.Collectors.toSet; + import org.apache.camel.maven.packaging.JSonSchemaHelper; -import org.apache.camel.maven.packaging.MvelHelper; import org.apache.camel.maven.packaging.StringHelper; import org.apache.camel.maven.packaging.model.ComponentModel; import org.apache.camel.maven.packaging.model.DataFormatModel; @@ -50,7 +49,6 @@ import org.apache.maven.project.MavenProject; import org.apache.maven.project.MavenProjectHelper; import org.mvel2.templates.TemplateRuntime; -import static java.util.stream.Collectors.toSet; import static org.apache.camel.maven.packaging.PackageHelper.loadText; import static org.apache.camel.maven.packaging.PackageHelper.writeText; @@ -666,7 +664,7 @@ public class UpdateDocExtensionsListMojo extends AbstractMojo { private ComponentModel generateComponentModel(String json) { List<Map<String, String>> rows = JSonSchemaHelper.parseJsonSchema("component", json, false); - ComponentModel component = new ComponentModel(false); + ComponentModel component = new ComponentModel(); component.setScheme(JSonSchemaHelper.getSafeValue("scheme", rows)); component.setSyntax(JSonSchemaHelper.getSafeValue("syntax", rows)); component.setAlternativeSyntax(JSonSchemaHelper.getSafeValue("alternativeSyntax", rows));