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-k-runtime.git
The following commit(s) were added to refs/heads/master by this push: new 2a88332 Update to camel 3.0.0-M4 #94 2a88332 is described below commit 2a883326f3db85bb0dedf827e038ec902424251a Author: lburgazzoli <lburgazz...@gmail.com> AuthorDate: Thu Jul 11 19:47:05 2019 +0200 Update to camel 3.0.0-M4 #94 --- .../camel/k/tooling/maven/GenerateCatalogMojo.java | 9 ++++-- .../maven/processors/CatalogProcessor3x.java | 35 +++++++++++++++++++++- .../maven/processors/CatalogProcessor3Test.java | 12 +++++++- camel-k-runtime-core/pom.xml | 12 +------- .../apache/camel/k/support/PropertiesSupport.java | 35 ++++++---------------- .../camel-k-runtime-example-health/pom.xml | 2 +- .../camel-k-runtime-example-servlet/pom.xml | 2 +- .../camel-k-runtime-example-yaml/pom.xml | 2 +- camel-k-runtime-groovy/pom.xml | 29 +++++++++++++++--- camel-k-runtime-health/pom.xml | 2 +- camel-k-runtime-jvm/pom.xml | 32 +++++++++++++++++++- camel-k-runtime-knative/pom.xml | 2 +- camel-k-runtime-kotlin/pom.xml | 32 +++++++++++++++++++- camel-k-runtime-servlet/pom.xml | 2 +- camel-k-runtime-yaml/pom.xml | 23 +++++++++++++- .../camel/k/yaml/parser/SetHeaderStepParser.java | 6 ---- .../camel/k/yaml/parser/SetPropertyStepParser.java | 6 ---- .../camel/k/yaml/parser/StepParserSupport.java | 3 +- .../camel/k/yaml/parser/SetHeaderTest.groovy | 4 +-- .../camel/k/yaml/parser/SetPropertyTest.groovy | 12 ++++---- camel-knative-http/pom.xml | 2 +- camel-knative/pom.xml | 23 ++++++++++++-- pom.xml | 2 +- 23 files changed, 210 insertions(+), 79 deletions(-) diff --git a/camel-k-maven-plugin/src/main/java/org/apache/camel/k/tooling/maven/GenerateCatalogMojo.java b/camel-k-maven-plugin/src/main/java/org/apache/camel/k/tooling/maven/GenerateCatalogMojo.java index dd802e5..5980901 100644 --- a/camel-k-maven-plugin/src/main/java/org/apache/camel/k/tooling/maven/GenerateCatalogMojo.java +++ b/camel-k-maven-plugin/src/main/java/org/apache/camel/k/tooling/maven/GenerateCatalogMojo.java @@ -17,7 +17,6 @@ package org.apache.camel.k.tooling.maven; import java.io.IOException; -import java.io.InputStream; import java.io.Writer; import java.nio.charset.StandardCharsets; import java.nio.file.Files; @@ -29,6 +28,7 @@ import java.util.Objects; import java.util.ServiceLoader; import java.util.SortedMap; import java.util.TreeMap; +import java.util.regex.Pattern; import java.util.stream.StreamSupport; import com.fasterxml.jackson.annotation.JsonInclude; @@ -54,7 +54,6 @@ import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.plugins.annotations.ResolutionScope; import org.apache.maven.project.MavenProject; -import org.apache.maven.shared.utils.io.IOUtil; @Mojo( name = "generate-catalog", @@ -167,6 +166,12 @@ public class GenerateCatalogMojo extends AbstractMojo { private void processComponents(org.apache.camel.catalog.CamelCatalog catalog, Map<String, CamelArtifact> artifacts) { for (String name : catalog.findComponentNames()) { String json = catalog.componentJSonSchema(name); + + if ("rest-swagger".equalsIgnoreCase(name)) { + // TODO: workaround for https://issues.apache.org/jira/browse/CAMEL-13588 + json = json.replaceAll(Pattern.quote("\\h"), "h"); + } + CatalogComponentDefinition definition = CatalogSupport.unmarshallComponent(json); artifacts.compute(definition.getArtifactId(), (key, artifact) -> { diff --git a/camel-k-maven-plugin/src/main/java/org/apache/camel/k/tooling/maven/processors/CatalogProcessor3x.java b/camel-k-maven-plugin/src/main/java/org/apache/camel/k/tooling/maven/processors/CatalogProcessor3x.java index 8d21e7f..881d0f8 100644 --- a/camel-k-maven-plugin/src/main/java/org/apache/camel/k/tooling/maven/processors/CatalogProcessor3x.java +++ b/camel-k-maven-plugin/src/main/java/org/apache/camel/k/tooling/maven/processors/CatalogProcessor3x.java @@ -93,7 +93,9 @@ public class CatalogProcessor3x implements CatalogProcessor { artifact.setGroupId("org.apache.camel.k"); artifact.setArtifactId("camel-k-runtime-jvm"); artifact.setVersion(project.getVersion()); - artifact.addDependency("org.apache.camel", "camel-core"); + artifact.addDependency("org.apache.camel", "camel-core-engine"); + artifact.addDependency("org.apache.camel", "camel-main"); + artifact.addDependency("org.apache.camel", "camel-properties"); artifacts.put(artifact.getArtifactId(), artifact); } @@ -198,6 +200,26 @@ public class CatalogProcessor3x implements CatalogProcessor { // ************************ // + // camel-http4 + // + // ************************ + + { + CamelArtifact artifact = new CamelArtifact(); + artifact.setGroupId("org.apache.camel.k"); + artifact.setArtifactId("camel-k-runtime-knative"); + artifact.addDependency("org.apache.camel.k", "camel-k-runtime-yaml"); + artifact.addDependency("org.apache.camel.k", "camel-knative"); + artifact.addDependency("org.apache.camel.k", "camel-knative-http"); + artifact.addDependency("org.apache.camel", "camel-netty4-http"); + + artifacts.put(artifact.getArtifactId(), artifact); + + + } + + // ************************ + // // // // ************************ @@ -208,5 +230,16 @@ public class CatalogProcessor3x implements CatalogProcessor { for (String scheme: KNOWN_PASSIVE_URIS) { artifacts.values().forEach(artifact -> artifact.getScheme(scheme).ifPresent(s -> s.setPassive(true))); } + + // ************************ + // + // + // + // ************************ + + artifacts.computeIfPresent("camel-http4", (key, artifact) -> { + artifact.addDependency("org.apache.camel", "camel-file"); + return artifact; + }); } } diff --git a/camel-k-maven-plugin/src/test/java/org/apache/camel/k/tooling/maven/processors/CatalogProcessor3Test.java b/camel-k-maven-plugin/src/test/java/org/apache/camel/k/tooling/maven/processors/CatalogProcessor3Test.java index 88b3b8c..295e8e2 100644 --- a/camel-k-maven-plugin/src/test/java/org/apache/camel/k/tooling/maven/processors/CatalogProcessor3Test.java +++ b/camel-k-maven-plugin/src/test/java/org/apache/camel/k/tooling/maven/processors/CatalogProcessor3Test.java @@ -78,6 +78,7 @@ public class CatalogProcessor3Test extends AbstractCataloProcessorTest { CatalogProcessor processor = new CatalogProcessor3x(); CamelCatalog catalog = versionCamelCatalog("3.0.0"); Map<String, CamelArtifact> artifactMap = new HashMap<>(); + artifactMap.put("camel-http4", new CamelArtifact()); assertThat(processor.accepts(catalog)).isTrue(); processor.process(new MavenProject(), catalog, artifactMap); @@ -85,7 +86,10 @@ public class CatalogProcessor3Test extends AbstractCataloProcessorTest { assertThat(artifactMap.get("camel-k-runtime-jvm")).satisfies(a -> { assertThat(a.getDependencies()).anyMatch( - d -> d.getGroupId().equals("org.apache.camel") && d.getArtifactId().equals("camel-core") + d -> d.getGroupId().equals("org.apache.camel") && d.getArtifactId().equals("camel-core-engine") + ); + assertThat(a.getDependencies()).anyMatch( + d -> d.getGroupId().equals("org.apache.camel") && d.getArtifactId().equals("camel-properties") ); }); assertThat(artifactMap.get("camel-k-runtime-groovy")).satisfies(a -> { @@ -126,5 +130,11 @@ public class CatalogProcessor3Test extends AbstractCataloProcessorTest { d -> d.getGroupId().equals("org.apache.camel") && d.getArtifactId().equals("camel-netty4-http") ); }); + + assertThat(artifactMap.get("camel-http4")).satisfies(a -> { + assertThat(a.getDependencies()).anyMatch( + d -> d.getGroupId().equals("org.apache.camel") && d.getArtifactId().equals("camel-file") + ); + }); } } diff --git a/camel-k-runtime-core/pom.xml b/camel-k-runtime-core/pom.xml index 56cfd57..9d04a58 100644 --- a/camel-k-runtime-core/pom.xml +++ b/camel-k-runtime-core/pom.xml @@ -43,17 +43,7 @@ <dependency> <groupId>org.apache.camel</groupId> - <artifactId>camel-api</artifactId> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.apache.camel</groupId> - <artifactId>camel-core</artifactId> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.apache.camel</groupId> - <artifactId>camel-base</artifactId> + <artifactId>camel-core-engine</artifactId> <scope>provided</scope> </dependency> <dependency> diff --git a/camel-k-runtime-core/src/main/java/org/apache/camel/k/support/PropertiesSupport.java b/camel-k-runtime-core/src/main/java/org/apache/camel/k/support/PropertiesSupport.java index 2bd59ca..81ecf28 100644 --- a/camel-k-runtime-core/src/main/java/org/apache/camel/k/support/PropertiesSupport.java +++ b/camel-k-runtime-core/src/main/java/org/apache/camel/k/support/PropertiesSupport.java @@ -25,9 +25,10 @@ import java.nio.file.Path; import java.nio.file.Paths; import java.nio.file.SimpleFileVisitor; import java.nio.file.attribute.BasicFileAttributes; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; import java.util.Properties; -import java.util.concurrent.atomic.AtomicInteger; import org.apache.camel.CamelContext; import org.apache.camel.component.properties.PropertiesComponent; @@ -40,38 +41,20 @@ public final class PropertiesSupport { private PropertiesSupport() { } - public static int bindProperties(CamelContext context, Object target, String prefix) { + public static boolean bindProperties(CamelContext context, Object target, String prefix) { final PropertiesComponent component = context.getComponent("properties", PropertiesComponent.class); final Properties properties = component.loadProperties(); if (properties == null) { - return 0; + return false; } - return bindProperties(context, properties, target, prefix); - } - - public static int bindProperties(CamelContext context, Properties properties, Object target, String prefix) { - final AtomicInteger count = new AtomicInteger(); - - properties.entrySet().stream() - .filter(entry -> entry.getKey() instanceof String) - .filter(entry -> entry.getValue() != null) - .filter(entry -> ((String)entry.getKey()).startsWith(prefix)) - .forEach(entry -> { - final String key = ((String)entry.getKey()).substring(prefix.length()); - final Object val = entry.getValue(); - - try { - if (PropertyBindingSupport.bindProperty(context, target, key, val)) { - count.incrementAndGet(); - } - } catch (Exception ex) { - throw new RuntimeException(ex); - } - }); + Map<String, Object> props = new HashMap<>(); + for (String key : properties.stringPropertyNames()) { + props.put(key, properties.get(key)); + } - return count.get(); + return PropertyBindingSupport.bindProperties(context, target, props, prefix); } public static Properties loadProperties() { diff --git a/camel-k-runtime-examples/camel-k-runtime-example-health/pom.xml b/camel-k-runtime-examples/camel-k-runtime-example-health/pom.xml index cbb4273..ab15e19 100644 --- a/camel-k-runtime-examples/camel-k-runtime-example-health/pom.xml +++ b/camel-k-runtime-examples/camel-k-runtime-example-health/pom.xml @@ -37,7 +37,7 @@ <dependency> <groupId>org.apache.camel</groupId> - <artifactId>camel-core</artifactId> + <artifactId>camel-core-engine</artifactId> </dependency> <dependency> <groupId>org.apache.camel</groupId> diff --git a/camel-k-runtime-examples/camel-k-runtime-example-servlet/pom.xml b/camel-k-runtime-examples/camel-k-runtime-example-servlet/pom.xml index a3cff98..07a8050 100644 --- a/camel-k-runtime-examples/camel-k-runtime-example-servlet/pom.xml +++ b/camel-k-runtime-examples/camel-k-runtime-example-servlet/pom.xml @@ -37,7 +37,7 @@ <dependency> <groupId>org.apache.camel</groupId> - <artifactId>camel-core</artifactId> + <artifactId>camel-core-engine</artifactId> </dependency> <dependency> <groupId>org.apache.camel</groupId> diff --git a/camel-k-runtime-examples/camel-k-runtime-example-yaml/pom.xml b/camel-k-runtime-examples/camel-k-runtime-example-yaml/pom.xml index 34e801b..398a978 100644 --- a/camel-k-runtime-examples/camel-k-runtime-example-yaml/pom.xml +++ b/camel-k-runtime-examples/camel-k-runtime-example-yaml/pom.xml @@ -37,7 +37,7 @@ <dependency> <groupId>org.apache.camel</groupId> - <artifactId>camel-core</artifactId> + <artifactId>camel-core-engine</artifactId> </dependency> <dependency> <groupId>org.apache.camel</groupId> diff --git a/camel-k-runtime-groovy/pom.xml b/camel-k-runtime-groovy/pom.xml index ae993ed..7b41825 100644 --- a/camel-k-runtime-groovy/pom.xml +++ b/camel-k-runtime-groovy/pom.xml @@ -35,17 +35,18 @@ <dependency> <groupId>org.apache.camel</groupId> - <artifactId>camel-api</artifactId> + <artifactId>camel-core-engine</artifactId> <scope>provided</scope> </dependency> <dependency> <groupId>org.apache.camel</groupId> - <artifactId>camel-core</artifactId> + <artifactId>camel-main</artifactId> <scope>provided</scope> </dependency> <dependency> - <groupId>org.apache.camel.k</groupId> - <artifactId>camel-k-runtime-core</artifactId> + <groupId>org.apache.camel</groupId> + <artifactId>camel-log</artifactId> + <scope>provided</scope> </dependency> <dependency> @@ -75,6 +76,26 @@ <dependency> <groupId>org.apache.camel</groupId> + <artifactId>camel-timer</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.camel</groupId> + <artifactId>camel-seda</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.camel</groupId> + <artifactId>camel-rest</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.camel</groupId> + <artifactId>camel-direct</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.camel</groupId> <artifactId>camel-properties</artifactId> <scope>test</scope> </dependency> diff --git a/camel-k-runtime-health/pom.xml b/camel-k-runtime-health/pom.xml index f9af59b..0888876 100644 --- a/camel-k-runtime-health/pom.xml +++ b/camel-k-runtime-health/pom.xml @@ -37,7 +37,7 @@ <dependency> <groupId>org.apache.camel</groupId> - <artifactId>camel-core</artifactId> + <artifactId>camel-core-engine</artifactId> <scope>provided</scope> </dependency> <dependency> diff --git a/camel-k-runtime-jvm/pom.xml b/camel-k-runtime-jvm/pom.xml index 48f0b24..4c5caab 100644 --- a/camel-k-runtime-jvm/pom.xml +++ b/camel-k-runtime-jvm/pom.xml @@ -42,7 +42,12 @@ <dependency> <groupId>org.apache.camel</groupId> - <artifactId>camel-core</artifactId> + <artifactId>camel-core-engine</artifactId> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.apache.camel</groupId> + <artifactId>camel-main</artifactId> <scope>provided</scope> </dependency> @@ -80,6 +85,31 @@ </dependency> <dependency> <groupId>org.apache.camel</groupId> + <artifactId>camel-timer</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.camel</groupId> + <artifactId>camel-seda</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.camel</groupId> + <artifactId>camel-log</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.camel</groupId> + <artifactId>camel-rest</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.camel</groupId> + <artifactId>camel-direct</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.camel</groupId> <artifactId>camel-properties</artifactId> <scope>test</scope> </dependency> diff --git a/camel-k-runtime-knative/pom.xml b/camel-k-runtime-knative/pom.xml index bd0b0c2..febd934 100644 --- a/camel-k-runtime-knative/pom.xml +++ b/camel-k-runtime-knative/pom.xml @@ -44,7 +44,7 @@ <dependency> <groupId>org.apache.camel</groupId> - <artifactId>camel-core</artifactId> + <artifactId>camel-core-engine</artifactId> <scope>provided</scope> </dependency> diff --git a/camel-k-runtime-kotlin/pom.xml b/camel-k-runtime-kotlin/pom.xml index 560b093..63bd714 100644 --- a/camel-k-runtime-kotlin/pom.xml +++ b/camel-k-runtime-kotlin/pom.xml @@ -35,7 +35,17 @@ <dependency> <groupId>org.apache.camel</groupId> - <artifactId>camel-core</artifactId> + <artifactId>camel-core-engine</artifactId> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.apache.camel</groupId> + <artifactId>camel-main</artifactId> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.apache.camel</groupId> + <artifactId>camel-log</artifactId> <scope>provided</scope> </dependency> @@ -68,6 +78,26 @@ <dependency> <groupId>org.apache.camel</groupId> + <artifactId>camel-timer</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.camel</groupId> + <artifactId>camel-seda</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.camel</groupId> + <artifactId>camel-rest</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.camel</groupId> + <artifactId>camel-direct</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.camel</groupId> <artifactId>camel-properties</artifactId> <scope>test</scope> </dependency> diff --git a/camel-k-runtime-servlet/pom.xml b/camel-k-runtime-servlet/pom.xml index 90b37fb..3e9c69f 100644 --- a/camel-k-runtime-servlet/pom.xml +++ b/camel-k-runtime-servlet/pom.xml @@ -37,7 +37,7 @@ <dependency> <groupId>org.apache.camel</groupId> - <artifactId>camel-core</artifactId> + <artifactId>camel-core-engine</artifactId> <scope>provided</scope> </dependency> <dependency> diff --git a/camel-k-runtime-yaml/pom.xml b/camel-k-runtime-yaml/pom.xml index c4251e6..9f05f32 100644 --- a/camel-k-runtime-yaml/pom.xml +++ b/camel-k-runtime-yaml/pom.xml @@ -42,7 +42,8 @@ <dependency> <groupId>org.apache.camel</groupId> - <artifactId>camel-core</artifactId> + <artifactId>camel-core-engine</artifactId> + <scope>provided</scope> </dependency> <dependency> @@ -69,9 +70,29 @@ </dependency> <dependency> <groupId>org.apache.camel</groupId> + <artifactId>camel-mock</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.camel</groupId> <artifactId>camel-test</artifactId> <scope>test</scope> </dependency> + <dependency> + <groupId>org.apache.camel</groupId> + <artifactId>camel-direct</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.camel</groupId> + <artifactId>camel-log</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.camel</groupId> + <artifactId>camel-bean</artifactId> + <scope>test</scope> + </dependency> <dependency> <groupId>org.codehaus.groovy</groupId> diff --git a/camel-k-runtime-yaml/src/main/java/org/apache/camel/k/yaml/parser/SetHeaderStepParser.java b/camel-k-runtime-yaml/src/main/java/org/apache/camel/k/yaml/parser/SetHeaderStepParser.java index 7c2f88e..cf769b3 100644 --- a/camel-k-runtime-yaml/src/main/java/org/apache/camel/k/yaml/parser/SetHeaderStepParser.java +++ b/camel-k-runtime-yaml/src/main/java/org/apache/camel/k/yaml/parser/SetHeaderStepParser.java @@ -16,7 +16,6 @@ */ package org.apache.camel.k.yaml.parser; -import com.fasterxml.jackson.annotation.JsonAlias; import org.apache.camel.model.ProcessorDefinition; import org.apache.camel.model.SetHeaderDefinition; @@ -31,11 +30,6 @@ public class SetHeaderStepParser implements ProcessorStepParser { } public static final class Definition extends SetHeaderDefinition implements HasExpression { - @JsonAlias("name") - @Override - public void setHeaderName(String headerName) { - super.setHeaderName(headerName); - } } } diff --git a/camel-k-runtime-yaml/src/main/java/org/apache/camel/k/yaml/parser/SetPropertyStepParser.java b/camel-k-runtime-yaml/src/main/java/org/apache/camel/k/yaml/parser/SetPropertyStepParser.java index 4ea2b87..484a280 100644 --- a/camel-k-runtime-yaml/src/main/java/org/apache/camel/k/yaml/parser/SetPropertyStepParser.java +++ b/camel-k-runtime-yaml/src/main/java/org/apache/camel/k/yaml/parser/SetPropertyStepParser.java @@ -16,7 +16,6 @@ */ package org.apache.camel.k.yaml.parser; -import com.fasterxml.jackson.annotation.JsonAlias; import org.apache.camel.model.ProcessorDefinition; import org.apache.camel.model.SetPropertyDefinition; @@ -31,11 +30,6 @@ public class SetPropertyStepParser implements ProcessorStepParser { } public static final class Definition extends SetPropertyDefinition implements HasExpression { - @JsonAlias("name") - @Override - public void setPropertyName(String propertyName) { - super.setPropertyName(propertyName); - } } } diff --git a/camel-k-runtime-yaml/src/main/java/org/apache/camel/k/yaml/parser/StepParserSupport.java b/camel-k-runtime-yaml/src/main/java/org/apache/camel/k/yaml/parser/StepParserSupport.java index c6d5f0c..3a0bf67 100644 --- a/camel-k-runtime-yaml/src/main/java/org/apache/camel/k/yaml/parser/StepParserSupport.java +++ b/camel-k-runtime-yaml/src/main/java/org/apache/camel/k/yaml/parser/StepParserSupport.java @@ -22,6 +22,7 @@ import java.util.Objects; import org.apache.camel.CamelContext; import org.apache.camel.k.yaml.model.Step; +import org.apache.camel.model.OutputNode; import org.apache.camel.model.ProcessorDefinition; import org.apache.camel.support.IntrospectionSupport; import org.apache.camel.support.PropertyBindingSupport; @@ -83,7 +84,7 @@ public final class StepParserSupport { current.addOutput(child); - if (child.isOutputSupported() && child.getOutputs().isEmpty()) { + if (child instanceof OutputNode && child.getOutputs().isEmpty()) { current = child; } } diff --git a/camel-k-runtime-yaml/src/test/groovy/org/apache/camel/k/yaml/parser/SetHeaderTest.groovy b/camel-k-runtime-yaml/src/test/groovy/org/apache/camel/k/yaml/parser/SetHeaderTest.groovy index 74b94f3..5d4e597 100644 --- a/camel-k-runtime-yaml/src/test/groovy/org/apache/camel/k/yaml/parser/SetHeaderTest.groovy +++ b/camel-k-runtime-yaml/src/test/groovy/org/apache/camel/k/yaml/parser/SetHeaderTest.groovy @@ -31,7 +31,7 @@ class SetHeaderTest extends TestSupport { def processor = new SetHeaderStepParser().toProcessor(stepContext) then: with(processor, SetHeaderDefinition) { - headerName == 'test' + name == 'test' expression.language == 'simple' expression.expression == '${body}' } @@ -48,7 +48,7 @@ class SetHeaderTest extends TestSupport { def processor = new SetHeaderStepParser().toProcessor(stepContext) then: with(processor, SetHeaderDefinition) { - headerName == 'test' + name == 'test' expression.language == 'simple' expression.expression == '${body}' } diff --git a/camel-k-runtime-yaml/src/test/groovy/org/apache/camel/k/yaml/parser/SetPropertyTest.groovy b/camel-k-runtime-yaml/src/test/groovy/org/apache/camel/k/yaml/parser/SetPropertyTest.groovy index 04fa79e..31a5286 100644 --- a/camel-k-runtime-yaml/src/test/groovy/org/apache/camel/k/yaml/parser/SetPropertyTest.groovy +++ b/camel-k-runtime-yaml/src/test/groovy/org/apache/camel/k/yaml/parser/SetPropertyTest.groovy @@ -30,11 +30,11 @@ class SetPropertyTest extends TestSupport { when: def processor = new SetPropertyStepParser().toProcessor(stepContext) then: - def p = processor as SetPropertyDefinition - - p.propertyName == 'test' - p.expression.language == 'simple' - p.expression.expression == '${body}' + with(processor, SetPropertyDefinition) { + name == 'test' + expression.language == 'simple' + expression.expression == '${body}' + } } def "definition with expression block"() { @@ -48,7 +48,7 @@ class SetPropertyTest extends TestSupport { def processor = new SetPropertyStepParser().toProcessor(stepContext) then: with(processor, SetPropertyDefinition) { - propertyName == 'test' + name == 'test' expression.language == 'simple' expression.expression == '${body}' } diff --git a/camel-knative-http/pom.xml b/camel-knative-http/pom.xml index b341ee4..ebdbd71 100644 --- a/camel-knative-http/pom.xml +++ b/camel-knative-http/pom.xml @@ -43,7 +43,7 @@ <dependency> <groupId>org.apache.camel</groupId> - <artifactId>camel-core</artifactId> + <artifactId>camel-core-engine</artifactId> <scope>provided</scope> </dependency> <dependency> diff --git a/camel-knative/pom.xml b/camel-knative/pom.xml index 5f3b0f4..a9178a3 100644 --- a/camel-knative/pom.xml +++ b/camel-knative/pom.xml @@ -48,7 +48,7 @@ <dependency> <groupId>org.apache.camel</groupId> - <artifactId>camel-core</artifactId> + <artifactId>camel-core-engine</artifactId> <scope>provided</scope> </dependency> <dependency> @@ -112,7 +112,26 @@ <artifactId>camel-http4</artifactId> <scope>test</scope> </dependency> - + <dependency> + <groupId>org.apache.camel</groupId> + <artifactId>camel-file</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.camel</groupId> + <artifactId>camel-direct</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.camel</groupId> + <artifactId>camel-mock</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.camel</groupId> + <artifactId>camel-log</artifactId> + <scope>test</scope> + </dependency> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-properties</artifactId> diff --git a/pom.xml b/pom.xml index 38bc52c..0098453 100644 --- a/pom.xml +++ b/pom.xml @@ -35,7 +35,7 @@ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target> - <camel.version>3.0.0-M3</camel.version> + <camel.version>3.0.0-M4</camel.version> <catalog.version>${camel.version}</catalog.version> <junit.version>5.5.0</junit.version> <joor.version>0.9.12</joor.version>