Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to camel 3.7.0 and camel-quarkus 1.5.0 #573

Merged
merged 10 commits into from
Dec 18, 2020
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions .github/workflows/ci-build-camel-master.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
#
# 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.
#
name: Build (Camel Master)

env:
MAVEN_OPTS: -Xmx3000m
MAVEN_ARGS: -V -ntp -nsu -Dhttp.keepAlive=false -e

on:
push:
branches:
- camel-master
paths-ignore:
- '**.adoc'
- 'KEYS'
- 'LICENSE'
- 'NOTICE'
- 'Jenkinsfile'
pull_request:
branches:
- camel-master
paths-ignore:
- '**.adoc'
- 'KEYS'
- 'LICENSE'
- 'NOTICE'
- 'Jenkinsfile'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: AdoptOpenJDK/install-jdk@v1
with:
version: '11'
- name: Cache Maven packages
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build camel (master)
run: |
git clone --depth 1 --branch master https://github.com/apache/camel.git \
&& cd camel \
&& echo "Current Camel commit:" $(git rev-parse HEAD) \
&& ./mvnw ${MAVEN_ARGS} clean install -Pfastinstall
- name: Build camel-quarkus (camel-master)
run: |
git clone --depth 1 --branch camel-master https://github.com/apache/camel-quarkus.git \
&& cd camel-quarkus \
&& echo "Current Camel Quarkus commit:" $(git rev-parse HEAD) \
&& ./mvnw ${MAVEN_ARGS} clean install -Dquickly -s $(pwd)/settings-camel-3.7.0.xml
- name: Build camel-k-runtime
run: ./mvnw ${MAVEN_ARGS} -Dcheckstyle.failOnViolation=true -Psourcecheck clean install
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
import java.util.Map;

import org.apache.camel.CamelContext;
import org.apache.camel.spi.GeneratedPropertyConfigurer;
import org.apache.camel.spi.ExtendedPropertyConfigurerGetter;
import org.apache.camel.spi.PropertyConfigurerGetter;
import org.apache.camel.spi.ConfigurerStrategy;
import org.apache.camel.spi.GeneratedPropertyConfigurer;
import org.apache.camel.util.CaseInsensitiveMap;
import org.apache.camel.k.SourceDefinition;

