You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ja...@apache.org on 2020/10/21 14:17:46 UTC
[camel-quarkus] branch master updated (613827b -> 2eab33c)
This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git.
from 613827b Lumberjack native support fixes #1732
new df62fb3 Remove workaround for AdviceWithRouteBuilder replaceFromWith and microprofile-metrics conflict
new bdb7d18 Remove DigitalSignatureConstants reflection registration
new 2eab33c Main extension cannot load rest XML definitions
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../quarkus/main/CamelMainRoutesCollector.java | 53 ----------------------
.../crypto/deployment/CryptoProcessor.java | 9 ----
.../runtime/CamelMicroProfileMetricsRecorder.java | 6 +--
3 files changed, 1 insertion(+), 67 deletions(-)
[camel-quarkus] 03/03: Main extension cannot load rest XML
definitions
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit 2eab33c2eea54f7db57def4db0bc5cdb91d5c69a
Author: James Netherton <ja...@gmail.com>
AuthorDate: Wed Oct 21 13:28:10 2020 +0100
Main extension cannot load rest XML definitions
Fixes #1852
---
.../quarkus/main/CamelMainRoutesCollector.java | 53 ----------------------
1 file changed, 53 deletions(-)
diff --git a/extensions-core/main/runtime/src/main/java/org/apache/camel/quarkus/main/CamelMainRoutesCollector.java b/extensions-core/main/runtime/src/main/java/org/apache/camel/quarkus/main/CamelMainRoutesCollector.java
index db56da9..8595f53 100644
--- a/extensions-core/main/runtime/src/main/java/org/apache/camel/quarkus/main/CamelMainRoutesCollector.java
+++ b/extensions-core/main/runtime/src/main/java/org/apache/camel/quarkus/main/CamelMainRoutesCollector.java
@@ -16,22 +16,12 @@
*/
package org.apache.camel.quarkus.main;
-import java.io.FileNotFoundException;
-import java.io.InputStream;
-import java.util.ArrayList;
import java.util.List;
-import java.util.Set;
import org.apache.camel.CamelContext;
-import org.apache.camel.ExtendedCamelContext;
import org.apache.camel.RoutesBuilder;
-import org.apache.camel.RuntimeCamelException;
import org.apache.camel.main.DefaultRoutesCollector;
-import org.apache.camel.model.rest.RestsDefinition;
import org.apache.camel.quarkus.core.RegistryRoutesLoader;
-import org.apache.camel.spi.PackageScanResourceResolver;
-import org.apache.camel.util.IOHelper;
-import org.apache.camel.util.StopWatch;
public class CamelMainRoutesCollector extends DefaultRoutesCollector {
private final RegistryRoutesLoader registryRoutesLoader;
@@ -52,47 +42,4 @@ public class CamelMainRoutesCollector extends DefaultRoutesCollector {
return registryRoutesLoader.collectRoutesFromRegistry(camelContext, excludePattern, includePattern);
}
-
- /**
- * TODO: Remove this when upgrading to Camel > 3.5.0.
- *
- * https://github.com/apache/camel-quarkus/issues/1852
- */
- @Override
- public List<RestsDefinition> collectXmlRestsFromDirectory(CamelContext camelContext, String directory) {
- ExtendedCamelContext ecc = camelContext.adapt(ExtendedCamelContext.class);
- PackageScanResourceResolver resolver = camelContext.adapt(ExtendedCamelContext.class).getPackageScanResourceResolver();
-
- List<RestsDefinition> answer = new ArrayList<>();
-
- StopWatch watch = new StopWatch();
- int count = 0;
- String[] parts = directory.split(",");
- for (String part : parts) {
- log.debug("Loading additional Camel XML rests from: {}", part);
- try {
- Set<InputStream> set = resolver.findResources(part);
- for (InputStream is : set) {
- log.debug("Found XML rest from location: {}", part);
- RestsDefinition rests = (RestsDefinition) ecc.getXMLRoutesDefinitionLoader().loadRestsDefinition(ecc, is);
- if (rests != null) {
- answer.add(rests);
- IOHelper.close(is);
- count += rests.getRests().size();
- }
- }
- } catch (FileNotFoundException e) {
- log.debug("No XML rests found in {}. Skipping XML rests detection.", part);
- } catch (Exception e) {
- throw RuntimeCamelException.wrapRuntimeException(e);
- }
- if (count > 0) {
- log.info("Loaded {} ({} millis) additional Camel XML rests from: {}", count, watch.taken(), directory);
- } else {
- log.info("No additional Camel XML rests discovered from: {}", directory);
- }
- }
-
- return answer;
- }
}
[camel-quarkus] 01/03: Remove workaround for AdviceWithRouteBuilder
replaceFromWith and microprofile-metrics conflict
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit df62fb36338e70accdeceffa29bbe6a33834df94
Author: James Netherton <ja...@gmail.com>
AuthorDate: Wed Oct 21 13:04:40 2020 +0100
Remove workaround for AdviceWithRouteBuilder replaceFromWith and microprofile-metrics conflict
Fixes #1894
---
.../metrics/runtime/CamelMicroProfileMetricsRecorder.java | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/extensions/microprofile-metrics/runtime/src/main/java/org/apache/camel/quarkus/component/microprofile/metrics/runtime/CamelMicroProfileMetricsRecorder.java b/extensions/microprofile-metrics/runtime/src/main/java/org/apache/camel/quarkus/component/microprofile/metrics/runtime/CamelMicroProfileMetricsRecorder.java
index 63ae0f3..8af93a4 100644
--- a/extensions/microprofile-metrics/runtime/src/main/java/org/apache/camel/quarkus/component/microprofile/metrics/runtime/CamelMicroProfileMetricsRecorder.java
+++ b/extensions/microprofile-metrics/runtime/src/main/java/org/apache/camel/quarkus/component/microprofile/metrics/runtime/CamelMicroProfileMetricsRecorder.java
@@ -55,11 +55,7 @@ public class CamelMicroProfileMetricsRecorder {
@Override
public void customize(CamelContext camelContext) {
if (config.enableRoutePolicy) {
- MicroProfileMetricsRoutePolicyFactory routePolicyFactory = new MicroProfileMetricsRoutePolicyFactory();
- // TODO: Remove this after upgrade to Camel >= 3.6.0
- // https://github.com/apache/camel-quarkus/issues/1894
- routePolicyFactory.setMetricRegistry(MetricRegistries.get(MetricRegistry.Type.APPLICATION));
- camelContext.addRoutePolicyFactory(routePolicyFactory);
+ camelContext.addRoutePolicyFactory(new MicroProfileMetricsRoutePolicyFactory());
}
ManagementStrategy managementStrategy = camelContext.getManagementStrategy();
[camel-quarkus] 02/03: Remove DigitalSignatureConstants reflection
registration
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit bdb7d1888bd1b56df819ab78028bcb0d08e94237
Author: James Netherton <ja...@gmail.com>
AuthorDate: Wed Oct 21 13:17:20 2020 +0100
Remove DigitalSignatureConstants reflection registration
Fixes #1881
---
.../quarkus/component/crypto/deployment/CryptoProcessor.java | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/extensions/crypto/deployment/src/main/java/org/apache/camel/quarkus/component/crypto/deployment/CryptoProcessor.java b/extensions/crypto/deployment/src/main/java/org/apache/camel/quarkus/component/crypto/deployment/CryptoProcessor.java
index 25d08f3..60a3645 100644
--- a/extensions/crypto/deployment/src/main/java/org/apache/camel/quarkus/component/crypto/deployment/CryptoProcessor.java
+++ b/extensions/crypto/deployment/src/main/java/org/apache/camel/quarkus/component/crypto/deployment/CryptoProcessor.java
@@ -19,8 +19,6 @@ package org.apache.camel.quarkus.component.crypto.deployment;
import io.quarkus.deployment.annotations.BuildStep;
import io.quarkus.deployment.builditem.ExtensionSslNativeSupportBuildItem;
import io.quarkus.deployment.builditem.FeatureBuildItem;
-import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
-import org.apache.camel.component.crypto.DigitalSignatureConstants;
class CryptoProcessor {
@@ -35,11 +33,4 @@ class CryptoProcessor {
ExtensionSslNativeSupportBuildItem activeNativeSSLSupport() {
return new ExtensionSslNativeSupportBuildItem(FEATURE);
}
-
- @BuildStep
- ReflectiveClassBuildItem registerForReflection() {
- // TODO: Remove this when upgrading to Camel >= 3.6.0
- // https://github.com/apache/camel-quarkus/issues/1881
- return new ReflectiveClassBuildItem(false, true, DigitalSignatureConstants.class);
- }
}