You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by lb...@apache.org on 2021/02/03 20:11:25 UTC
[camel] 01/02: camel-main: support for true|false for
include/exclude patterns
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.git
commit 787ba04056a32b5d0e81f73699a31c1e778fc686
Author: Luca Burgazzoli <lb...@gmail.com>
AuthorDate: Wed Feb 3 16:41:04 2021 +0100
camel-main: support for true|false for include/exclude patterns
---
.../src/main/java/org/apache/camel/main/DefaultRoutesCollector.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/core/camel-main/src/main/java/org/apache/camel/main/DefaultRoutesCollector.java b/core/camel-main/src/main/java/org/apache/camel/main/DefaultRoutesCollector.java
index cbe21d1..9988149 100644
--- a/core/camel-main/src/main/java/org/apache/camel/main/DefaultRoutesCollector.java
+++ b/core/camel-main/src/main/java/org/apache/camel/main/DefaultRoutesCollector.java
@@ -129,11 +129,15 @@ public class DefaultRoutesCollector implements RoutesCollector {
StopWatch watch = new StopWatch();
AtomicInteger count = new AtomicInteger();
+ if (ObjectHelper.equal("false", includePattern)) {
+ return answer;
+ }
+
for (String include : includes) {
log.debug("Loading additional RoutesBuilder from: {}", include);
try {
for (Resource resource : resolver.findResources(include)) {
- if (AntPathMatcher.INSTANCE.anyMatch(excludes, resource.getLocation())) {
+ if (!"false".equals(excludePattern) && AntPathMatcher.INSTANCE.anyMatch(excludes, resource.getLocation())) {
continue;
}