Expand All @@ -15,22 +17,6 @@
@SuppressWarnings("unchecked")
public class SourceDefinitionConfigurer extends org.apache.camel.support.component.PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {

private static final Map<String, Object> ALL_OPTIONS;
static {
Map<String, Object> map = new CaseInsensitiveMap();
map.put("Compressed", boolean.class);
map.put("Content", byte[].class);
map.put("Id", java.lang.String.class);
map.put("Interceptors", java.util.List.class);
map.put("Language", java.lang.String.class);
map.put("Loader", java.lang.String.class);
map.put("Location", java.lang.String.class);
map.put("Name", java.lang.String.class);
map.put("PropertyNames", java.util.List.class);
map.put("Type", org.apache.camel.k.SourceType.class);
ALL_OPTIONS = map;
}

@Override
public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
org.apache.camel.k.SourceDefinition target = (org.apache.camel.k.SourceDefinition) obj;
Expand Down Expand Up @@ -60,8 +46,30 @@ public boolean configure(CamelContext camelContext, Object obj, String name, Obj
}

@Override
public Map<String, Object> getAllOptions(Object target) {
return ALL_OPTIONS;
public Class<?> getOptionType(String name, boolean ignoreCase) {
switch (ignoreCase ? name.toLowerCase() : name) {
case "compressed":
case "Compressed": return boolean.class;
case "content":
case "Content": return byte[].class;
case "id":
case "Id": return java.lang.String.class;
case "interceptors":
case "Interceptors": return java.util.List.class;
case "language":
case "Language": return java.lang.String.class;
case "loader":
case "Loader": return java.lang.String.class;
case "location":
case "Location": return java.lang.String.class;
case "name":
case "Name": return java.lang.String.class;
case "propertynames":
case "PropertyNames": return java.util.List.class;
case "type":
case "Type": return org.apache.camel.k.SourceType.class;
default: return null;
}
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
import java.util.Map;

import org.apache.camel.CamelContext;
import org.apache.camel.spi.GeneratedPropertyConfigurer;
import org.apache.camel.spi.ExtendedPropertyConfigurerGetter;
import org.apache.camel.spi.PropertyConfigurerGetter;
import org.apache.camel.spi.ConfigurerStrategy;
import org.apache.camel.spi.GeneratedPropertyConfigurer;
import org.apache.camel.util.CaseInsensitiveMap;
import org.apache.camel.k.listener.SourcesConfigurer;

Expand All @@ -15,13 +17,6 @@
@SuppressWarnings("unchecked")
public class SourcesConfigurerConfigurer extends org.apache.camel.support.component.PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {

private static final Map<String, Object> ALL_OPTIONS;
static {
Map<String, Object> map = new CaseInsensitiveMap();
map.put("Sources", org.apache.camel.k.SourceDefinition[].class);
ALL_OPTIONS = map;
}

@Override
public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
org.apache.camel.k.listener.SourcesConfigurer target = (org.apache.camel.k.listener.SourcesConfigurer) obj;
Expand All @@ -33,8 +28,12 @@ public boolean configure(CamelContext camelContext, Object obj, String name, Obj
}

@Override
public Map<String, Object> getAllOptions(Object target) {
return ALL_OPTIONS;
public Class<?> getOptionType(String name, boolean ignoreCase) {
switch (ignoreCase ? name.toLowerCase() : name) {
case "sources":
case "Sources": return org.apache.camel.k.SourceDefinition[].class;
default: return null;
}
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
import java.util.Map;

import org.apache.camel.CamelContext;
import org.apache.camel.spi.GeneratedPropertyConfigurer;
import org.apache.camel.spi.ExtendedPropertyConfigurerGetter;
import org.apache.camel.spi.PropertyConfigurerGetter;
import org.apache.camel.spi.ConfigurerStrategy;
import org.apache.camel.spi.GeneratedPropertyConfigurer;
import org.apache.camel.util.CaseInsensitiveMap;
import org.apache.camel.k.cron.CronSourceLoaderInterceptor;

Expand All @@ -15,15 +17,6 @@
@SuppressWarnings("unchecked")
public class CronSourceLoaderInterceptorConfigurer extends org.apache.camel.support.component.PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {

private static final Map<String, Object> ALL_OPTIONS;
static {
Map<String, Object> map = new CaseInsensitiveMap();
map.put("OverridableComponents", java.lang.String.class);
map.put("Runtime", org.apache.camel.k.Runtime.class);
map.put("TimerUri", java.lang.String.class);
ALL_OPTIONS = map;
}

@Override
public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
org.apache.camel.k.cron.CronSourceLoaderInterceptor target = (org.apache.camel.k.cron.CronSourceLoaderInterceptor) obj;
Expand All @@ -39,8 +32,16 @@ public boolean configure(CamelContext camelContext, Object obj, String name, Obj
}

@Override
public Map<String, Object> getAllOptions(Object target) {
return ALL_OPTIONS;
public Class<?> getOptionType(String name, boolean ignoreCase) {
switch (ignoreCase ? name.toLowerCase() : name) {
case "overridablecomponents":
case "OverridableComponents": return java.lang.String.class;
case "runtime":
case "Runtime": return org.apache.camel.k.Runtime.class;
case "timeruri":
case "TimerUri": return java.lang.String.class;
default: return null;
}
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
import java.util.Map;

import org.apache.camel.CamelContext;
import org.apache.camel.spi.GeneratedPropertyConfigurer;
import org.apache.camel.spi.ExtendedPropertyConfigurerGetter;
import org.apache.camel.spi.PropertyConfigurerGetter;
import org.apache.camel.spi.ConfigurerStrategy;
import org.apache.camel.spi.GeneratedPropertyConfigurer;
import org.apache.camel.util.CaseInsensitiveMap;
import org.apache.camel.k.knative.customizer.KnativeSinkBindingContextCustomizer;

Expand All @@ -15,16 +17,6 @@
@SuppressWarnings("unchecked")
public class KnativeSinkBindingContextCustomizerConfigurer extends org.apache.camel.support.component.PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {

private static final Map<String, Object> ALL_OPTIONS;
static {
Map<String, Object> map = new CaseInsensitiveMap();
map.put("ApiVersion", java.lang.String.class);
map.put("Kind", java.lang.String.class);
map.put("Name", java.lang.String.class);
map.put("Type", org.apache.camel.component.knative.spi.Knative.Type.class);
ALL_OPTIONS = map;
}

@Override
public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
org.apache.camel.k.knative.customizer.KnativeSinkBindingContextCustomizer target = (org.apache.camel.k.knative.customizer.KnativeSinkBindingContextCustomizer) obj;
Expand All @@ -42,8 +34,18 @@ public boolean configure(CamelContext camelContext, Object obj, String name, Obj
}

@Override
public Map<String, Object> getAllOptions(Object target) {
return ALL_OPTIONS;
public Class<?> getOptionType(String name, boolean ignoreCase) {
switch (ignoreCase ? name.toLowerCase() : name) {
case "apiversion":
case "ApiVersion": return java.lang.String.class;
case "kind":
case "Kind": return java.lang.String.class;
case "name":
case "Name": return java.lang.String.class;
case "type":
case "Type": return org.apache.camel.component.knative.spi.Knative.Type.class;
default: return null;
}
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import org.apache.camel.RuntimeCamelException
import org.apache.camel.component.jackson.JacksonDataFormat
import org.apache.camel.component.log.LogComponent
import org.apache.camel.component.seda.SedaComponent
import org.apache.camel.impl.engine.DefaultChannel
import org.apache.camel.k.loader.groovy.support.MyBean
import org.apache.camel.k.loader.groovy.support.TestRuntime
import org.apache.camel.language.bean.BeanLanguage
Expand All @@ -31,7 +32,6 @@ import org.apache.camel.model.rest.GetVerbDefinition
import org.apache.camel.model.rest.PostVerbDefinition
import org.apache.camel.processor.FatalFallbackErrorHandler
import org.apache.camel.processor.SendProcessor
import org.apache.camel.processor.channel.DefaultChannel
import org.apache.camel.spi.HeaderFilterStrategy
import org.apache.camel.support.DefaultHeaderFilterStrategy
import spock.lang.AutoCleanup
Expand Down
7 changes: 4 additions & 3 deletions camel-k-loader-yaml/impl-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,11 @@
<artifactId>jackson-dataformat-yaml</artifactId>
</dependency>

<!-- JAXB APIs are required by jackson-dataformat-yaml -->
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>${jaxb-api-version}</version>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>${jakarta-jaxb-version}</version>
</dependency>

<dependency>
Expand Down
Loading