[camel] 02/02: CAMEL-13705: Properties component should work with Eclipse MicroProfile Config
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch CAMEL-13705 in repository https://gitbox.apache.org/repos/asf/camel.git commit 61a254d7febd16c77206858e43e52fba8d8ddd0f Author: Claus Ibsen AuthorDate: Mon Jul 1 11:16:41 2019 +0200 CAMEL-13705: Properties component should work with Eclipse MicroProfile Config --- .../java/org/apache/camel/maven/packaging/SpringBootStarterMojo.java | 1 + 1 file changed, 1 insertion(+) diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/SpringBootStarterMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/SpringBootStarterMojo.java index 2a5b36b..d4eac410 100644 --- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/SpringBootStarterMojo.java +++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/SpringBootStarterMojo.java @@ -76,6 +76,7 @@ public class SpringBootStarterMojo extends AbstractMojo { private static final String[] IGNORE_MODULES = { /* OSGi -> */ "camel-blueprint", "camel-core-osgi", "camel-eventadmin", "camel-paxlogging", /* Java EE -> */ "camel-cdi", "camel-ejb", +/* Microprofile -> */ "camel-microprofile-config", /* deprecated (and not working perfectly) -> */ "camel-swagger", "camel-mina", "camel-ibatis", /* currently incompatible */ "camel-spark-rest", /* others (not managed) -> */ "camel-core-xml"};
[camel] 01/02: CAMEL-13705: Properties component should work with Eclipse MicroProfile Config
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch CAMEL-13705 in repository https://gitbox.apache.org/repos/asf/camel.git commit 4912117c004ec6f4d8faa5dee62b9c58627a6553 Author: Claus Ibsen AuthorDate: Mon Jul 1 11:13:20 2019 +0200 CAMEL-13705: Properties component should work with Eclipse MicroProfile Config --- components/camel-microprofile-config/pom.xml | 87 ++ .../src/main/docs/microprofile-config.adoc | 19 + .../config/CamelMicroProfilePropertiesSource.java | 85 + .../org/apache/camel/properties-source-factory | 18 + .../CamelMicroProfilePropertiesSourceTest.java | 74 ++ .../src/test/resources/log4j2.properties | 28 +++ .../component/properties/PropertiesComponent.java | 61 +++ .../component/properties/PropertiesSource.java | 38 ++ .../camel/impl/engine/AbstractCamelContext.java| 2 + 9 files changed, 412 insertions(+) diff --git a/components/camel-microprofile-config/pom.xml b/components/camel-microprofile-config/pom.xml new file mode 100644 index 000..0f64b79 --- /dev/null +++ b/components/camel-microprofile-config/pom.xml @@ -0,0 +1,87 @@ + + +http://www.w3.org/2001/XMLSchema-instance"; xmlns="http://maven.apache.org/POM/4.0.0"; + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd";> +4.0.0 + + +org.apache.camel +components +3.0.0-SNAPSHOT + + +camel-microprofile-config +jar + +Camel :: MicroProfile Config +Camel Eclipse MicroProfile Config + + + + + +org.apache.camel +camel-properties +${project.version} + + + +org.eclipse.microprofile.config +microprofile-config-api +1.3 + + + + +org.apache.camel +camel-test +test + + + +io.smallrye +smallrye-config-1.3 +1.0.0 +test + + + +junit +junit +test + + +org.apache.logging.log4j +log4j-api +test + + +org.apache.logging.log4j +log4j-core +test + + +org.apache.logging.log4j +log4j-slf4j-impl +test + + + + diff --git a/components/camel-microprofile-config/src/main/docs/microprofile-config.adoc b/components/camel-microprofile-config/src/main/docs/microprofile-config.adoc new file mode 100644 index 000..ae43410 --- /dev/null +++ b/components/camel-microprofile-config/src/main/docs/microprofile-config.adoc @@ -0,0 +1,19 @@ +[[MicroProfileConfig-MicroProfileConfigComponent]] +=== MicroProfile Config Component + +*Available as of Camel 3.0* + +The microprofile-config component is used for bridging the Eclipse MicroProfile Config with Camels +properties component. This allows to use configuration management from Eclipse MicroProfile with Camel. + +To enable this just add this component to the classpath and Camel should auto-detect this when starting up. + +=== Register manually + +You can also register the microprofile-config component manually with Apache Camel properties component as shown below: + +[source,java] + +PropertiesComponent pc = (PropertiesComponent) camelContext.getPropertiesComponent(); +pc.addPropertiesSource(new CamelMicroProfilePropertiesSource()); + diff --git a/components/camel-microprofile-config/src/main/java/org/apache/camel/component/microprofile/config/CamelMicroProfilePropertiesSource.java b/components/camel-microprofile-config/src/main/java/org/apache/camel/component/microprofile/config/CamelMicroProfilePropertiesSource.java new file mode 100644 index 000..31aed16 --- /dev/null +++ b/components/camel-microprofile-config/src/main/java/org/apache/camel/component/microprofile/config/CamelMicroProfilePropertiesSource.java @@ -0,0 +1,85 @@ +/** + * 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
[camel] branch CAMEL-13705 created (now 61a254d)
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a change to branch CAMEL-13705 in repository https://gitbox.apache.org/repos/asf/camel.git. at 61a254d CAMEL-13705: Properties component should work with Eclipse MicroProfile Config This branch includes the following new commits: new 4912117 CAMEL-13705: Properties component should work with Eclipse MicroProfile Config new 61a254d CAMEL-13705: Properties component should work with Eclipse MicroProfile Config The 2 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.
[camel] branch CAMEL-13705 updated: Fixed CS
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch CAMEL-13705 in repository https://gitbox.apache.org/repos/asf/camel.git The following commit(s) were added to refs/heads/CAMEL-13705 by this push: new 5502c1b Fixed CS 5502c1b is described below commit 5502c1b311f108b075ad7519a70c6a1e3e1fd04b Author: Claus Ibsen AuthorDate: Mon Jul 1 11:18:14 2019 +0200 Fixed CS --- .../microprofile/config/CamelMicroProfilePropertiesSource.java| 8 .../config/CamelMicroProfilePropertiesSourceTest.java | 8 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/components/camel-microprofile-config/src/main/java/org/apache/camel/component/microprofile/config/CamelMicroProfilePropertiesSource.java b/components/camel-microprofile-config/src/main/java/org/apache/camel/component/microprofile/config/CamelMicroProfilePropertiesSource.java index 31aed16..158605d 100644 --- a/components/camel-microprofile-config/src/main/java/org/apache/camel/component/microprofile/config/CamelMicroProfilePropertiesSource.java +++ b/components/camel-microprofile-config/src/main/java/org/apache/camel/component/microprofile/config/CamelMicroProfilePropertiesSource.java @@ -1,13 +1,13 @@ -/** +/* * 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 - * + * + * 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. diff --git a/components/camel-microprofile-config/src/test/java/org/apache/camel/component/microprofile/config/CamelMicroProfilePropertiesSourceTest.java b/components/camel-microprofile-config/src/test/java/org/apache/camel/component/microprofile/config/CamelMicroProfilePropertiesSourceTest.java index 3bb0c61..214d4bd 100644 --- a/components/camel-microprofile-config/src/test/java/org/apache/camel/component/microprofile/config/CamelMicroProfilePropertiesSourceTest.java +++ b/components/camel-microprofile-config/src/test/java/org/apache/camel/component/microprofile/config/CamelMicroProfilePropertiesSourceTest.java @@ -1,13 +1,13 @@ -/** +/* * 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 - * + * + * 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.
[camel] branch CAMEL-13705 updated (5502c1b -> 4d3397d)
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a change to branch CAMEL-13705 in repository https://gitbox.apache.org/repos/asf/camel.git. from 5502c1b Fixed CS add 4d3397d Polished No new revisions were added by this update. Summary of changes: .../config/CamelMicroProfilePropertiesSource.java| 20 +++- .../component/properties/PropertiesComponent.java| 1 - 2 files changed, 3 insertions(+), 18 deletions(-)
[camel-k] branch master updated: refactor(trait): replace resources and execute post action as part of trait management
This is an automated email from the ASF dual-hosted git repository. astefanutti pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel-k.git The following commit(s) were added to refs/heads/master by this push: new 3e2ee12 refactor(trait): replace resources and execute post action as part of trait management 3e2ee12 is described below commit 3e2ee125ca181fe0d574532b425c2a1587217da3 Author: lburgazzoli AuthorDate: Fri Jun 28 17:35:12 2019 +0200 refactor(trait): replace resources and execute post action as part of trait management --- pkg/controller/integration/deploy.go | 15 +-- pkg/controller/integration/initialize.go | 10 +- pkg/trait/trait.go | 17 - 3 files changed, 18 insertions(+), 24 deletions(-) diff --git a/pkg/controller/integration/deploy.go b/pkg/controller/integration/deploy.go index 1d89ef2..cefdc76 100644 --- a/pkg/controller/integration/deploy.go +++ b/pkg/controller/integration/deploy.go @@ -53,23 +53,10 @@ func (action *deployAction) Handle(ctx context.Context, integration *v1alpha1.In return errors.Wrapf(err, "unable to find integration kit %s, %s", integration.Status.Kit, err) } - env, err := trait.Apply(ctx, action.client, integration, kit) - if err != nil { + if _, err := trait.Apply(ctx, action.client, integration, kit); err != nil { return err } - err = kubernetes.ReplaceResources(ctx, action.client, env.Resources.Items()) - if err != nil { - return err - } - - for _, postAction := range env.PostActions { - err := postAction(env) - if err != nil { - action.L.Errorf(err, "error executing deployment post action") - } - } - target := integration.DeepCopy() target.Status.Phase = v1alpha1.IntegrationPhaseRunning diff --git a/pkg/controller/integration/initialize.go b/pkg/controller/integration/initialize.go index b8cbac7..b84aa0f 100644 --- a/pkg/controller/integration/initialize.go +++ b/pkg/controller/integration/initialize.go @@ -20,8 +20,6 @@ package integration import ( "context" - "github.com/apache/camel-k/pkg/util/kubernetes" - "github.com/apache/camel-k/pkg/apis/camel/v1alpha1" "github.com/apache/camel-k/pkg/platform" "github.com/apache/camel-k/pkg/trait" @@ -93,13 +91,7 @@ func (action *initializeAction) Handle(ctx context.Context, integration *v1alpha target := integration.DeepCopy() // execute custom initialization - env, err := trait.Apply(ctx, action.client, target, nil) - if err != nil { - return err - } - - err = kubernetes.ReplaceResources(ctx, action.client, env.Resources.Items()) - if err != nil { + if _, err := trait.Apply(ctx, action.client, target, nil); err != nil { return err } diff --git a/pkg/trait/trait.go b/pkg/trait/trait.go index 2f30c8c..8e50c2c 100644 --- a/pkg/trait/trait.go +++ b/pkg/trait/trait.go @@ -44,7 +44,22 @@ func Apply(ctx context.Context, c client.Client, integration *v1alpha1.Integrati // invoke the trait framework to determine the needed resources if err := catalog.apply(environment); err != nil { - return nil, errors.Wrap(err, "error during trait customization before deployment") + return nil, errors.Wrap(err, "error during trait customization") + } + + // replace resources created by the trait + if environment.Resources != nil { + if err := kubernetes.ReplaceResources(ctx, c, environment.Resources.Items()); err != nil { + return nil, errors.Wrap(err, "error during replace resource") + } + } + + // execute post actions registered by traits + for _, postAction := range environment.PostActions { + err := postAction(environment) + if err != nil { + return nil, errors.Wrap(err, "error executing post actions") + } } return environment, nil
[camel] branch CAMEL-13705 updated (4d3397d -> 2aca333)
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a change to branch CAMEL-13705 in repository https://gitbox.apache.org/repos/asf/camel.git. from 4d3397d Polished add 2aca333 CAMEL-13709: Properties component - Optimise to not call loadProperties to frequently No new revisions were added by this update. Summary of changes: .../camel/component/properties/PropertiesComponent.java | 13 +++-- .../properties/PropertiesComponentEIPChoiceSimpleTest.java | 9 + 2 files changed, 16 insertions(+), 6 deletions(-)
[camel] 04/05: Polished
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git commit 56acfb6069d4beb9b92a952f47e5b7197e260788 Author: Claus Ibsen AuthorDate: Mon Jul 1 11:20:55 2019 +0200 Polished --- .../config/CamelMicroProfilePropertiesSource.java| 20 +++- .../component/properties/PropertiesComponent.java| 1 - 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/components/camel-microprofile-config/src/main/java/org/apache/camel/component/microprofile/config/CamelMicroProfilePropertiesSource.java b/components/camel-microprofile-config/src/main/java/org/apache/camel/component/microprofile/config/CamelMicroProfilePropertiesSource.java index 158605d..65b0d52 100644 --- a/components/camel-microprofile-config/src/main/java/org/apache/camel/component/microprofile/config/CamelMicroProfilePropertiesSource.java +++ b/components/camel-microprofile-config/src/main/java/org/apache/camel/component/microprofile/config/CamelMicroProfilePropertiesSource.java @@ -19,39 +19,25 @@ package org.apache.camel.component.microprofile.config; import java.util.Optional; import java.util.Properties; -import org.apache.camel.CamelContext; -import org.apache.camel.CamelContextAware; -import org.apache.camel.component.properties.PropertiesComponent; import org.apache.camel.component.properties.PropertiesSource; import org.apache.camel.support.service.ServiceSupport; import org.apache.camel.util.OrderedProperties; import org.eclipse.microprofile.config.Config; import org.eclipse.microprofile.config.ConfigProvider; -import org.eclipse.microprofile.config.spi.ConfigSource; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** - * To use Camel's {@link PropertiesComponent} as an Eclipse {@link ConfigSource}. + * The microprofile-config component is used for bridging the Eclipse MicroProfile Config with Camels + * properties component. This allows to use configuration management from Eclipse MicroProfile with Camel. */ -public class CamelMicroProfilePropertiesSource extends ServiceSupport implements CamelContextAware, PropertiesSource { +public class CamelMicroProfilePropertiesSource extends ServiceSupport implements PropertiesSource { private static final Logger LOG = LoggerFactory.getLogger(CamelMicroProfilePropertiesSource.class); -private CamelContext camelContext; private final Properties properties = new OrderedProperties(); @Override -public CamelContext getCamelContext() { -return camelContext; -} - -@Override -public void setCamelContext(CamelContext camelContext) { -this.camelContext = camelContext; -} - -@Override public String getName() { return "CamelMicroProfilePropertiesSource"; } diff --git a/components/camel-properties/src/main/java/org/apache/camel/component/properties/PropertiesComponent.java b/components/camel-properties/src/main/java/org/apache/camel/component/properties/PropertiesComponent.java index 120fcb6..eeafbfb 100644 --- a/components/camel-properties/src/main/java/org/apache/camel/component/properties/PropertiesComponent.java +++ b/components/camel-properties/src/main/java/org/apache/camel/component/properties/PropertiesComponent.java @@ -35,7 +35,6 @@ import org.apache.camel.api.management.ManagedAttribute; import org.apache.camel.api.management.ManagedOperation; import org.apache.camel.api.management.ManagedResource; import org.apache.camel.spi.FactoryFinder; -import org.apache.camel.spi.HeadersMapFactory; import org.apache.camel.spi.Metadata; import org.apache.camel.spi.annotations.Component; import org.apache.camel.support.DefaultComponent;
[camel] branch CAMEL-13705 deleted (was 2aca333)
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a change to branch CAMEL-13705 in repository https://gitbox.apache.org/repos/asf/camel.git. was 2aca333 CAMEL-13709: Properties component - Optimise to not call loadProperties to frequently The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
[camel] 03/05: Fixed CS
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git commit cfb2f3e3318d56b17dc4baf71133993149ea01a8 Author: Claus Ibsen AuthorDate: Mon Jul 1 11:18:14 2019 +0200 Fixed CS --- .../microprofile/config/CamelMicroProfilePropertiesSource.java| 8 .../config/CamelMicroProfilePropertiesSourceTest.java | 8 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/components/camel-microprofile-config/src/main/java/org/apache/camel/component/microprofile/config/CamelMicroProfilePropertiesSource.java b/components/camel-microprofile-config/src/main/java/org/apache/camel/component/microprofile/config/CamelMicroProfilePropertiesSource.java index 31aed16..158605d 100644 --- a/components/camel-microprofile-config/src/main/java/org/apache/camel/component/microprofile/config/CamelMicroProfilePropertiesSource.java +++ b/components/camel-microprofile-config/src/main/java/org/apache/camel/component/microprofile/config/CamelMicroProfilePropertiesSource.java @@ -1,13 +1,13 @@ -/** +/* * 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 - * + * + * 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. diff --git a/components/camel-microprofile-config/src/test/java/org/apache/camel/component/microprofile/config/CamelMicroProfilePropertiesSourceTest.java b/components/camel-microprofile-config/src/test/java/org/apache/camel/component/microprofile/config/CamelMicroProfilePropertiesSourceTest.java index 3bb0c61..214d4bd 100644 --- a/components/camel-microprofile-config/src/test/java/org/apache/camel/component/microprofile/config/CamelMicroProfilePropertiesSourceTest.java +++ b/components/camel-microprofile-config/src/test/java/org/apache/camel/component/microprofile/config/CamelMicroProfilePropertiesSourceTest.java @@ -1,13 +1,13 @@ -/** +/* * 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 - * + * + * 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.
[camel] branch master updated (8a32b09 -> d74b298)
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/camel.git. from 8a32b09 Upgrade DNSJava and related bundle to version 2.1.9 new 6380fe6 CAMEL-13705: Properties component should work with Eclipse MicroProfile Config new e000d87 CAMEL-13705: Properties component should work with Eclipse MicroProfile Config new cfb2f3e Fixed CS new 56acfb6 Polished new d74b298 CAMEL-13709: Properties component - Optimise to not call loadProperties to frequently The 5 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: components/camel-microprofile-config/pom.xml | 87 ++ .../src/main/docs/microprofile-config.adoc | 19 + .../config/CamelMicroProfilePropertiesSource.java | 71 ++ .../org/apache/camel/properties-source-factory | 18 + .../CamelMicroProfilePropertiesSourceTest.java | 74 ++ .../src/test/resources/log4j2.properties | 28 +++ .../component/properties/PropertiesComponent.java | 71 +- .../component/properties/PropertiesSource.java | 38 ++ .../camel/impl/engine/AbstractCamelContext.java| 2 + .../PropertiesComponentEIPChoiceSimpleTest.java| 9 ++- .../maven/packaging/SpringBootStarterMojo.java | 1 + 11 files changed, 413 insertions(+), 5 deletions(-) create mode 100644 components/camel-microprofile-config/pom.xml create mode 100644 components/camel-microprofile-config/src/main/docs/microprofile-config.adoc create mode 100644 components/camel-microprofile-config/src/main/java/org/apache/camel/component/microprofile/config/CamelMicroProfilePropertiesSource.java create mode 100644 components/camel-microprofile-config/src/main/resources/META-INF/services/org/apache/camel/properties-source-factory create mode 100644 components/camel-microprofile-config/src/test/java/org/apache/camel/component/microprofile/config/CamelMicroProfilePropertiesSourceTest.java create mode 100644 components/camel-microprofile-config/src/test/resources/log4j2.properties create mode 100644 components/camel-properties/src/main/java/org/apache/camel/component/properties/PropertiesSource.java
[camel] 02/05: CAMEL-13705: Properties component should work with Eclipse MicroProfile Config
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git commit e000d87e5a7807b5b8fc96709cc0ddf1118a92dd Author: Claus Ibsen AuthorDate: Mon Jul 1 11:16:41 2019 +0200 CAMEL-13705: Properties component should work with Eclipse MicroProfile Config --- .../java/org/apache/camel/maven/packaging/SpringBootStarterMojo.java | 1 + 1 file changed, 1 insertion(+) diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/SpringBootStarterMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/SpringBootStarterMojo.java index 2a5b36b..d4eac410 100644 --- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/SpringBootStarterMojo.java +++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/SpringBootStarterMojo.java @@ -76,6 +76,7 @@ public class SpringBootStarterMojo extends AbstractMojo { private static final String[] IGNORE_MODULES = { /* OSGi -> */ "camel-blueprint", "camel-core-osgi", "camel-eventadmin", "camel-paxlogging", /* Java EE -> */ "camel-cdi", "camel-ejb", +/* Microprofile -> */ "camel-microprofile-config", /* deprecated (and not working perfectly) -> */ "camel-swagger", "camel-mina", "camel-ibatis", /* currently incompatible */ "camel-spark-rest", /* others (not managed) -> */ "camel-core-xml"};
[camel] 01/05: CAMEL-13705: Properties component should work with Eclipse MicroProfile Config
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git commit 6380fe68d874b894d0eaf2e8b99cbc0382f5f85e Author: Claus Ibsen AuthorDate: Mon Jul 1 11:13:20 2019 +0200 CAMEL-13705: Properties component should work with Eclipse MicroProfile Config --- components/camel-microprofile-config/pom.xml | 87 ++ .../src/main/docs/microprofile-config.adoc | 19 + .../config/CamelMicroProfilePropertiesSource.java | 85 + .../org/apache/camel/properties-source-factory | 18 + .../CamelMicroProfilePropertiesSourceTest.java | 74 ++ .../src/test/resources/log4j2.properties | 28 +++ .../component/properties/PropertiesComponent.java | 61 +++ .../component/properties/PropertiesSource.java | 38 ++ .../camel/impl/engine/AbstractCamelContext.java| 2 + 9 files changed, 412 insertions(+) diff --git a/components/camel-microprofile-config/pom.xml b/components/camel-microprofile-config/pom.xml new file mode 100644 index 000..0f64b79 --- /dev/null +++ b/components/camel-microprofile-config/pom.xml @@ -0,0 +1,87 @@ + + +http://www.w3.org/2001/XMLSchema-instance"; xmlns="http://maven.apache.org/POM/4.0.0"; + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd";> +4.0.0 + + +org.apache.camel +components +3.0.0-SNAPSHOT + + +camel-microprofile-config +jar + +Camel :: MicroProfile Config +Camel Eclipse MicroProfile Config + + + + + +org.apache.camel +camel-properties +${project.version} + + + +org.eclipse.microprofile.config +microprofile-config-api +1.3 + + + + +org.apache.camel +camel-test +test + + + +io.smallrye +smallrye-config-1.3 +1.0.0 +test + + + +junit +junit +test + + +org.apache.logging.log4j +log4j-api +test + + +org.apache.logging.log4j +log4j-core +test + + +org.apache.logging.log4j +log4j-slf4j-impl +test + + + + diff --git a/components/camel-microprofile-config/src/main/docs/microprofile-config.adoc b/components/camel-microprofile-config/src/main/docs/microprofile-config.adoc new file mode 100644 index 000..ae43410 --- /dev/null +++ b/components/camel-microprofile-config/src/main/docs/microprofile-config.adoc @@ -0,0 +1,19 @@ +[[MicroProfileConfig-MicroProfileConfigComponent]] +=== MicroProfile Config Component + +*Available as of Camel 3.0* + +The microprofile-config component is used for bridging the Eclipse MicroProfile Config with Camels +properties component. This allows to use configuration management from Eclipse MicroProfile with Camel. + +To enable this just add this component to the classpath and Camel should auto-detect this when starting up. + +=== Register manually + +You can also register the microprofile-config component manually with Apache Camel properties component as shown below: + +[source,java] + +PropertiesComponent pc = (PropertiesComponent) camelContext.getPropertiesComponent(); +pc.addPropertiesSource(new CamelMicroProfilePropertiesSource()); + diff --git a/components/camel-microprofile-config/src/main/java/org/apache/camel/component/microprofile/config/CamelMicroProfilePropertiesSource.java b/components/camel-microprofile-config/src/main/java/org/apache/camel/component/microprofile/config/CamelMicroProfilePropertiesSource.java new file mode 100644 index 000..31aed16 --- /dev/null +++ b/components/camel-microprofile-config/src/main/java/org/apache/camel/component/microprofile/config/CamelMicroProfilePropertiesSource.java @@ -0,0 +1,85 @@ +/** + * 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.
[camel] 05/05: CAMEL-13709: Properties component - Optimise to not call loadProperties to frequently
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git commit d74b298e0a092ac9cdd8a8ef17731fe06b53369b Author: Claus Ibsen AuthorDate: Mon Jul 1 12:49:46 2019 +0200 CAMEL-13709: Properties component - Optimise to not call loadProperties to frequently --- .../camel/component/properties/PropertiesComponent.java | 13 +++-- .../properties/PropertiesComponentEIPChoiceSimpleTest.java | 9 + 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/components/camel-properties/src/main/java/org/apache/camel/component/properties/PropertiesComponent.java b/components/camel-properties/src/main/java/org/apache/camel/component/properties/PropertiesComponent.java index eeafbfb..ab39061 100644 --- a/components/camel-properties/src/main/java/org/apache/camel/component/properties/PropertiesComponent.java +++ b/components/camel-properties/src/main/java/org/apache/camel/component/properties/PropertiesComponent.java @@ -101,6 +101,7 @@ public class PropertiesComponent extends DefaultComponent implements org.apache. @SuppressWarnings("unchecked") private final Map cacheMap = LRUCacheFactory.newLRUSoftCache(1000); +private transient Properties cachedProperties; private final Map functions = new LinkedHashMap<>(); private PropertiesResolver propertiesResolver = new DefaultPropertiesResolver(this); private PropertiesParser propertiesParser = new DefaultPropertiesParser(this); @@ -184,7 +185,11 @@ public class PropertiesComponent extends DefaultComponent implements org.apache. } public String parseUri(String uri) { -return parseUri(uri, locations); +// optimise to only load properties once as we use the configured locations +if (cachedProperties == null) { +cachedProperties = doLoadProperties(locations); +} +return parseUri(uri, cachedProperties); } public String parseUri(String uri, String... locations) { @@ -254,7 +259,10 @@ public class PropertiesComponent extends DefaultComponent implements org.apache. protected String parseUri(String uri, List paths) { Properties prop = doLoadProperties(paths); +return parseUri(uri, prop); +} +protected String parseUri(String uri, Properties prop) { // enclose tokens if missing if (!uri.contains(prefixToken) && !uri.startsWith(prefixToken)) { uri = prefixToken + uri; @@ -660,8 +668,9 @@ public class PropertiesComponent extends DefaultComponent implements org.apache. @Override protected void doStop() throws Exception { cacheMap.clear(); -super.doStop(); +cachedProperties = null; ServiceHelper.stopAndShutdownService(sources); +super.doStop(); } private List parseLocations(List locations) { diff --git a/core/camel-core/src/test/java/org/apache/camel/component/properties/PropertiesComponentEIPChoiceSimpleTest.java b/core/camel-core/src/test/java/org/apache/camel/component/properties/PropertiesComponentEIPChoiceSimpleTest.java index 04dedcf..9e82f21 100644 --- a/core/camel-core/src/test/java/org/apache/camel/component/properties/PropertiesComponentEIPChoiceSimpleTest.java +++ b/core/camel-core/src/test/java/org/apache/camel/component/properties/PropertiesComponentEIPChoiceSimpleTest.java @@ -25,11 +25,12 @@ public class PropertiesComponentEIPChoiceSimpleTest extends ContextTestSupport { @Test public void testChoice() throws Exception { -getMockEndpoint("mock:camel").expectedBodiesReceived("Hello Camel"); -getMockEndpoint("mock:other").expectedBodiesReceived("Hello World"); +getMockEndpoint("mock:camel").expectedBodiesReceived("Hello Camel", "Hi Camel"); +getMockEndpoint("mock:other").expectedBodiesReceived("Bye World"); -template.sendBody("direct:start", "Hello Camel"); -template.sendBody("direct:start", "Hello World"); +template.sendBody("direct:start", context.resolvePropertyPlaceholders("Hello {{cool.name}}")); +template.sendBody("direct:start", context.resolvePropertyPlaceholders("Hi {{cool.name}}")); +template.sendBody("direct:start", "Bye World"); assertMockEndpointsSatisfied(); }
[camel] branch master updated: CAMEL-13705: Properties component should work with Eclipse MicroProfile Config
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git The following commit(s) were added to refs/heads/master by this push: new 512248b CAMEL-13705: Properties component should work with Eclipse MicroProfile Config 512248b is described below commit 512248b0319970270d42ffe9fc241bfa8c325e3c Author: Claus Ibsen AuthorDate: Mon Jul 1 13:01:44 2019 +0200 CAMEL-13705: Properties component should work with Eclipse MicroProfile Config --- apache-camel/pom.xml | 5 + apache-camel/src/main/descriptors/common-bin.xml | 1 + components/camel-jdbc/pom.xml| 2 ++ components/camel-microprofile-config/pom.xml | 7 ++- components/readme.adoc | 4 +++- parent/pom.xml | 5 + 6 files changed, 22 insertions(+), 2 deletions(-) diff --git a/apache-camel/pom.xml b/apache-camel/pom.xml index e7a2b8a..5068a1b 100644 --- a/apache-camel/pom.xml +++ b/apache-camel/pom.xml @@ -974,6 +974,11 @@ org.apache.camel + camel-microprofile-config + ${project.version} + + + org.apache.camel camel-milo ${project.version} diff --git a/apache-camel/src/main/descriptors/common-bin.xml b/apache-camel/src/main/descriptors/common-bin.xml index ab2de78..8a83636 100644 --- a/apache-camel/src/main/descriptors/common-bin.xml +++ b/apache-camel/src/main/descriptors/common-bin.xml @@ -215,6 +215,7 @@ org.apache.camel:camel-master org.apache.camel:camel-metrics org.apache.camel:camel-micrometer +org.apache.camel:camel-microprofile-config org.apache.camel:camel-milo org.apache.camel:camel-mina2 org.apache.camel:camel-mllp diff --git a/components/camel-jdbc/pom.xml b/components/camel-jdbc/pom.xml index c0a5c51..62dc0cd 100644 --- a/components/camel-jdbc/pom.xml +++ b/components/camel-jdbc/pom.xml @@ -34,6 +34,8 @@ Camel JDBC support +1.2.0 +database diff --git a/components/camel-microprofile-config/pom.xml b/components/camel-microprofile-config/pom.xml index 0f64b79..f939abc 100644 --- a/components/camel-microprofile-config/pom.xml +++ b/components/camel-microprofile-config/pom.xml @@ -31,7 +31,12 @@ jar Camel :: MicroProfile Config -Camel Eclipse MicroProfile Config +Bridging Eclipse MicroProfile Config with Camel properties + + +3.0.0 +microservice + diff --git a/components/readme.adoc b/components/readme.adoc index 8ac82b7..7750e56 100644 --- a/components/readme.adoc +++ b/components/readme.adoc @@ -1050,7 +1050,7 @@ Number of Languages: 17 in 11 JAR artifacts (0 deprecated) Miscellaneous Components // others: START -Number of Miscellaneous Components: 31 in 31 JAR artifacts (0 deprecated) +Number of Miscellaneous Components: 32 in 32 JAR artifacts (0 deprecated) [width="100%",cols="4,1,5",options="header"] |=== @@ -1072,6 +1072,8 @@ Number of Miscellaneous Components: 31 in 31 JAR artifacts (0 deprecated) | link:camel-lra/src/main/docs/lra.adoc[Lra] (camel-lra) | 2.21 | Camel saga binding for Long-Running-Action framework +| link:camel-microprofile-config/src/main/docs/microprofile-config.adoc[Microprofile Config] (camel-microprofile-config) | 3.0 | Bridging Eclipse MicroProfile Config with Camel properties + | link:camel-opentracing/src/main/docs/opentracing.adoc[OpenTracing] (camel-opentracing) | 2.19 | Distributed tracing using OpenTracing | link:camel-reactive-executor-vertx/src/main/docs/reactive-executor-vertx.adoc[Reactive Executor Vertx] (camel-reactive-executor-vertx) | 3.0 | Reactive Executor for camel-core using Vert X diff --git a/parent/pom.xml b/parent/pom.xml index 88e8b53..6eec96b 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -1753,6 +1753,11 @@ org.apache.camel +camel-microprofile-config +${project.version} + + +org.apache.camel camel-milo ${project.version}
[camel-k] branch master updated: chore: extract indentedwriter to it's own package and make it an utility
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.git The following commit(s) were added to refs/heads/master by this push: new 8dfe1f5 chore: extract indentedwriter to it's own package and make it an utility 8dfe1f5 is described below commit 8dfe1f5ca7e1d818d66f330a6fbbb1887e756fe8 Author: lburgazzoli AuthorDate: Mon Jul 1 13:16:31 2019 +0200 chore: extract indentedwriter to it's own package and make it an utility --- pkg/cmd/describe.go | 72 +-- pkg/cmd/describe_integration.go | 46 + pkg/cmd/describe_kit.go | 30 pkg/cmd/describe_platform.go | 22 ++-- pkg/util/indentedwriter/writer.go | 70 + 5 files changed, 138 insertions(+), 102 deletions(-) diff --git a/pkg/cmd/describe.go b/pkg/cmd/describe.go index b726138..aa0ae52 100644 --- a/pkg/cmd/describe.go +++ b/pkg/cmd/describe.go @@ -18,92 +18,52 @@ limitations under the License. package cmd import ( - "bytes" - "fmt" - "io" "strings" - "text/tabwriter" "time" + "github.com/apache/camel-k/pkg/util/indentedwriter" + "github.com/apache/camel-k/pkg/apis/camel/v1alpha1" "github.com/spf13/cobra" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) -type flusher interface { - flush() -} - -type indentedWriter struct { - out io.Writer -} - -func newIndentedWriter(out io.Writer) *indentedWriter { - return &indentedWriter{out: out} -} - -func (iw *indentedWriter) write(indentLevel int, format string, i ...interface{}) { - indent := " " - prefix := "" - for i := 0; i < indentLevel; i++ { - prefix += indent - } - fmt.Fprintf(iw.out, prefix+format, i...) -} - -func (iw *indentedWriter) Flush() { - if f, ok := iw.out.(flusher); ok { - f.flush() - } -} - -func describeObjectMeta(w *indentedWriter, om metav1.ObjectMeta) { - w.write(0, "Name:\t%s\n", om.Name) - w.write(0, "Namespace:\t%s\n", om.Namespace) +func describeObjectMeta(w *indentedwriter.Writer, om metav1.ObjectMeta) { + w.Write(0, "Name:\t%s\n", om.Name) + w.Write(0, "Namespace:\t%s\n", om.Namespace) if len(om.GetLabels()) > 0 { - w.write(0, "Labels:") + w.Write(0, "Labels:") for k, v := range om.Labels { - w.write(0, "\t%s=%s\n", k, strings.TrimSpace(v)) + w.Write(0, "\t%s=%s\n", k, strings.TrimSpace(v)) } } if len(om.GetAnnotations()) > 0 { - w.write(0, "Annotations:") + w.Write(0, "Annotations:") for k, v := range om.Annotations { - w.write(0, "\t%s=%s\n", k, strings.TrimSpace(v)) + w.Write(0, "\t%s=%s\n", k, strings.TrimSpace(v)) } } - w.write(0, "Creation Timestamp:\t%s\n", om.CreationTimestamp.Format(time.RFC1123Z)) + w.Write(0, "Creation Timestamp:\t%s\n", om.CreationTimestamp.Format(time.RFC1123Z)) } -func describeTraits(w *indentedWriter, traits map[string]v1alpha1.TraitSpec) { +func describeTraits(w *indentedwriter.Writer, traits map[string]v1alpha1.TraitSpec) { if len(traits) > 0 { - w.write(0, "Traits:\n") + w.Write(0, "Traits:\n") for trait := range traits { - w.write(1, "%s:\n", strings.Title(trait)) - w.write(2, "Configuration:\n") + w.Write(1, "%s:\n", strings.Title(trait)) + w.Write(2, "Configuration:\n") for k, v := range traits[trait].Configuration { - w.write(3, "%s:\t%s\n", strings.Title(k), v) + w.Write(3, "%s:\t%s\n", strings.Title(k), v) } } } } -func indentedString(f func(io.Writer)) string { - out := new(tabwriter.Writer) - buf := &bytes.Buffer{} - out.Init(buf, 0, 8, 2, ' ', 0) - - f(out) - - out.Flush() - - return buf.String() -} - func newCmdDescribe(rootCmdOptions *RootCmdOptions) *cobra.Command { cmd := cobra.Command{ Use: "describe", diff --git a/pkg/cmd/describe_integration.go b/pkg/cmd/describe_integration.go index 393a6f7..15bc77c 100644 --- a/pkg/cmd/describe_integration.go +++ b/pkg/cmd/describe_integration.go @@ -22,6 +22,8 @@ import ( "io" "strings" + "github.com/apache/camel-k/pkg/util/indentedwriter" + "github.com/apache/camel-k/pkg/apis/camel/v1alpha1" "github.com/spf13/cobra" k8sclient "sigs.k8s.io/controller-runtime/pkg/client" @@ -85,54 +87,54 @@ func
[camel] branch master updated: Upgrade AWS SDK and related bundle to version 1.11.573
This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git The following commit(s) were added to refs/heads/master by this push: new 0487346 Upgrade AWS SDK and related bundle to version 1.11.573 0487346 is described below commit 048734602d2678abddbc7c0595870b98ed6eb977 Author: Andrea Cosentino AuthorDate: Mon Jul 1 14:31:19 2019 +0200 Upgrade AWS SDK and related bundle to version 1.11.573 --- parent/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parent/pom.xml b/parent/pom.xml index 6eec96b..3691242 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -88,8 +88,8 @@ 1.8.2_1 1.8.2_1 3.1.6 -1.11.559_1 -1.11.559 +1.11.573_1 +1.11.573 1.11.22 2.2.1 1.2.14
[camel] branch master updated: Upgrade Pulsar and related bundle to version 2.3.2
This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git The following commit(s) were added to refs/heads/master by this push: new f2723f2 Upgrade Pulsar and related bundle to version 2.3.2 f2723f2 is described below commit f2723f28822cde490b20ff4e4ee6f210a68823b2 Author: Andrea Cosentino AuthorDate: Mon Jul 1 14:47:57 2019 +0200 Upgrade Pulsar and related bundle to version 2.3.2 --- parent/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parent/pom.xml b/parent/pom.xml index 3691242..3143090 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -568,8 +568,8 @@ 0.6.1 1.8 4.25.0 -2.3.1 -2.3.1_1 +2.3.2 +2.3.2_1 7.1.3 0.33.1 0.43.0
[camel] branch master updated: Upgrade Libphonenumber and related bundle to version 8.10.13
This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git The following commit(s) were added to refs/heads/master by this push: new c26e65f Upgrade Libphonenumber and related bundle to version 8.10.13 c26e65f is described below commit c26e65faf5b935558cbca0d77e954c8a81a92dc1 Author: Andrea Cosentino AuthorDate: Mon Jul 1 15:04:41 2019 +0200 Upgrade Libphonenumber and related bundle to version 8.10.13 --- parent/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parent/pom.xml b/parent/pom.xml index 3143090..b175c28 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -448,8 +448,8 @@ 0.10 0.10 21.0 -8.10.12 - 8.10.12_1 +8.10.13 + 8.10.13_1 1.0.0 5.1.0.RELEASE
[camel] branch master updated: Use Apache Pulsar 2.3.2 docker image for tests
This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git The following commit(s) were added to refs/heads/master by this push: new 6798ab9 Use Apache Pulsar 2.3.2 docker image for tests 6798ab9 is described below commit 6798ab93db77b905083bedb3a7635572f63a7742 Author: Andrea Cosentino AuthorDate: Mon Jul 1 15:31:58 2019 +0200 Use Apache Pulsar 2.3.2 docker image for tests --- .../test/java/org/apache/camel/component/pulsar/PulsarTestSupport.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/camel-pulsar/src/test/java/org/apache/camel/component/pulsar/PulsarTestSupport.java b/components/camel-pulsar/src/test/java/org/apache/camel/component/pulsar/PulsarTestSupport.java index 25f1516..21dabed 100644 --- a/components/camel-pulsar/src/test/java/org/apache/camel/component/pulsar/PulsarTestSupport.java +++ b/components/camel-pulsar/src/test/java/org/apache/camel/component/pulsar/PulsarTestSupport.java @@ -22,7 +22,7 @@ import org.testcontainers.containers.GenericContainer; public class PulsarTestSupport extends ContainerAwareTestSupport { -public static final String CONTAINER_IMAGE = "apachepulsar/pulsar:2.3.1"; +public static final String CONTAINER_IMAGE = "apachepulsar/pulsar:2.3.2"; public static final String CONTAINER_NAME = "pulsar"; public static final int BROKER_PORT = 6650; public static final int BROKER_HTTP_PORT = 8080;
[camel] branch master updated: Upgrade Kafka and related bundle to version 2.2.1
This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git The following commit(s) were added to refs/heads/master by this push: new 88e5f4f Upgrade Kafka and related bundle to version 2.2.1 88e5f4f is described below commit 88e5f4f53fb7c9906c8c9565b9fb62f85f9512ad Author: Andrea Cosentino AuthorDate: Mon Jul 1 16:06:39 2019 +0200 Upgrade Kafka and related bundle to version 2.2.1 --- parent/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parent/pom.xml b/parent/pom.xml index b175c28..110ff63 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -436,8 +436,8 @@ 2.5.3 1.1.3 1.1.3_2 -2.2.0 -2.2.0_1 +2.2.1 +2.2.1_1 4.2.6 7.22.0.Final
[camel] branch master updated: remove camel-example-cdi-osgi
This is an automated email from the ASF dual-hosted git repository. bvahdat pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git The following commit(s) were added to refs/heads/master by this push: new a5a536b remove camel-example-cdi-osgi a5a536b is described below commit a5a536bdcea6a020e50ab8e357a4b8880c2a24c7 Author: Babak Vahdat AuthorDate: Mon Jul 1 16:46:07 2019 +0200 remove camel-example-cdi-osgi --- examples/camel-example-cdi-osgi/README.md | 200 -- examples/camel-example-cdi-osgi/pom.xml| 304 - .../org/apache/camel/example/cdi/osgi/Config.java | 35 --- .../apache/camel/example/cdi/osgi/Consumer.java| 31 --- .../org/apache/camel/example/cdi/osgi/Jms.java | 41 --- .../apache/camel/example/cdi/osgi/Producer.java| 30 -- .../src/main/resources/META-INF/LICENSE.txt| 203 -- .../src/main/resources/META-INF/NOTICE.txt | 11 - .../src/main/resources/META-INF/beans.xml | 20 -- .../src/main/resources/jms.properties | 18 -- .../src/main/resources/log4j2.properties | 23 -- .../apache/camel/example/cdi/osgi/CdiOsgiIT.java | 104 --- .../camel/example/cdi/osgi/PaxExamOptions.java | 116 13 files changed, 1136 deletions(-) diff --git a/examples/camel-example-cdi-osgi/README.md b/examples/camel-example-cdi-osgi/README.md deleted file mode 100644 index 2d23df6..000 --- a/examples/camel-example-cdi-osgi/README.md +++ /dev/null @@ -1,200 +0,0 @@ -# OSGi Example - CDI - -### Introduction - -This example illustrates a CDI application that can be executed inside an OSGi container -using PAX CDI. This application can run unchanged as well in Java SE inside a standalone -CDI container. - -The example starts an ActiveMQ in-memory broker and publishes a message when the Camel -context has started. - -The example is implemented in Java with CDI dependency injection. It uses JBoss Weld -as the minimal CDI container to run the application, though you can run the application -in any CDI compliant container. In OSGi, PAX CDI is used to managed the lifecycle of -the CDI container. - -The `camel-core` and `camel-sjms` components are used in this example. - -### Build - -You will need to build this example first: - -```sh -$ mvn install -``` - -### Run - - Java SE - -You can run this example using: - -```sh -$ mvn camel:run -``` - -When the Camel application starts, you should see the following message being logged to the console, e.g.: - -``` -2019-06-30 22:31:28,826 [cdi.Main.main()] INFO Version - WELD-000900: 3.0.5 (Final) -2019-06-30 22:31:29,152 [cdi.Main.main()] INFO Bootstrap - WELD-000101: Transactional services not available. Injection of @Inject UserTransaction not available. Transactional observers will be invoked synchronously. -2019-06-30 22:31:29,337 [cdi.Main.main()] INFO Event - WELD-000411: Observer method [BackedAnnotatedMethod] private org.apache.camel.cdi.CdiCamelExtension.processAnnotatedType(@Observes ProcessAnnotatedType) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds. -2019-06-30 22:31:30,010 [cdi.Main.main()] INFO CdiCamelExtension - Camel CDI is starting Camel context [osgi-example] -2019-06-30 22:31:30,016 [cdi.Main.main()] INFO DefaultCamelContext - Apache Camel 3.0.0 (CamelContext: osgi-example) is starting -2019-06-30 22:31:30,016 [cdi.Main.main()] INFO DefaultCamelContext - Tracing is enabled on CamelContext: osgi-example -2019-06-30 22:31:30,017 [cdi.Main.main()] INFO DefaultManagementStrategy - JMX is disabled -2019-06-30 22:31:30,367 [cdi.Main.main()] INFO DefaultCamelContext - StreamCaching is not in use. If using streams then its recommended to enable stream caching. See more details at http://camel.apache.org/stream-caching.html -2019-06-30 22:31:30,434 [cdi.Main.main()] INFO BrokerService - Using Persistence Adapter: MemoryPersistenceAdapter -2019-06-30 22:31:30,594 [cdi.Main.main()] INFO BrokerService - Apache ActiveMQ 5.15.9 (broker, ID:Babaks-iMac-50846-1561926690454-0:1) is starting -2019-06-30 22:31:30,599 [cdi.Main.main()] INFO BrokerService - Apache ActiveMQ 5.15.9 (broker, ID:Babaks-iMac-50846-1561926690454-0:1) started -2019-06-30 22:31:30,599 [cdi.Main.main()] INFO BrokerService - For help or more information please see: http://activemq.apache.org -2019-06-30 22:31:30,626 [cdi.Main.main()] INFO TransportConnector - Connector vm://broker started -2019-06-30 22:31:30,711 [cdi.Main.main()] INFO DefaultCamelContext - Route: consumer-route started and consuming from: sjms://sample.queue -2019-06-30 22:31:30,713 [cdi.Main.main()] INFO Defa
[camel] branch master updated: Regen
This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git The following commit(s) were added to refs/heads/master by this push: new 50e337d Regen 50e337d is described below commit 50e337d2cfaf2ee73487bc78a7bbe9bcb6e9519c Author: Andrea Cosentino AuthorDate: Mon Jul 1 17:44:43 2019 +0200 Regen --- bom/camel-bom/pom.xml | 5 + components/readme.adoc| 4 +--- docs/components/modules/ROOT/nav.adoc | 1 + .../modules/ROOT/pages/microprofile-config.adoc | 19 +++ .../camel-spring-boot-dependencies/pom.xml| 9 +++-- 5 files changed, 33 insertions(+), 5 deletions(-) diff --git a/bom/camel-bom/pom.xml b/bom/camel-bom/pom.xml index 333da82..26112b3 100644 --- a/bom/camel-bom/pom.xml +++ b/bom/camel-bom/pom.xml @@ -1850,6 +1850,11 @@ org.apache.camel +camel-microprofile-config +${project.version} + + +org.apache.camel camel-milo ${project.version} diff --git a/components/readme.adoc b/components/readme.adoc index 7750e56..8ac82b7 100644 --- a/components/readme.adoc +++ b/components/readme.adoc @@ -1050,7 +1050,7 @@ Number of Languages: 17 in 11 JAR artifacts (0 deprecated) Miscellaneous Components // others: START -Number of Miscellaneous Components: 32 in 32 JAR artifacts (0 deprecated) +Number of Miscellaneous Components: 31 in 31 JAR artifacts (0 deprecated) [width="100%",cols="4,1,5",options="header"] |=== @@ -1072,8 +1072,6 @@ Number of Miscellaneous Components: 32 in 32 JAR artifacts (0 deprecated) | link:camel-lra/src/main/docs/lra.adoc[Lra] (camel-lra) | 2.21 | Camel saga binding for Long-Running-Action framework -| link:camel-microprofile-config/src/main/docs/microprofile-config.adoc[Microprofile Config] (camel-microprofile-config) | 3.0 | Bridging Eclipse MicroProfile Config with Camel properties - | link:camel-opentracing/src/main/docs/opentracing.adoc[OpenTracing] (camel-opentracing) | 2.19 | Distributed tracing using OpenTracing | link:camel-reactive-executor-vertx/src/main/docs/reactive-executor-vertx.adoc[Reactive Executor Vertx] (camel-reactive-executor-vertx) | 3.0 | Reactive Executor for camel-core using Vert X diff --git a/docs/components/modules/ROOT/nav.adoc b/docs/components/modules/ROOT/nav.adoc index 01f9fba..dc62951 100644 --- a/docs/components/modules/ROOT/nav.adoc +++ b/docs/components/modules/ROOT/nav.adoc @@ -224,6 +224,7 @@ * xref:master-component.adoc[Master Component] * xref:metrics-component.adoc[Metrics Component] * xref:micrometer-component.adoc[Micrometer Component] +* xref:microprofile-config.adoc[MicroProfile Config Component] * xref:milo-client-component.adoc[OPC UA Client Component] * xref:milo-server-component.adoc[OPC UA Server Component] * xref:mina2-component.adoc[Mina2 Component] diff --git a/docs/components/modules/ROOT/pages/microprofile-config.adoc b/docs/components/modules/ROOT/pages/microprofile-config.adoc new file mode 100644 index 000..ae43410 --- /dev/null +++ b/docs/components/modules/ROOT/pages/microprofile-config.adoc @@ -0,0 +1,19 @@ +[[MicroProfileConfig-MicroProfileConfigComponent]] +=== MicroProfile Config Component + +*Available as of Camel 3.0* + +The microprofile-config component is used for bridging the Eclipse MicroProfile Config with Camels +properties component. This allows to use configuration management from Eclipse MicroProfile with Camel. + +To enable this just add this component to the classpath and Camel should auto-detect this when starting up. + +=== Register manually + +You can also register the microprofile-config component manually with Apache Camel properties component as shown below: + +[source,java] + +PropertiesComponent pc = (PropertiesComponent) camelContext.getPropertiesComponent(); +pc.addPropertiesSource(new CamelMicroProfilePropertiesSource()); + diff --git a/platforms/spring-boot/spring-boot-dm/camel-spring-boot-dependencies/pom.xml b/platforms/spring-boot/spring-boot-dm/camel-spring-boot-dependencies/pom.xml index b0ed0d7..6978579 100644 --- a/platforms/spring-boot/spring-boot-dm/camel-spring-boot-dependencies/pom.xml +++ b/platforms/spring-boot/spring-boot-dm/camel-spring-boot-dependencies/pom.xml @@ -2070,6 +2070,11 @@ org.apache.camel +camel-microprofile-config +${project.version} + + +org.apache.camel camel-milo ${project.version} @@ -3611,12 +3616,12 @@ org.apache.pulsar pulsar-client -2.3.1 +2.3.2 org.apache.pulsar pulsar-client-admin -2.3.1 +2.3.2 org.apache.ws.commons.axiom
[camel] branch camel-2.x updated: CAMEL-13687: NotifyBuilder - Add fromCurrentRoute functionality
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch camel-2.x in repository https://gitbox.apache.org/repos/asf/camel.git The following commit(s) were added to refs/heads/camel-2.x by this push: new 4ce2007 CAMEL-13687: NotifyBuilder - Add fromCurrentRoute functionality 4ce2007 is described below commit 4ce20076a063e52086b93e53773925bb61857391 Author: Claus Ibsen AuthorDate: Mon Jul 1 18:01:22 2019 +0200 CAMEL-13687: NotifyBuilder - Add fromCurrentRoute functionality --- .../org/apache/camel/builder/NotifyBuilder.java| 44 ++ .../camel/builder/NotifyBuilderFromRouteTest.java | 16 2 files changed, 60 insertions(+) diff --git a/camel-core/src/main/java/org/apache/camel/builder/NotifyBuilder.java b/camel-core/src/main/java/org/apache/camel/builder/NotifyBuilder.java index 275bd25..7f210ee 100644 --- a/camel-core/src/main/java/org/apache/camel/builder/NotifyBuilder.java +++ b/camel-core/src/main/java/org/apache/camel/builder/NotifyBuilder.java @@ -39,6 +39,8 @@ import org.apache.camel.management.event.ExchangeCompletedEvent; import org.apache.camel.management.event.ExchangeCreatedEvent; import org.apache.camel.management.event.ExchangeFailedEvent; import org.apache.camel.management.event.ExchangeSentEvent; +import org.apache.camel.spi.RouteContext; +import org.apache.camel.spi.UnitOfWork; import org.apache.camel.support.EventNotifierSupport; import org.apache.camel.util.EndpointHelper; import org.apache.camel.util.ObjectHelper; @@ -176,6 +178,48 @@ public class NotifyBuilder { return this; } +/** + * Optionally a from current route which means that this expression should only be based + * on {@link Exchange} which is the current route(s). + * + * @param routeId id of route or pattern (see the EndpointHelper javadoc) + * @return the builder + * @see EndpointHelper#matchEndpoint(org.apache.camel.CamelContext, String, String) + */ +public NotifyBuilder fromCurrentRoute(final String routeId) { +stack.add(new EventPredicateSupport() { + +@Override +public boolean isAbstract() { +// is abstract as its a filter +return true; +} + +@Override +public boolean onExchangeSent(Exchange exchange, Endpoint endpoint, long timeTaken) { +UnitOfWork uow = exchange.getUnitOfWork(); +RouteContext rc = uow != null ? uow.getRouteContext() : null; +if (rc != null) { +String id = rc.getRoute().getId(); +return EndpointHelper.matchPattern(id, routeId); +} else { +return false; +} +} + +public boolean matches() { +// should be true as we use the onExchange to filter +return true; +} + +@Override +public String toString() { +return "fromCurrentRoute(" + routeId + ")"; +} +}); +return this; +} + private NotifyBuilder fromRoutesOnly() { // internal and should always be in top of stack stack.add(0, new EventPredicateSupport() { diff --git a/camel-core/src/test/java/org/apache/camel/builder/NotifyBuilderFromRouteTest.java b/camel-core/src/test/java/org/apache/camel/builder/NotifyBuilderFromRouteTest.java index b945b0c..c2a4f33 100644 --- a/camel-core/src/test/java/org/apache/camel/builder/NotifyBuilderFromRouteTest.java +++ b/camel-core/src/test/java/org/apache/camel/builder/NotifyBuilderFromRouteTest.java @@ -45,6 +45,17 @@ public class NotifyBuilderFromRouteTest extends ContextTestSupport { assertTrue(builder.matchesMockWaitTime()); } +@Test +public void testDoneFromCurrentRoute() throws Exception { +// notify when exchange is done +NotifyBuilder builder = +new NotifyBuilder(context).fromCurrentRoute("bar").whenDone(1); +builder.create(); + +template.sendBody("seda:foo", "Hello world!"); + +assertTrue(builder.matchesMockWaitTime()); +} @Override protected JndiRegistry createRegistry() throws Exception { @@ -60,7 +71,12 @@ public class NotifyBuilderFromRouteTest extends ContextTestSupport { public void configure() throws Exception { from("proxy:seda:foo") .routeId("foo") +.to("direct:bar") .to("mock:foo"); + +from("direct:bar") +.routeId("bar") +.to("mock:bar"); } }; }
[camel] branch camel-2.24.x updated: CAMEL-13687: NotifyBuilder - Add fromCurrentRoute functionality
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch camel-2.24.x in repository https://gitbox.apache.org/repos/asf/camel.git The following commit(s) were added to refs/heads/camel-2.24.x by this push: new 8edbf36 CAMEL-13687: NotifyBuilder - Add fromCurrentRoute functionality 8edbf36 is described below commit 8edbf361d8baf0dd4c0da6693478b447427015f5 Author: Claus Ibsen AuthorDate: Mon Jul 1 18:01:22 2019 +0200 CAMEL-13687: NotifyBuilder - Add fromCurrentRoute functionality --- .../org/apache/camel/builder/NotifyBuilder.java| 44 ++ .../camel/builder/NotifyBuilderFromRouteTest.java | 16 2 files changed, 60 insertions(+) diff --git a/camel-core/src/main/java/org/apache/camel/builder/NotifyBuilder.java b/camel-core/src/main/java/org/apache/camel/builder/NotifyBuilder.java index 275bd25..7f210ee 100644 --- a/camel-core/src/main/java/org/apache/camel/builder/NotifyBuilder.java +++ b/camel-core/src/main/java/org/apache/camel/builder/NotifyBuilder.java @@ -39,6 +39,8 @@ import org.apache.camel.management.event.ExchangeCompletedEvent; import org.apache.camel.management.event.ExchangeCreatedEvent; import org.apache.camel.management.event.ExchangeFailedEvent; import org.apache.camel.management.event.ExchangeSentEvent; +import org.apache.camel.spi.RouteContext; +import org.apache.camel.spi.UnitOfWork; import org.apache.camel.support.EventNotifierSupport; import org.apache.camel.util.EndpointHelper; import org.apache.camel.util.ObjectHelper; @@ -176,6 +178,48 @@ public class NotifyBuilder { return this; } +/** + * Optionally a from current route which means that this expression should only be based + * on {@link Exchange} which is the current route(s). + * + * @param routeId id of route or pattern (see the EndpointHelper javadoc) + * @return the builder + * @see EndpointHelper#matchEndpoint(org.apache.camel.CamelContext, String, String) + */ +public NotifyBuilder fromCurrentRoute(final String routeId) { +stack.add(new EventPredicateSupport() { + +@Override +public boolean isAbstract() { +// is abstract as its a filter +return true; +} + +@Override +public boolean onExchangeSent(Exchange exchange, Endpoint endpoint, long timeTaken) { +UnitOfWork uow = exchange.getUnitOfWork(); +RouteContext rc = uow != null ? uow.getRouteContext() : null; +if (rc != null) { +String id = rc.getRoute().getId(); +return EndpointHelper.matchPattern(id, routeId); +} else { +return false; +} +} + +public boolean matches() { +// should be true as we use the onExchange to filter +return true; +} + +@Override +public String toString() { +return "fromCurrentRoute(" + routeId + ")"; +} +}); +return this; +} + private NotifyBuilder fromRoutesOnly() { // internal and should always be in top of stack stack.add(0, new EventPredicateSupport() { diff --git a/camel-core/src/test/java/org/apache/camel/builder/NotifyBuilderFromRouteTest.java b/camel-core/src/test/java/org/apache/camel/builder/NotifyBuilderFromRouteTest.java index b945b0c..c2a4f33 100644 --- a/camel-core/src/test/java/org/apache/camel/builder/NotifyBuilderFromRouteTest.java +++ b/camel-core/src/test/java/org/apache/camel/builder/NotifyBuilderFromRouteTest.java @@ -45,6 +45,17 @@ public class NotifyBuilderFromRouteTest extends ContextTestSupport { assertTrue(builder.matchesMockWaitTime()); } +@Test +public void testDoneFromCurrentRoute() throws Exception { +// notify when exchange is done +NotifyBuilder builder = +new NotifyBuilder(context).fromCurrentRoute("bar").whenDone(1); +builder.create(); + +template.sendBody("seda:foo", "Hello world!"); + +assertTrue(builder.matchesMockWaitTime()); +} @Override protected JndiRegistry createRegistry() throws Exception { @@ -60,7 +71,12 @@ public class NotifyBuilderFromRouteTest extends ContextTestSupport { public void configure() throws Exception { from("proxy:seda:foo") .routeId("foo") +.to("direct:bar") .to("mock:foo"); + +from("direct:bar") +.routeId("bar") +.to("mock:bar"); } }; }
[camel] branch master updated: CAMEL-13687: NotifyBuilder - Add fromCurrentRoute functionality
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git The following commit(s) were added to refs/heads/master by this push: new ffbd0c6 CAMEL-13687: NotifyBuilder - Add fromCurrentRoute functionality ffbd0c6 is described below commit ffbd0c60e956d0620512ae050390badb2785ae6a Author: Claus Ibsen AuthorDate: Mon Jul 1 17:51:42 2019 +0200 CAMEL-13687: NotifyBuilder - Add fromCurrentRoute functionality --- .../org/apache/camel/builder/NotifyBuilder.java| 44 ++ .../camel/builder/NotifyBuilderFromRouteTest.java | 28 ++ 2 files changed, 72 insertions(+) diff --git a/core/camel-core/src/main/java/org/apache/camel/builder/NotifyBuilder.java b/core/camel-core/src/main/java/org/apache/camel/builder/NotifyBuilder.java index 1fd4677..1fba0ff 100644 --- a/core/camel-core/src/main/java/org/apache/camel/builder/NotifyBuilder.java +++ b/core/camel-core/src/main/java/org/apache/camel/builder/NotifyBuilder.java @@ -37,6 +37,8 @@ import org.apache.camel.spi.CamelEvent.ExchangeCompletedEvent; import org.apache.camel.spi.CamelEvent.ExchangeCreatedEvent; import org.apache.camel.spi.CamelEvent.ExchangeFailedEvent; import org.apache.camel.spi.CamelEvent.ExchangeSentEvent; +import org.apache.camel.spi.RouteContext; +import org.apache.camel.spi.UnitOfWork; import org.apache.camel.support.EndpointHelper; import org.apache.camel.support.EventNotifierSupport; import org.apache.camel.support.PatternHelper; @@ -179,6 +181,48 @@ public class NotifyBuilder { return this; } +/** + * Optionally a from current route which means that this expression should only be based + * on {@link Exchange} which is the current route(s). + * + * @param routeId id of route or pattern (see the EndpointHelper javadoc) + * @return the builder + * @see EndpointHelper#matchEndpoint(org.apache.camel.CamelContext, String, String) + */ +public NotifyBuilder fromCurrentRoute(final String routeId) { +stack.add(new EventPredicateSupport() { + +@Override +public boolean isAbstract() { +// is abstract as its a filter +return true; +} + +@Override +public boolean onExchangeSent(Exchange exchange, Endpoint endpoint, long timeTaken) { +UnitOfWork uow = exchange.getUnitOfWork(); +RouteContext rc = uow != null ? uow.getRouteContext() : null; +if (rc != null) { +String id = rc.getRouteId(); +return PatternHelper.matchPattern(id, routeId); +} else { +return false; +} +} + +public boolean matches() { +// should be true as we use the onExchange to filter +return true; +} + +@Override +public String toString() { +return "fromCurrentRoute(" + routeId + ")"; +} +}); +return this; +} + private NotifyBuilder fromRoutesOnly() { // internal and should always be in top of stack stack.add(0, new EventPredicateSupport() { diff --git a/core/camel-core/src/test/java/org/apache/camel/builder/NotifyBuilderFromRouteTest.java b/core/camel-core/src/test/java/org/apache/camel/builder/NotifyBuilderFromRouteTest.java index 0026a1c..850f401 100644 --- a/core/camel-core/src/test/java/org/apache/camel/builder/NotifyBuilderFromRouteTest.java +++ b/core/camel-core/src/test/java/org/apache/camel/builder/NotifyBuilderFromRouteTest.java @@ -42,6 +42,29 @@ public class NotifyBuilderFromRouteTest extends ContextTestSupport { assertTrue(builder.matchesMockWaitTime()); } +@Test +public void testDoneFromCurrentRoute() throws Exception { +// notify when exchange is done +NotifyBuilder builder = +new NotifyBuilder(context).fromCurrentRoute("bar").whenDone(1); +builder.create(); + +template.sendBody("seda:foo", "Hello world!"); + +assertTrue(builder.matchesMockWaitTime()); +} + +@Test +public void testDoneFromCurrentRouteStartRoute() throws Exception { +// notify when exchange is done +NotifyBuilder builder = +new NotifyBuilder(context).fromCurrentRoute("foo").whenDone(1); +builder.create(); + +template.sendBody("seda:foo", "Hello world!"); + +assertTrue(builder.matchesMockWaitTime()); +} @Override protected JndiRegistry createRegistry() throws Exception { @@ -57,7 +80,12 @@ public class NotifyBuilderFromRouteTest extends ContextTestSupport { public void configure() throws Exception { from("proxy:seda:foo") .routeId("foo") +.to("direct:bar")
[camel] branch camel-2.23.x updated: CAMEL-13687: NotifyBuilder - Add fromCurrentRoute functionality
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch camel-2.23.x in repository https://gitbox.apache.org/repos/asf/camel.git The following commit(s) were added to refs/heads/camel-2.23.x by this push: new 814b3a4 CAMEL-13687: NotifyBuilder - Add fromCurrentRoute functionality 814b3a4 is described below commit 814b3a405139c5e6c26da4af9a61703fbcf67df5 Author: Claus Ibsen AuthorDate: Mon Jul 1 18:01:22 2019 +0200 CAMEL-13687: NotifyBuilder - Add fromCurrentRoute functionality --- .../org/apache/camel/builder/NotifyBuilder.java| 44 ++ .../camel/builder/NotifyBuilderFromRouteTest.java | 16 2 files changed, 60 insertions(+) diff --git a/camel-core/src/main/java/org/apache/camel/builder/NotifyBuilder.java b/camel-core/src/main/java/org/apache/camel/builder/NotifyBuilder.java index 41d190a..0c7f5e1 100644 --- a/camel-core/src/main/java/org/apache/camel/builder/NotifyBuilder.java +++ b/camel-core/src/main/java/org/apache/camel/builder/NotifyBuilder.java @@ -39,6 +39,8 @@ import org.apache.camel.management.event.ExchangeCompletedEvent; import org.apache.camel.management.event.ExchangeCreatedEvent; import org.apache.camel.management.event.ExchangeFailedEvent; import org.apache.camel.management.event.ExchangeSentEvent; +import org.apache.camel.spi.RouteContext; +import org.apache.camel.spi.UnitOfWork; import org.apache.camel.support.EventNotifierSupport; import org.apache.camel.util.EndpointHelper; import org.apache.camel.util.ObjectHelper; @@ -176,6 +178,48 @@ public class NotifyBuilder { return this; } +/** + * Optionally a from current route which means that this expression should only be based + * on {@link Exchange} which is the current route(s). + * + * @param routeId id of route or pattern (see the EndpointHelper javadoc) + * @return the builder + * @see EndpointHelper#matchEndpoint(org.apache.camel.CamelContext, String, String) + */ +public NotifyBuilder fromCurrentRoute(final String routeId) { +stack.add(new EventPredicateSupport() { + +@Override +public boolean isAbstract() { +// is abstract as its a filter +return true; +} + +@Override +public boolean onExchangeSent(Exchange exchange, Endpoint endpoint, long timeTaken) { +UnitOfWork uow = exchange.getUnitOfWork(); +RouteContext rc = uow != null ? uow.getRouteContext() : null; +if (rc != null) { +String id = rc.getRoute().getId(); +return EndpointHelper.matchPattern(id, routeId); +} else { +return false; +} +} + +public boolean matches() { +// should be true as we use the onExchange to filter +return true; +} + +@Override +public String toString() { +return "fromCurrentRoute(" + routeId + ")"; +} +}); +return this; +} + private NotifyBuilder fromRoutesOnly() { // internal and should always be in top of stack stack.add(0, new EventPredicateSupport() { diff --git a/camel-core/src/test/java/org/apache/camel/builder/NotifyBuilderFromRouteTest.java b/camel-core/src/test/java/org/apache/camel/builder/NotifyBuilderFromRouteTest.java index b945b0c..c2a4f33 100644 --- a/camel-core/src/test/java/org/apache/camel/builder/NotifyBuilderFromRouteTest.java +++ b/camel-core/src/test/java/org/apache/camel/builder/NotifyBuilderFromRouteTest.java @@ -45,6 +45,17 @@ public class NotifyBuilderFromRouteTest extends ContextTestSupport { assertTrue(builder.matchesMockWaitTime()); } +@Test +public void testDoneFromCurrentRoute() throws Exception { +// notify when exchange is done +NotifyBuilder builder = +new NotifyBuilder(context).fromCurrentRoute("bar").whenDone(1); +builder.create(); + +template.sendBody("seda:foo", "Hello world!"); + +assertTrue(builder.matchesMockWaitTime()); +} @Override protected JndiRegistry createRegistry() throws Exception { @@ -60,7 +71,12 @@ public class NotifyBuilderFromRouteTest extends ContextTestSupport { public void configure() throws Exception { from("proxy:seda:foo") .routeId("foo") +.to("direct:bar") .to("mock:foo"); + +from("direct:bar") +.routeId("bar") +.to("mock:bar"); } }; }
[camel] 03/07: Cross reference with custom xreflabel text converted to Inline xref macro to fix anchor not found errors in camel/core/camel-base
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git commit ba0299b371a0c59bb4459b772af66439483030b2 Author: nayananga@acerubuntu18.04 AuthorDate: Sat Jun 29 23:06:55 2019 +0530 Cross reference with custom xreflabel text converted to Inline xref macro to fix anchor not found errors in camel/core/camel-base --- core/camel-base/src/main/docs/file-language.adoc | 34 +++--- core/camel-base/src/main/docs/simple-language.adoc | 24 +++ 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/core/camel-base/src/main/docs/file-language.adoc b/core/camel-base/src/main/docs/file-language.adoc index 4f3dbe2..41e7914 100644 --- a/core/camel-base/src/main/docs/file-language.adoc +++ b/core/camel-base/src/main/docs/file-language.adoc @@ -4,11 +4,11 @@ *Available as of Camel version 1.1* The file language is merged with -<> language which means you can use all the file +xref:simple-language.adoc[Simple] language which means you can use all the file syntax directly within the simple language. The File Expression Language is an extension to the -<> language, adding file related capabilities. +xref:simple-language.adoc[Simple] language, adding file related capabilities. These capabilities are related to common use cases working with file path and names. The goal is to allow expressions to be used with the File and FTP components for setting @@ -31,18 +31,18 @@ The File language supports 2 options, which are listed below. === Syntax -This language is an *extension* to the <> language -so the <> syntax applies also. So the table below +This language is an *extension* to the xref:simple-language.adoc[Simple] language +so the xref:simple-language.adoc[Simple] syntax applies also. So the table below only lists the additional. + - As opposed to <> language -<> also supports -<> expressions so you can enter a fixed + As opposed to xref:simple-language.adoc[Simple] language +xref:file-language.adoc[File Language] also supports +xref:constant-language.adoc[Constant] expressions so you can enter a fixed filename. All the file tokens use the same expression name as the method on the `java.io.File` object, for instance `file:absolute` refers to the `java.io.File.getAbsolute()` method. Notice that not all expressions are -supported by the current Exchange. For instance the <> +supported by the current Exchange. For instance the xref:ftp-component.adoc[FTP] component supports some of the options, where as the File component supports all of them. @@ -94,9 +94,9 @@ this expression strips only the last part, and keep the others. |file:modified |Date |yes |no |yes |no |Refers to the file last modified returned as a Date type |date:_command:pattern_ |String |yes |yes |yes |yes |for date formatting using the `java.text.SimpleDateFormat` patterns. Is -an *extension* to the <> language. Additional +an *extension* to the xref:simple-language.adoc[Simple] language. Additional command is: *file* (consumers only) for the last modified timestamp of -the file. Notice: all the commands from the <> +the file. Notice: all the commands from the xref:simple-language.adoc[Simple] language can also be used. |=== @@ -170,7 +170,7 @@ return as: === Samples -You can enter a fixed <> expression such as +You can enter a fixed xref:constant-language.adoc[Constant] expression such as `myfile.txt`: [source] @@ -195,7 +195,7 @@ should be a sibling folder then you can append .. as: fileName="../backup/${date:now:MMdd}/${file:name.noext}.bak" -As this is an extension to the <> language we have +As this is an extension to the xref:simple-language.adoc[Simple] language we have access to all the goodies from this language also, so in this use case we want to use the in.header.type as a parameter in the dynamic expression: @@ -222,14 +222,14 @@ fileName="uniquefile-${bean:myguidgenerator.generateid}.txt" And of course all this can be combined in one expression where you can -use the <>, <> -and the <> language in one combined expression. This +use the xref:file-language,File Language>>, <> directly -from the <> language which makes a +In Camel you can use the xref:file-language.adoc[File Language] directly +from the xref:simple-language.adoc[Simple] language which makes a Content Based Router easier to do in Spring XML, where we can route based on file extensions as shown below: @@ -252,7 +252,7 @@ Spring XML, where we can route based on file extensions as shown below: If you use the `fileName` option on the File endpoint -to set a dynamic filename using the <> then make sure you + +to set a dynamic filename using the xref:file-language.adoc[File Language] then make sure you + use the alternative syntax to avoid clashing with Springs `PropertyPlaceholderConfigurer`. diff --git a/core/camel-base/src/main/do
[camel] 05/07: Cross reference with custom xreflabel text converted to Inline xref macro to fix anchor not found errors inside camel/core/camel-core
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git commit b6ac2caa77cb5282272c183661f31a2675b21761 Author: nayananga@acerubuntu18.04 AuthorDate: Sat Jun 29 23:10:02 2019 +0530 Cross reference with custom xreflabel text converted to Inline xref macro to fix anchor not found errors inside camel/core/camel-core --- .../src/main/docs/eips/aggregate-eip.adoc | 2 +- core/camel-core/src/main/docs/eips/bean-eip.adoc | 8 +++ .../main/docs/eips/content-based-router-eip.adoc | 12 +- .../src/main/docs/eips/content-filter-eip.adoc | 28 +++--- .../src/main/docs/eips/dynamic-router.adoc | 6 ++--- .../main/docs/eips/eventDrivenConsumer-eip.adoc| 26 ++-- .../src/main/docs/eips/idempotentConsumer-eip.adoc | 12 +- core/camel-core/src/main/docs/eips/log-eip.adoc| 6 ++--- .../camel-core/src/main/docs/eips/process-eip.adoc | 2 +- .../src/main/docs/eips/requestReply-eip.adoc | 4 ++-- core/camel-core/src/main/docs/eips/toD-eip.adoc| 14 +-- .../camel-core/src/main/docs/eips/wireTap-eip.adoc | 4 ++-- 12 files changed, 62 insertions(+), 62 deletions(-) diff --git a/core/camel-core/src/main/docs/eips/aggregate-eip.adoc b/core/camel-core/src/main/docs/eips/aggregate-eip.adoc index 7b3082e..9965366 100644 --- a/core/camel-core/src/main/docs/eips/aggregate-eip.adoc +++ b/core/camel-core/src/main/docs/eips/aggregate-eip.adoc @@ -187,7 +187,7 @@ consumer etc) The aggregator provides a pluggable repository which you can implement your own `org.apache.camel.spi.AggregationRepository`. + If you need persistent repository then you can use either Camel -xref:leveldb.adoc[LevelDB], or <> components. +xref:leveldb.adoc[LevelDB], or xref:sql-component.adoc[SQL Component] components. === Using TimeoutAwareAggregationStrategy diff --git a/core/camel-core/src/main/docs/eips/bean-eip.adoc b/core/camel-core/src/main/docs/eips/bean-eip.adoc index b60d58e..d0c9ccc 100644 --- a/core/camel-core/src/main/docs/eips/bean-eip.adoc +++ b/core/camel-core/src/main/docs/eips/bean-eip.adoc @@ -11,7 +11,7 @@ bean:beanID[?options] Where *beanID* can be any string which is used to look up the bean in -the <> +the xref:Registry-Registry.adoc[Registry] === EIP options @@ -30,7 +30,7 @@ The Bean EIP supports 4 options which are listed below: === Bean as endpoint -Camel also supports invoking <> as an Endpoint. In the +Camel also supports invoking xref:bean-component.adoc[Bean] as an Endpoint. In the route below: What happens is that when the exchange is routed to the `myBean` Camel @@ -43,7 +43,7 @@ type and storing the output of the method on the Exchange Out body. === Java DSL bean syntax -Java DSL comes with syntactic sugar for the <> +Java DSL comes with syntactic sugar for the xref:bean-component.adoc[Bean] component. Instead of specifying the bean explicitly as the endpoint (i.e. `to("bean:beanName")`) you can use the following syntax: @@ -84,6 +84,6 @@ mechanisms in Camel. === See also -* <> component +* xref:class-component.adoc[Class] component * xref:bean-binding.adoc[Bean Binding] * xref:bean-integration.adoc[Bean Integration] diff --git a/core/camel-core/src/main/docs/eips/content-based-router-eip.adoc b/core/camel-core/src/main/docs/eips/content-based-router-eip.adoc index a892778..d2fa9b5 100644 --- a/core/camel-core/src/main/docs/eips/content-based-router-eip.adoc +++ b/core/camel-core/src/main/docs/eips/content-based-router-eip.adoc @@ -13,7 +13,7 @@ The following example shows how to route a request from an input *seda:a* endpoint to either *seda:b*, *seda:c* or *seda:d* depending on the evaluation of various xref:predicate.adoc[Predicate] expressions -=== Using the <> +=== Using the xref:FluentBuilders-FluentBuilders.adoc[Fluent Builders] [source,java] @@ -41,7 +41,7 @@ can I not use when or otherwise in a Java Camel route] if you have problems with the Java DSL, accepting using `when` or `otherwise`. -=== Using the <> +=== Using the xref:SpringXMLExtensions-SpringXMLExtensions.adoc[Spring XML Extensions] [source,java] @@ -72,8 +72,8 @@ https://github.com/apache/camel/blob/master/camel-core/src/test/java/org/apache/ === Using This Pattern If you would like to use this EIP Pattern then please read the -<>. You may also find the -<> useful particularly the description -of <> and xref:uris.adoc[URIs]. Then you could -try out some of the <> first before trying +xref:GettingStarted-GettingStarted.adoc[Getting Started]. You may also find the +xref:Architecture-Architecture.adoc[Architecture] useful particularly the description +of xref:Endpoint-Endpoints.adoc[Endpoint] and xref:uris.adoc[URIs]. Then you could +try out some of the xref:Examples-Examples.adoc[Examples] first before trying this pattern out. diff --git
[camel] 02/07: ran yarn gulp inside camel/docs
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git commit 7ab8f67d93191157f18fe03e94dd8e7c04c0ed6c Author: nayananga@acerubuntu18.04 AuthorDate: Sat Jun 29 23:04:37 2019 +0530 ran yarn gulp inside camel/docs --- .../modules/ROOT/pages/ahc-component.adoc | 6 ++--- .../modules/ROOT/pages/ahc-ws-component.adoc | 4 ++-- .../modules/ROOT/pages/amqp-component.adoc | 2 +- .../ROOT/pages/atmosphere-websocket-component.adoc | 6 ++--- .../modules/ROOT/pages/atom-component.adoc | 2 +- docs/components/modules/ROOT/pages/azure.adoc | 4 ++-- .../modules/ROOT/pages/bean-component.adoc | 4 ++-- .../modules/ROOT/pages/class-component.adoc| 8 +++ .../modules/ROOT/pages/controlbus-component.adoc | 12 +- .../modules/ROOT/pages/crypto-dataformat.adoc | 2 +- .../modules/ROOT/pages/cxfrs-component.adoc| 2 +- .../modules/ROOT/pages/dataformat-component.adoc | 2 +- .../modules/ROOT/pages/dataset-component.adoc | 6 ++--- .../modules/ROOT/pages/dataset-test-component.adoc | 14 +-- .../modules/ROOT/pages/direct-component.adoc | 10 .../modules/ROOT/pages/direct-vm-component.adoc| 10 .../modules/ROOT/pages/disruptor-component.adoc| 4 ++-- .../modules/ROOT/pages/ejb-component.adoc | 12 +- .../modules/ROOT/pages/elsql-component.adoc| 4 ++-- .../modules/ROOT/pages/exec-component.adoc | 2 +- .../modules/ROOT/pages/file-component.adoc | 28 +++--- .../modules/ROOT/pages/flatpack-component.adoc | 2 +- .../modules/ROOT/pages/flatpack-dataformat.adoc| 2 +- .../modules/ROOT/pages/ftps-component.adoc | 2 +- .../modules/ROOT/pages/groovy-language.adoc| 4 ++-- .../modules/ROOT/pages/grpc-component.adoc | 2 +- docs/components/modules/ROOT/pages/hazelcast.adoc | 22 - .../modules/ROOT/pages/hdfs2-component.adoc| 2 +- .../modules/ROOT/pages/hl7-dataformat.adoc | 12 +- .../modules/ROOT/pages/http4-component.adoc| 6 ++--- docs/components/modules/ROOT/pages/ignite.adoc | 16 ++--- docs/components/modules/ROOT/pages/jasypt.adoc | 16 ++--- .../modules/ROOT/pages/jaxb-dataformat.adoc| 4 ++-- .../modules/ROOT/pages/jdbc-component.adoc | 8 +++ .../modules/ROOT/pages/jetty-component.adoc| 8 +++ .../modules/ROOT/pages/jgroups-component.adoc | 4 ++-- .../modules/ROOT/pages/jgroups-raft-component.adoc | 2 +- .../modules/ROOT/pages/jing-component.adoc | 2 +- .../modules/ROOT/pages/jms-component.adoc | 22 - .../modules/ROOT/pages/jmx-component.adoc | 2 +- .../modules/ROOT/pages/jpa-component.adoc | 2 +- .../modules/ROOT/pages/jsonpath-language.adoc | 2 +- .../pages/kubernetes-config-maps-component.adoc| 2 +- .../pages/kubernetes-deployments-component.adoc| 2 +- .../ROOT/pages/kubernetes-hpa-component.adoc | 2 +- .../ROOT/pages/kubernetes-job-component.adoc | 2 +- .../pages/kubernetes-namespaces-component.adoc | 2 +- .../ROOT/pages/kubernetes-nodes-component.adoc | 2 +- ...rnetes-persistent-volumes-claims-component.adoc | 2 +- .../kubernetes-persistent-volumes-component.adoc | 2 +- .../ROOT/pages/kubernetes-pods-component.adoc | 2 +- ...bernetes-replication-controllers-component.adoc | 2 +- .../kubernetes-resources-quota-component.adoc | 2 +- .../ROOT/pages/kubernetes-secrets-component.adoc | 2 +- .../kubernetes-service-accounts-component.adoc | 2 +- .../ROOT/pages/kubernetes-services-component.adoc | 2 +- docs/components/modules/ROOT/pages/kubernetes.adoc | 24 +-- .../modules/ROOT/pages/language-component.adoc | 12 +- .../modules/ROOT/pages/log-component.adoc | 2 +- .../modules/ROOT/pages/mina2-component.adoc| 8 +++ .../modules/ROOT/pages/mock-component.adoc | 20 .../ROOT/pages/mongodb-gridfs-component.adoc | 2 +- .../modules/ROOT/pages/mongodb3-component.adoc | 12 +- .../modules/ROOT/pages/msv-component.adoc | 2 +- .../modules/ROOT/pages/mybatis-component.adoc | 4 ++-- .../modules/ROOT/pages/nagios-component.adoc | 6 ++--- .../modules/ROOT/pages/netty4-component.adoc | 6 ++--- .../modules/ROOT/pages/netty4-http-component.adoc | 14 +-- .../ROOT/pages/openshift-builds-component.adoc | 2 +- docs/components/modules/ROOT/pages/openstack.adoc | 12 +- .../modules/ROOT/pages/properties-component.adoc | 24 +-- .../modules/ROOT/pages/protobuf-dataformat.adoc| 2 +- .../modules/ROOT/pages/pubnub-component.adoc | 2 +- .../modules/ROOT/pages/q
[camel] 07/07: ran ./mvnw -Pfastinstall install in camel root directory
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git commit b4fd2a1fc6739dad0b38af509cd6391c08046f6e Author: nayananga@acerubuntu18.04 AuthorDate: Sun Jun 30 00:01:23 2019 +0530 ran ./mvnw -Pfastinstall install in camel root directory --- components/camel-cm-sms/src/main/docs/cm-sms-component.adoc | 6 +++--- components/readme.adoc | 8 docs/components/modules/ROOT/pages/cm-sms-component.adoc| 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/components/camel-cm-sms/src/main/docs/cm-sms-component.adoc b/components/camel-cm-sms/src/main/docs/cm-sms-component.adoc index d40ba67..4470bc5 100644 --- a/components/camel-cm-sms/src/main/docs/cm-sms-component.adoc +++ b/components/camel-cm-sms/src/main/docs/cm-sms-component.adoc @@ -71,10 +71,10 @@ with the following path and query parameters: [width="100%",cols="2,5,^1,2",options="header"] |=== | Name | Description | Default | Type -| *defaultFrom* (producer) | This is the sender name. The maximum length is 11 characters. | | String) -| *defaultMaxNumberOfParts* (producer) | If it is a multipart message forces the max number. Message can be truncated. Technically the gateway will first check if a message is larger than 160 characters, if so, the message will be cut into multiple 153 characters parts limited by these parameters. | 8 | Max(8L)::Int) +| *defaultFrom* (producer) | This is the sender name. The maximum length is 11 characters. | | String +| *defaultMaxNumberOfParts* (producer) | If it is a multipart message forces the max number. Message can be truncated. Technically the gateway will first check if a message is larger than 160 characters, if so, the message will be cut into multiple 153 characters parts limited by these parameters. | 8 | Max(8L)Int | *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...] -| *productToken* (producer) | *Required* The unique token to use | | String) +| *productToken* (producer) | *Required* The unique token to use | | String | *testConnectionOnStartup* (producer) | Whether to test the connection to the SMS Gateway on startup | false | boolean | *basicPropertyBinding* (advanced) | Whether the endpoint should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | boolean | *synchronous* (advanced) | Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported). | false | boolean diff --git a/components/readme.adoc b/components/readme.adoc index 8ac82b7..d407584 100644 --- a/components/readme.adoc +++ b/components/readme.adoc @@ -1004,7 +1004,7 @@ Number of Data Formats: 45 in 37 JAR artifacts (0 deprecated) Expression Languages // languages: START -Number of Languages: 17 in 11 JAR artifacts (0 deprecated) +Number of Languages: 16 in 10 JAR artifacts (0 deprecated) [width="100%",cols="4,1,5",options="header"] |=== @@ -1038,8 +1038,6 @@ Number of Languages: 17 in 11 JAR artifacts (0 deprecated) | link:camel-base/src/main/docs/tokenize-language.adoc[Tokenize] (camel-base) | 2.0 | To use Camel message body or header with a tokenizer in Camel expressions or predicates. -| link:camel-jaxp/src/main/docs/xtokenize-language.adoc[XML Tokenize] (camel-jaxp) | 2.14 | To use Camel message body or header with a XML tokenizer in Camel expressions or predicates. - | link:camel-xpath/src/main/docs/xpath-language.adoc[XPath] (camel-xpath) | 1.1 | To use XPath (XML) in Camel expressions or predicates. | link:camel-saxon/src/main/docs/xquery-language.adoc[XQuery] (camel-saxon) | 1.0 | To use XQuery (XML) in Camel expressions or predicates. @@ -1050,7 +1048,7 @@ Number of Languages: 17 in 11 JAR artifacts (0 deprecated) Miscellaneous Components // others: START -Number of Miscellaneous Components: 31 in 31 JAR artifacts (0 deprecated) +Number of Miscellaneous Components: 32 in 32 JAR artifacts (0 deprecated) [width="100%",cols="4,1,5",options="header"] |=== @@ -1064,6 +1062,8 @@ Number of Miscellaneous Components: 31 in 31 JAR artifacts (0 deprecated) | link:camel-hystrix/src/main/docs/hystrix.adoc[Hystrix] (camel-hystrix) | 2.18 | Circuit Breaker EIP using Netflix Hystrix +| link:camel-ignite/src/main/docs/ignite.adoc[Ignite] (camel-ignite) | | Camel Ignite component + | link:camel-jasypt/src/main/docs/jasypt.a
[camel] 06/07: ran yarn gulp inside camel/docs
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git commit 702d9910276ed71320866c50257d8d7bee5a3543 Author: nayananga@acerubuntu18.04 AuthorDate: Sat Jun 29 23:10:43 2019 +0530 ran yarn gulp inside camel/docs --- .../modules/ROOT/pages/aggregate-eip.adoc | 2 +- docs/user-manual/modules/ROOT/pages/bean-eip.adoc | 8 +++ .../ROOT/pages/content-based-router-eip.adoc | 12 +- .../modules/ROOT/pages/content-filter-eip.adoc | 28 +++--- .../modules/ROOT/pages/dynamic-router.adoc | 6 ++--- .../ROOT/pages/eventDrivenConsumer-eip.adoc| 26 ++-- .../modules/ROOT/pages/idempotentConsumer-eip.adoc | 12 +- docs/user-manual/modules/ROOT/pages/log-eip.adoc | 6 ++--- .../modules/ROOT/pages/process-eip.adoc| 2 +- .../modules/ROOT/pages/requestReply-eip.adoc | 4 ++-- docs/user-manual/modules/ROOT/pages/toD-eip.adoc | 14 +-- .../modules/ROOT/pages/wireTap-eip.adoc| 4 ++-- 12 files changed, 62 insertions(+), 62 deletions(-) diff --git a/docs/user-manual/modules/ROOT/pages/aggregate-eip.adoc b/docs/user-manual/modules/ROOT/pages/aggregate-eip.adoc index 7b3082e..9965366 100644 --- a/docs/user-manual/modules/ROOT/pages/aggregate-eip.adoc +++ b/docs/user-manual/modules/ROOT/pages/aggregate-eip.adoc @@ -187,7 +187,7 @@ consumer etc) The aggregator provides a pluggable repository which you can implement your own `org.apache.camel.spi.AggregationRepository`. + If you need persistent repository then you can use either Camel -xref:leveldb.adoc[LevelDB], or <> components. +xref:leveldb.adoc[LevelDB], or xref:sql-component.adoc[SQL Component] components. === Using TimeoutAwareAggregationStrategy diff --git a/docs/user-manual/modules/ROOT/pages/bean-eip.adoc b/docs/user-manual/modules/ROOT/pages/bean-eip.adoc index b60d58e..d0c9ccc 100644 --- a/docs/user-manual/modules/ROOT/pages/bean-eip.adoc +++ b/docs/user-manual/modules/ROOT/pages/bean-eip.adoc @@ -11,7 +11,7 @@ bean:beanID[?options] Where *beanID* can be any string which is used to look up the bean in -the <> +the xref:Registry-Registry.adoc[Registry] === EIP options @@ -30,7 +30,7 @@ The Bean EIP supports 4 options which are listed below: === Bean as endpoint -Camel also supports invoking <> as an Endpoint. In the +Camel also supports invoking xref:bean-component.adoc[Bean] as an Endpoint. In the route below: What happens is that when the exchange is routed to the `myBean` Camel @@ -43,7 +43,7 @@ type and storing the output of the method on the Exchange Out body. === Java DSL bean syntax -Java DSL comes with syntactic sugar for the <> +Java DSL comes with syntactic sugar for the xref:bean-component.adoc[Bean] component. Instead of specifying the bean explicitly as the endpoint (i.e. `to("bean:beanName")`) you can use the following syntax: @@ -84,6 +84,6 @@ mechanisms in Camel. === See also -* <> component +* xref:class-component.adoc[Class] component * xref:bean-binding.adoc[Bean Binding] * xref:bean-integration.adoc[Bean Integration] diff --git a/docs/user-manual/modules/ROOT/pages/content-based-router-eip.adoc b/docs/user-manual/modules/ROOT/pages/content-based-router-eip.adoc index a892778..d2fa9b5 100644 --- a/docs/user-manual/modules/ROOT/pages/content-based-router-eip.adoc +++ b/docs/user-manual/modules/ROOT/pages/content-based-router-eip.adoc @@ -13,7 +13,7 @@ The following example shows how to route a request from an input *seda:a* endpoint to either *seda:b*, *seda:c* or *seda:d* depending on the evaluation of various xref:predicate.adoc[Predicate] expressions -=== Using the <> +=== Using the xref:FluentBuilders-FluentBuilders.adoc[Fluent Builders] [source,java] @@ -41,7 +41,7 @@ can I not use when or otherwise in a Java Camel route] if you have problems with the Java DSL, accepting using `when` or `otherwise`. -=== Using the <> +=== Using the xref:SpringXMLExtensions-SpringXMLExtensions.adoc[Spring XML Extensions] [source,java] @@ -72,8 +72,8 @@ https://github.com/apache/camel/blob/master/camel-core/src/test/java/org/apache/ === Using This Pattern If you would like to use this EIP Pattern then please read the -<>. You may also find the -<> useful particularly the description -of <> and xref:uris.adoc[URIs]. Then you could -try out some of the <> first before trying +xref:GettingStarted-GettingStarted.adoc[Getting Started]. You may also find the +xref:Architecture-Architecture.adoc[Architecture] useful particularly the description +of xref:Endpoint-Endpoints.adoc[Endpoint] and xref:uris.adoc[URIs]. Then you could +try out some of the xref:Examples-Examples.adoc[Examples] first before trying this pattern out. diff --git a/docs/user-manual/modules/ROOT/pages/content-filter-eip.adoc b/docs/user-manual/modules/R
[camel] 04/07: ran yarn gulp inside camel/docs
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git commit b456ef9d900c3f1c3c0547558b69f53d2291308f Author: nayananga@acerubuntu18.04 AuthorDate: Sat Jun 29 23:08:05 2019 +0530 ran yarn gulp inside camel/docs --- .../modules/ROOT/pages/file-language.adoc | 34 +++--- .../modules/ROOT/pages/simple-language.adoc| 24 +++ 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/docs/user-manual/modules/ROOT/pages/file-language.adoc b/docs/user-manual/modules/ROOT/pages/file-language.adoc index 4f3dbe2..41e7914 100644 --- a/docs/user-manual/modules/ROOT/pages/file-language.adoc +++ b/docs/user-manual/modules/ROOT/pages/file-language.adoc @@ -4,11 +4,11 @@ *Available as of Camel version 1.1* The file language is merged with -<> language which means you can use all the file +xref:simple-language.adoc[Simple] language which means you can use all the file syntax directly within the simple language. The File Expression Language is an extension to the -<> language, adding file related capabilities. +xref:simple-language.adoc[Simple] language, adding file related capabilities. These capabilities are related to common use cases working with file path and names. The goal is to allow expressions to be used with the File and FTP components for setting @@ -31,18 +31,18 @@ The File language supports 2 options, which are listed below. === Syntax -This language is an *extension* to the <> language -so the <> syntax applies also. So the table below +This language is an *extension* to the xref:simple-language.adoc[Simple] language +so the xref:simple-language.adoc[Simple] syntax applies also. So the table below only lists the additional. + - As opposed to <> language -<> also supports -<> expressions so you can enter a fixed + As opposed to xref:simple-language.adoc[Simple] language +xref:file-language.adoc[File Language] also supports +xref:constant-language.adoc[Constant] expressions so you can enter a fixed filename. All the file tokens use the same expression name as the method on the `java.io.File` object, for instance `file:absolute` refers to the `java.io.File.getAbsolute()` method. Notice that not all expressions are -supported by the current Exchange. For instance the <> +supported by the current Exchange. For instance the xref:ftp-component.adoc[FTP] component supports some of the options, where as the File component supports all of them. @@ -94,9 +94,9 @@ this expression strips only the last part, and keep the others. |file:modified |Date |yes |no |yes |no |Refers to the file last modified returned as a Date type |date:_command:pattern_ |String |yes |yes |yes |yes |for date formatting using the `java.text.SimpleDateFormat` patterns. Is -an *extension* to the <> language. Additional +an *extension* to the xref:simple-language.adoc[Simple] language. Additional command is: *file* (consumers only) for the last modified timestamp of -the file. Notice: all the commands from the <> +the file. Notice: all the commands from the xref:simple-language.adoc[Simple] language can also be used. |=== @@ -170,7 +170,7 @@ return as: === Samples -You can enter a fixed <> expression such as +You can enter a fixed xref:constant-language.adoc[Constant] expression such as `myfile.txt`: [source] @@ -195,7 +195,7 @@ should be a sibling folder then you can append .. as: fileName="../backup/${date:now:MMdd}/${file:name.noext}.bak" -As this is an extension to the <> language we have +As this is an extension to the xref:simple-language.adoc[Simple] language we have access to all the goodies from this language also, so in this use case we want to use the in.header.type as a parameter in the dynamic expression: @@ -222,14 +222,14 @@ fileName="uniquefile-${bean:myguidgenerator.generateid}.txt" And of course all this can be combined in one expression where you can -use the <>, <> -and the <> language in one combined expression. This +use the xref:file-language,File Language>>, <> directly -from the <> language which makes a +In Camel you can use the xref:file-language.adoc[File Language] directly +from the xref:simple-language.adoc[Simple] language which makes a Content Based Router easier to do in Spring XML, where we can route based on file extensions as shown below: @@ -252,7 +252,7 @@ Spring XML, where we can route based on file extensions as shown below: If you use the `fileName` option on the File endpoint -to set a dynamic filename using the <> then make sure you + +to set a dynamic filename using the xref:file-language.adoc[File Language] then make sure you + use the alternative syntax to avoid clashing with Springs `PropertyPlaceholderConfigurer`. diff --git a/docs/user-manual/modules/ROOT/pages/simple-language.adoc b/docs/user-manual/modules/ROOT/pages/simple
[camel] branch master updated (ffbd0c6 -> b4fd2a1)
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/camel.git. from ffbd0c6 CAMEL-13687: NotifyBuilder - Add fromCurrentRoute functionality new 9c8f9fb Cross reference with custom xreflabel text converted to Inline xref macro to fix anchor not found errors in camel/components new 7ab8f67 ran yarn gulp inside camel/docs new ba0299b Cross reference with custom xreflabel text converted to Inline xref macro to fix anchor not found errors in camel/core/camel-base new b456ef9 ran yarn gulp inside camel/docs new b6ac2ca Cross reference with custom xreflabel text converted to Inline xref macro to fix anchor not found errors inside camel/core/camel-core new 702d991 ran yarn gulp inside camel/docs new b4fd2a1 ran ./mvnw -Pfastinstall install in camel root directory The 7 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: .../src/main/docs/ahc-ws-component.adoc| 4 +-- .../camel-ahc/src/main/docs/ahc-component.adoc | 6 ++-- .../camel-amqp/src/main/docs/amqp-component.adoc | 2 +- .../main/docs/atmosphere-websocket-component.adoc | 6 ++-- .../camel-atom/src/main/docs/atom-component.adoc | 2 +- components/camel-azure/src/main/docs/azure.adoc| 4 +-- .../camel-bean/src/main/docs/bean-component.adoc | 4 +-- .../camel-bean/src/main/docs/class-component.adoc | 8 ++--- .../src/main/docs/cm-sms-component.adoc| 6 ++-- .../src/main/docs/controlbus-component.adoc| 12 .../src/main/docs/crypto-dataformat.adoc | 2 +- .../camel-cxf/src/main/docs/cxfrs-component.adoc | 2 +- .../src/main/docs/dataformat-component.adoc| 2 +- .../src/main/docs/dataset-component.adoc | 6 ++-- .../src/main/docs/dataset-test-component.adoc | 14 - .../src/main/docs/direct-component.adoc| 10 +++ .../src/main/docs/direct-vm-component.adoc | 10 +++ .../src/main/docs/disruptor-component.adoc | 4 +-- .../camel-ejb/src/main/docs/ejb-component.adoc | 12 .../camel-elsql/src/main/docs/elsql-component.adoc | 4 +-- .../camel-exec/src/main/docs/exec-component.adoc | 2 +- .../camel-file/src/main/docs/file-component.adoc | 28 +- .../src/main/docs/flatpack-component.adoc | 2 +- .../src/main/docs/flatpack-dataformat.adoc | 2 +- .../camel-ftp/src/main/docs/ftps-component.adoc| 2 +- .../camel-ftp/src/main/docs/sftp-component.adoc| 2 +- .../src/main/docs/groovy-language.adoc | 4 +-- .../camel-grpc/src/main/docs/grpc-component.adoc | 2 +- .../camel-hazelcast/src/main/docs/hazelcast.adoc | 22 +++--- .../camel-hdfs2/src/main/docs/hdfs2-component.adoc | 2 +- .../camel-hl7/src/main/docs/hl7-dataformat.adoc| 12 .../camel-http4/src/main/docs/http4-component.adoc | 6 ++-- components/camel-ignite/src/main/docs/ignite.adoc | 16 +- components/camel-jasypt/src/main/docs/jasypt.adoc | 16 +- .../camel-jaxb/src/main/docs/jaxb-dataformat.adoc | 4 +-- .../camel-jdbc/src/main/docs/jdbc-component.adoc | 8 ++--- .../camel-jetty/src/main/docs/jetty-component.adoc | 8 ++--- .../src/main/docs/jgroups-raft-component.adoc | 2 +- .../src/main/docs/jgroups-component.adoc | 4 +-- .../camel-jing/src/main/docs/jing-component.adoc | 2 +- .../camel-jms/src/main/docs/jms-component.adoc | 22 +++--- .../camel-jmx/src/main/docs/jmx-component.adoc | 2 +- .../camel-jpa/src/main/docs/jpa-component.adoc | 2 +- .../camel-jsch/src/main/docs/scp-component.adoc| 2 +- .../src/main/docs/jsonpath-language.adoc | 2 +- .../docs/kubernetes-config-maps-component.adoc | 2 +- .../docs/kubernetes-deployments-component.adoc | 2 +- .../src/main/docs/kubernetes-hpa-component.adoc| 2 +- .../src/main/docs/kubernetes-job-component.adoc| 2 +- .../main/docs/kubernetes-namespaces-component.adoc | 2 +- .../src/main/docs/kubernetes-nodes-component.adoc | 2 +- ...rnetes-persistent-volumes-claims-component.adoc | 2 +- .../kubernetes-persistent-volumes-component.adoc | 2 +- .../src/main/docs/kubernetes-pods-component.adoc | 2 +- ...bernetes-replication-controllers-component.adoc | 2 +- .../docs/kubernetes-resources-quota-component.adoc | 2 +- .../main/docs/kubernetes-secrets-component.adoc| 2 +- .../kubernetes-service-accounts-component.adoc | 2 +- .../main/docs/kubernetes-services-component.adoc | 2 +- .../camel-kubernetes/src/main/docs/kubernetes.adoc | 24 +++ .../src/main/docs/openshift-builds-component.adoc | 2 +- .../src/main/docs/languag
[camel] 01/07: Cross reference with custom xreflabel text converted to Inline xref macro to fix anchor not found errors in camel/components
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git commit 9c8f9fb9ae229e848bfc3df95d6b54dc07a7a396 Author: nayananga@acerubuntu18.04 AuthorDate: Sat Jun 29 23:00:27 2019 +0530 Cross reference with custom xreflabel text converted to Inline xref macro to fix anchor not found errors in camel/components --- .../src/main/docs/ahc-ws-component.adoc| 4 ++-- .../camel-ahc/src/main/docs/ahc-component.adoc | 6 ++--- .../camel-amqp/src/main/docs/amqp-component.adoc | 2 +- .../main/docs/atmosphere-websocket-component.adoc | 6 ++--- .../camel-atom/src/main/docs/atom-component.adoc | 2 +- components/camel-azure/src/main/docs/azure.adoc| 4 ++-- .../camel-bean/src/main/docs/bean-component.adoc | 4 ++-- .../camel-bean/src/main/docs/class-component.adoc | 8 +++ .../src/main/docs/controlbus-component.adoc| 12 +- .../src/main/docs/crypto-dataformat.adoc | 2 +- .../camel-cxf/src/main/docs/cxfrs-component.adoc | 2 +- .../src/main/docs/dataformat-component.adoc| 2 +- .../src/main/docs/dataset-component.adoc | 6 ++--- .../src/main/docs/dataset-test-component.adoc | 14 +-- .../src/main/docs/direct-component.adoc| 10 .../src/main/docs/direct-vm-component.adoc | 10 .../src/main/docs/disruptor-component.adoc | 4 ++-- .../camel-ejb/src/main/docs/ejb-component.adoc | 12 +- .../camel-elsql/src/main/docs/elsql-component.adoc | 4 ++-- .../camel-exec/src/main/docs/exec-component.adoc | 2 +- .../camel-file/src/main/docs/file-component.adoc | 28 +++--- .../src/main/docs/flatpack-component.adoc | 2 +- .../src/main/docs/flatpack-dataformat.adoc | 2 +- .../camel-ftp/src/main/docs/ftps-component.adoc| 2 +- .../camel-ftp/src/main/docs/sftp-component.adoc| 2 +- .../src/main/docs/groovy-language.adoc | 4 ++-- .../camel-grpc/src/main/docs/grpc-component.adoc | 2 +- .../camel-hazelcast/src/main/docs/hazelcast.adoc | 22 - .../camel-hdfs2/src/main/docs/hdfs2-component.adoc | 2 +- .../camel-hl7/src/main/docs/hl7-dataformat.adoc| 12 +- .../camel-http4/src/main/docs/http4-component.adoc | 6 ++--- components/camel-ignite/src/main/docs/ignite.adoc | 16 ++--- components/camel-jasypt/src/main/docs/jasypt.adoc | 16 ++--- .../camel-jaxb/src/main/docs/jaxb-dataformat.adoc | 4 ++-- .../camel-jdbc/src/main/docs/jdbc-component.adoc | 8 +++ .../camel-jetty/src/main/docs/jetty-component.adoc | 8 +++ .../src/main/docs/jgroups-raft-component.adoc | 2 +- .../src/main/docs/jgroups-component.adoc | 4 ++-- .../camel-jing/src/main/docs/jing-component.adoc | 2 +- .../camel-jms/src/main/docs/jms-component.adoc | 22 - .../camel-jmx/src/main/docs/jmx-component.adoc | 2 +- .../camel-jpa/src/main/docs/jpa-component.adoc | 2 +- .../camel-jsch/src/main/docs/scp-component.adoc| 2 +- .../src/main/docs/jsonpath-language.adoc | 2 +- .../docs/kubernetes-config-maps-component.adoc | 2 +- .../docs/kubernetes-deployments-component.adoc | 2 +- .../src/main/docs/kubernetes-hpa-component.adoc| 2 +- .../src/main/docs/kubernetes-job-component.adoc| 2 +- .../main/docs/kubernetes-namespaces-component.adoc | 2 +- .../src/main/docs/kubernetes-nodes-component.adoc | 2 +- ...rnetes-persistent-volumes-claims-component.adoc | 2 +- .../kubernetes-persistent-volumes-component.adoc | 2 +- .../src/main/docs/kubernetes-pods-component.adoc | 2 +- ...bernetes-replication-controllers-component.adoc | 2 +- .../docs/kubernetes-resources-quota-component.adoc | 2 +- .../main/docs/kubernetes-secrets-component.adoc| 2 +- .../kubernetes-service-accounts-component.adoc | 2 +- .../main/docs/kubernetes-services-component.adoc | 2 +- .../camel-kubernetes/src/main/docs/kubernetes.adoc | 24 +-- .../src/main/docs/openshift-builds-component.adoc | 2 +- .../src/main/docs/language-component.adoc | 12 +- .../camel-log/src/main/docs/log-component.adoc | 2 +- .../camel-mina2/src/main/docs/mina2-component.adoc | 8 +++ .../camel-mock/src/main/docs/mock-component.adoc | 20 .../src/main/docs/mongodb-gridfs-component.adoc| 2 +- .../src/main/docs/mongodb3-component.adoc | 12 +- .../camel-msv/src/main/docs/msv-component.adoc | 2 +- .../src/main/docs/mybatis-component.adoc | 4 ++-- .../src/main/docs/nagios-component.adoc| 6 ++--- .../src/main/docs/netty4-http-component.adoc | 14 +-- .../src/main/docs/netty4-component.adoc| 6 ++--- .../camel-openstack/src/main/docs/openstack.adoc | 12 +- .../src
[camel] 02/02: Regen
This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git commit 4bec4586109c52870943145ca67c49e484caf8cc Author: Andrea Cosentino AuthorDate: Mon Jul 1 18:37:07 2019 +0200 Regen --- components/readme.adoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/readme.adoc b/components/readme.adoc index d407584..2c0757a 100644 --- a/components/readme.adoc +++ b/components/readme.adoc @@ -1072,6 +1072,8 @@ Number of Miscellaneous Components: 32 in 32 JAR artifacts (0 deprecated) | link:camel-lra/src/main/docs/lra.adoc[Lra] (camel-lra) | 2.21 | Camel saga binding for Long-Running-Action framework +| link:camel-microprofile-config/src/main/docs/microprofile-config.adoc[Microprofile Config] (camel-microprofile-config) | 3.0 | Bridging Eclipse MicroProfile Config with Camel properties + | link:camel-opentracing/src/main/docs/opentracing.adoc[OpenTracing] (camel-opentracing) | 2.19 | Distributed tracing using OpenTracing | link:camel-reactive-executor-vertx/src/main/docs/reactive-executor-vertx.adoc[Reactive Executor Vertx] (camel-reactive-executor-vertx) | 3.0 | Reactive Executor for camel-core using Vert X
[camel] branch master updated (b4fd2a1 -> 4bec458)
This is an automated email from the ASF dual-hosted git repository. acosentino pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/camel.git. from b4fd2a1 ran ./mvnw -Pfastinstall install in camel root directory new eae4fca Added camel-microprofile-config to component POM new 4bec458 Regen The 2 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: components/pom.xml | 1 + components/readme.adoc | 2 ++ 2 files changed, 3 insertions(+)
[camel] 01/02: Added camel-microprofile-config to component POM
This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git commit eae4fca79e984005b0ca724982d49215362b1c83 Author: Andrea Cosentino AuthorDate: Mon Jul 1 18:26:28 2019 +0200 Added camel-microprofile-config to component POM --- components/pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/components/pom.xml b/components/pom.xml index ebf8a3d..ab32c00 100644 --- a/components/pom.xml +++ b/components/pom.xml @@ -233,6 +233,7 @@ camel-mail camel-metrics camel-micrometer +camel-microprofile-config camel-milo camel-mina2 camel-mllp
[camel-k] branch master updated: Route trait does not work if route.auto is set to false #767
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.git The following commit(s) were added to refs/heads/master by this push: new 4ac6992 Route trait does not work if route.auto is set to false #767 4ac6992 is described below commit 4ac699206c670e597f3453ae000e213fc56faf2b Author: lburgazzoli AuthorDate: Thu Jun 27 18:22:16 2019 +0200 Route trait does not work if route.auto is set to false #767 --- pkg/trait/route.go | 22 ++ pkg/trait/route_test.go | 77 ++--- 2 files changed, 63 insertions(+), 36 deletions(-) diff --git a/pkg/trait/route.go b/pkg/trait/route.go index ab7c5f4..2d53872 100644 --- a/pkg/trait/route.go +++ b/pkg/trait/route.go @@ -18,7 +18,6 @@ limitations under the License. package trait import ( - "errors" "reflect" "github.com/apache/camel-k/pkg/apis/camel/v1alpha1" @@ -31,7 +30,6 @@ import ( type routeTrait struct { BaseTrait`property:",squash"` - Auto *bool `property:"auto"` Host string `property:"host"` TLSTermination string `property:"tls-termination"` TLSCertificate string `property:"tls-certificate"` @@ -39,7 +37,8 @@ type routeTrait struct { TLSCACertificate string `property:"tls-ca-certificate"` TLSDestinationCACertificate string `property:"tls-destination-ca-certificate"` TLSInsecureEdgeTerminationPolicy string `property:"tls-insecure-edge-termination-policy"` - service *corev1.Service + + service *corev1.Service } func newRouteTrait() *routeTrait { @@ -57,15 +56,9 @@ func (t *routeTrait) Configure(e *Environment) (bool, error) { return false, nil } - if t.Auto == nil || *t.Auto { - t.service = t.getTargetService(e) - if t.service == nil { - return false, nil - } - } - + t.service = t.getTargetService(e) if t.service == nil { - return false, errors.New("cannot apply route trait: no target service") + return false, nil } return true, nil @@ -80,7 +73,9 @@ func (t *routeTrait) Apply(e *Environment) error { return nil } -func (t *routeTrait) getTargetService(e *Environment) (service *corev1.Service) { +func (t *routeTrait) getTargetService(e *Environment) *corev1.Service { + var service *corev1.Service + e.Resources.VisitService(func(s *corev1.Service) { if s.ObjectMeta.Labels != nil { if s.ObjectMeta.Labels["camel.apache.org/integration"] == e.Integration.Name && @@ -92,7 +87,8 @@ func (t *routeTrait) getTargetService(e *Environment) (service *corev1.Service) } } }) - return + + return service } func (t *routeTrait) getRouteFor(service *corev1.Service) *routev1.Route { diff --git a/pkg/trait/route_test.go b/pkg/trait/route_test.go index ca45334..48310fd 100644 --- a/pkg/trait/route_test.go +++ b/pkg/trait/route_test.go @@ -21,6 +21,8 @@ import ( "context" "testing" + "github.com/rs/xid" + "github.com/scylladb/go-set/strset" "github.com/apache/camel-k/pkg/apis/camel/v1alpha1" @@ -34,7 +36,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) -func createTestRouteEnvironment(t *testing.T) *Environment { +func createTestRouteEnvironment(t *testing.T, name string) *Environment { catalog, err := test.DefaultCatalog() assert.Nil(t, err) @@ -43,7 +45,7 @@ func createTestRouteEnvironment(t *testing.T) *Environment { Catalog: NewCatalog(context.TODO(), nil), Integration: &v1alpha1.Integration{ ObjectMeta: metav1.ObjectMeta{ - Name: "test-i", + Name: name, Namespace: "test-ns", }, Status: v1alpha1.IntegrationStatus{ @@ -68,31 +70,34 @@ func createTestRouteEnvironment(t *testing.T) *Environment { EnvVars:make([]corev1.EnvVar, 0), ExecutedTraits: make([]Trait, 0), Classpath: strset.New(), - Resources: kubernetes.NewCollection(&corev1.Service{ - TypeMeta: metav1.TypeMeta{ - Kind: "Service", - APIVersion: "v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "test-i", - Namespace: "test-ns", -
[camel-quarkus] branch master updated (2d55cf0 -> 92df3bc)
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git. from 2d55cf0 Add .travis.yml new 0e81778 Add Camel Extensions new d611f73 Increase timeout new a0bf50e Add artifact names for Camel artifacts new ac251cd Camel - Fix typos and a warning new 7af04d3 Camel - Add FeatureBuildItems for all the Camel components new 480ce3a Switch to version 999-SNAPSHOT Remove occurrence of the version in code snippet Make the gradle plugin "ready" for release new be3e0ee Reorganize packages to have proper API packages new d8025be Remove -deployment suffix from artifacts new 983ed8f Merge pull request #1248 from stuartwdouglas/artifact-rename new e89354c Merge branch 'master' into features/pom-pom-pom new 64bcced Finalize the migration to application.properties new ee66069 Fixes #1385 - Camel Integration tests: Both camel-core and camel-salesforce Integration test don't compile new 7ba8aa2 camel: enable integration tests new cebfcfe Get Camel Salesforce and Infinispan working in native mode new 6674b0b camel: fix broken indexing introduced by camel-core split new b0e3c1e Camel - Use a constant for Camel root package directory new a1813a1 Do not force the creation of the jaxb context if not in native mode new 1fc2f8a Merge pull request #1467 from gnodet/camel-improvement new 48ba791 Fixes #1469 Add Extension for Camel-AWS S3 new 60495a3 Disable native build for camel components new cf6c6d1 Bootstrap dependency resolver and classpath setup for the tests and dev mode new 85c9eaf Reformat quarkus-camel pom properly new 429d9f2 Add missing quarkus-jaxb dependency new 2a50bb6 Add the quarkus-caffeine dependencies to quarkus-camel new 7f627fa Remove quarkus-caffeine dependency from Camel integration tests new 8df9287 Replace CamelRuntimeProducer with RuntimeBeanBuildItem new 982f3f9 Simplify RuntimeBeanBuildItem - make it possible to use RuntimeValue new 1697ff9 Merge pull request #1682 from mkouba/issue-1672-camel-producer-unremovable new 038b1c5 Simple hot replacement setup for camel new dcebf09 Add back support for initializing routes at build time and support for hot reloading the xml routes new b191fe9 Add events around CamelRuntime lifecycle new 2e8955e Make jaxb an opt-in extension and allow disabling it in camel new 9c4aa7c Add a flag to partially disable xml support in camel and trim down the native binary size new 973d88b Fix NPE when using deferInitPhase new 5087d0c Add a easier way to customize properties new 293afb2 Remove retained references to private java.lang.Object.registerNatives / java.lang.reflect.Proxy.defineClass0 methods new 32ce28c Add producers for CamelContext, Registry and configs new ab445e8 Make sure CamelProducers is unremovable new acd6980 Fix the version of commons-lang3 in the bom and remove exclusions new 64b87fa Merge remote-tracking branch 'origin/master' into camel-m2 new 8fc190a Fix usage of class not available in Java 9+ new 7b1d7bf Rename bootstrap-maven-plugin to quarkus-bootstrap-maven-plugin new 5d7eeba Merge pull request #1800 from gsmet/rename-bootstrap-plugin new 3b2881a changed groupId of bootstrap from io.quarkus.bootstrap to io.quarkus new 75f518d Fix an Eclipse JDT specific compilation error new 03b9640 io.quarkus.it packages prefix for integration-tests module new 3dc2b31 org.jboss.builder package rename to io.quarkus.builder new d4dfccb Add support for Amazon lambda tests new 3dd748c Do not duplicate managed version of slf4j-jboss-logging new 0333ba9 Fix WeakCache substitution on JDK8 + JDK11, fixes #2207 new 936f05f Possible NPE in camel extension, fixes #2273 new 77ba329 Merge pull request #2278 from gnodet/fix-2273 new 1e0b94a Make sure version is available for Camel, fixes #1807 new a896fb9 Camel extension is too verbose on default log level, fixes #2233 new c53f96b Merge pull request #2310 from gnodet/fix-2233 new 962781f Fix #2346 CamelConfig.BuildTime.disableJaxb and disableXml need defaults new 327d7dd Fix #2347 Still: Could not find field com.sun.beans.WeakCache.map on class com.sun.beans.WeakCache new ac413f1 Disable CamelInfinispanITCase see #2351 new 4e7b2d5 Activate camel-core integration tests via -Dnative new 63af733 Fixes #2537 Add Extension for Camel-AWS-SQS new 7a4a556 Fix env variable substitution, fixes #2525 new 7508310 Merge pull request #2541 from gnodet/fix-2525 new 1d5d3ed Rename HotDeploymentConfigFileBuildItem new 3474d4a Merge pull request #2580 from mkouba/issue-2574-hotdeploybuilditem new 3c0131d Merge pull request #2
[camel-k] branch master updated: chore(travis): disable e2e
This is an automated email from the ASF dual-hosted git repository. nferraro pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel-k.git The following commit(s) were added to refs/heads/master by this push: new fbd3d7f chore(travis): disable e2e fbd3d7f is described below commit fbd3d7fcbd7992ecb19d20211b6f1c2ad7d43d8f Author: lburgazzoli AuthorDate: Mon Jul 1 20:39:52 2019 +0200 chore(travis): disable e2e --- script/travis_build.sh | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/script/travis_build.sh b/script/travis_build.sh index 619a975..927e141 100755 --- a/script/travis_build.sh +++ b/script/travis_build.sh @@ -83,4 +83,8 @@ echo "installing camel k cluster resources" oc login -u developer # Then run integration tests -make test-integration +# TODO: disabled as they are constantly failing on travis +# make test-integration + +# Run unit tests +make test
buildbot failure in on camel-site-production
The Buildbot has detected a new failure on builder camel-site-production while building . Full details are available at: https://ci.apache.org/builders/camel-site-production/builds/35014 Buildbot URL: https://ci.apache.org/ Buildslave for this Build: bb-cms-slave Build Reason: The Nightly scheduler named 'camel-site-production' triggered this build Build Source Stamp: [branch camel/website] HEAD Blamelist: BUILD FAILED: failed compile Sincerely, -The Buildbot
buildbot success in on camel-site-production
The Buildbot has detected a restored build on builder camel-site-production while building . Full details are available at: https://ci.apache.org/builders/camel-site-production/builds/35015 Buildbot URL: https://ci.apache.org/ Buildslave for this Build: bb-cms-slave Build Reason: The Nightly scheduler named 'camel-site-production' triggered this build Build Source Stamp: [branch camel/website] HEAD Blamelist: Build succeeded! Sincerely, -The Buildbot
[camel-k] 01/02: chore(ci): add verbose mode to prevent travis killing the job
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.git commit 4eef1985c0569910acd1057fbfc4131138ce5565 Author: nferraro AuthorDate: Wed Jun 26 15:09:58 2019 +0200 chore(ci): add verbose mode to prevent travis killing the job --- script/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/Makefile b/script/Makefile index 143a3b8..ffede83 100644 --- a/script/Makefile +++ b/script/Makefile @@ -101,7 +101,7 @@ test: build go test ./... test-integration: build - go test ./... -tags=integration + go test -v ./... -tags=integration build-operator: go build $(GOFLAGS) -o camel-k ./cmd/manager/*.go
[camel-k] branch master updated (fbd3d7f -> c802219)
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/camel-k.git. from fbd3d7f chore(travis): disable e2e new 4eef198 chore(ci): add verbose mode to prevent travis killing the job new c802219 chore(ci): constrain dir The 2 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: script/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
[camel-k] 02/02: chore(ci): constrain dir
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.git commit c802219fc02378de4c628d61b022fe45d63006ab Author: nferraro AuthorDate: Thu Jun 27 13:05:45 2019 +0200 chore(ci): constrain dir --- script/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/Makefile b/script/Makefile index ffede83..61d346c 100644 --- a/script/Makefile +++ b/script/Makefile @@ -101,7 +101,7 @@ test: build go test ./... test-integration: build - go test -v ./... -tags=integration + go test -v ./e2e/... -tags=integration build-operator: go build $(GOFLAGS) -o camel-k ./cmd/manager/*.go
[camel-k-runtime] 05/13: checkstyle: fix camel-k-runtime-yaml violations
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 commit ab0461e31f9c781e82898c19f44961df49209b50 Author: lburgazzoli AuthorDate: Tue Jun 25 13:38:38 2019 +0200 checkstyle: fix camel-k-runtime-yaml violations --- .../src/main/java/org/apache/camel/k/yaml/Yaml.java | 3 +++ .../src/main/java/org/apache/camel/k/yaml/model/Definitions.java| 6 +++--- .../main/java/org/apache/camel/k/yaml/parser/ChoiceStepParser.java | 2 +- .../src/main/java/org/apache/camel/k/yaml/parser/StepParser.java| 1 + 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/camel-k-runtime-yaml/src/main/java/org/apache/camel/k/yaml/Yaml.java b/camel-k-runtime-yaml/src/main/java/org/apache/camel/k/yaml/Yaml.java index 294002e..b4e1d8c 100644 --- a/camel-k-runtime-yaml/src/main/java/org/apache/camel/k/yaml/Yaml.java +++ b/camel-k-runtime-yaml/src/main/java/org/apache/camel/k/yaml/Yaml.java @@ -40,6 +40,9 @@ import org.apache.camel.model.ProcessorDefinition; public final class Yaml { public static final ObjectMapper MAPPER = mapper(); +private Yaml() { +} + public static ObjectMapper mapper() { YAMLFactory yamlFactory = new YAMLFactory() .configure(YAMLGenerator.Feature.MINIMIZE_QUOTES, true) diff --git a/camel-k-runtime-yaml/src/main/java/org/apache/camel/k/yaml/model/Definitions.java b/camel-k-runtime-yaml/src/main/java/org/apache/camel/k/yaml/model/Definitions.java index 2996adb..f1ffebf 100644 --- a/camel-k-runtime-yaml/src/main/java/org/apache/camel/k/yaml/model/Definitions.java +++ b/camel-k-runtime-yaml/src/main/java/org/apache/camel/k/yaml/model/Definitions.java @@ -31,8 +31,8 @@ import org.apache.camel.model.language.ExpressionDefinition; import org.apache.commons.io.IOUtils; public final class Definitions { -public static Map> DATA_FORMATS_MAP = dataFormatDefinition(); -public static Map> EXPRESSIONS_MAP = expressionDefinition(); +public static final Map> DATA_FORMATS_MAP = dataFormatDefinition(); +public static final Map> EXPRESSIONS_MAP = expressionDefinition(); private Definitions() { } @@ -74,7 +74,7 @@ public final class Definitions { } } } -} catch (IOException|NoClassDefFoundError|ClassNotFoundException e) { +} catch (IOException | NoClassDefFoundError | ClassNotFoundException e) { throw new IllegalArgumentException(e); } diff --git a/camel-k-runtime-yaml/src/main/java/org/apache/camel/k/yaml/parser/ChoiceStepParser.java b/camel-k-runtime-yaml/src/main/java/org/apache/camel/k/yaml/parser/ChoiceStepParser.java index 8fb7190..e5759bd 100644 --- a/camel-k-runtime-yaml/src/main/java/org/apache/camel/k/yaml/parser/ChoiceStepParser.java +++ b/camel-k-runtime-yaml/src/main/java/org/apache/camel/k/yaml/parser/ChoiceStepParser.java @@ -29,7 +29,7 @@ public class ChoiceStepParser implements ProcessorStepParser { final Definition definition = context.node(Definition.class); final ChoiceDefinition choice = new ChoiceDefinition(); -StepParserSupport.notNull(definition.when,"when"); +StepParserSupport.notNull(definition.when, "when"); for (Definition.When whenDefinition : definition.when) { StepParserSupport.notNull(whenDefinition.getExpression(), "when.expression"); diff --git a/camel-k-runtime-yaml/src/main/java/org/apache/camel/k/yaml/parser/StepParser.java b/camel-k-runtime-yaml/src/main/java/org/apache/camel/k/yaml/parser/StepParser.java index e454d49..f84fa58 100644 --- a/camel-k-runtime-yaml/src/main/java/org/apache/camel/k/yaml/parser/StepParser.java +++ b/camel-k-runtime-yaml/src/main/java/org/apache/camel/k/yaml/parser/StepParser.java @@ -28,6 +28,7 @@ import org.apache.camel.util.ObjectHelper; public interface StepParser { String RESOURCE_PATH = "META-INF/services/org/apache/camel/k/yaml/"; +@SuppressWarnings("unchecked") static T lookup(CamelContext camelContext, Class type, String stepId) throws NoFactoryAvailableException { T converter = camelContext.getRegistry().lookupByNameAndType(stepId, type); if (converter == null) {
[camel-k-runtime] 02/13: chore(license): exclude MyRoutesWithPackage from license check as it triggers a bug in the underliyng java compiler
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 commit 88524875956aa8c93daa058780284c7dc331aa91 Author: lburgazzoli AuthorDate: Tue Jun 25 13:26:22 2019 +0200 chore(license): exclude MyRoutesWithPackage from license check as it triggers a bug in the underliyng java compiler --- .../src/test/resources/MyRoutesWithPackage.java | 16 pom.xml | 1 + 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/camel-k-runtime-jvm/src/test/resources/MyRoutesWithPackage.java b/camel-k-runtime-jvm/src/test/resources/MyRoutesWithPackage.java index ca3d609..714c2de 100644 --- a/camel-k-runtime-jvm/src/test/resources/MyRoutesWithPackage.java +++ b/camel-k-runtime-jvm/src/test/resources/MyRoutesWithPackage.java @@ -1,19 +1,3 @@ -/* - * 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 my.roytes; import org.apache.camel.builder.RouteBuilder; diff --git a/pom.xml b/pom.xml index 90ff1cc..9d1775a 100644 --- a/pom.xml +++ b/pom.xml @@ -414,6 +414,7 @@ .mvn/** mvnw* **/META-INF/persistence*.xsd +**/MyRoutesWithPackage.java SLASHSTAR_STYLE
[camel-k-runtime] branch master updated (d826830 -> 35aed72)
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/camel-k-runtime.git. from d826830 Fix findings new d70284c Add license format tool and amend license to use the same style as camel 3.x #86 new 8852487 chore(license): exclude MyRoutesWithPackage from license check as it triggers a bug in the underliyng java compiler new 513120d Add checstyle #87 new 50adeda chekstyle(license): fix violations new ab0461e checkstyle: fix camel-k-runtime-yaml violations new 9d4efee checkstyle: fix camel-k-runtime-servlet violations new 3ef7223 checkstyle: fix camel-k-runtime-jvm violations new f1e9b6c checkstyle: fix camel-k-runtime-health violations new bcb74a2 checkstyle: fix camel-k-runtime-core violations new 9626991 checkstyle: fix camel-k-maven-plugin violations new 2db4d99 checkstyle: fix camel-knative-http violations new 40cb5f6 checkstyle: fix camel-knative violations new 35aed72 chore(build): enable checkstyle in jenkins and travis The 13 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: .travis.yml| 5 +- Jenkinsfile| 2 +- .../camel/k/tooling/maven/GenerateCatalogMojo.java | 2 +- .../tooling/maven/GenerateDependencyListMojo.java | 2 +- .../camel/k/tooling/maven/GenerateRestXML.java | 2 +- .../camel/k/tooling/maven/GenerateSupport.java | 2 +- .../camel/k/tooling/maven/model/Artifact.java | 7 +- .../camel/k/tooling/maven/model/CamelArtifact.java | 2 +- .../camel/k/tooling/maven/model/CamelScheme.java | 8 +- .../maven/model/CatalogComponentDefinition.java| 16 .../maven/model/CatalogDataFormatDefinition.java | 16 .../maven/model/CatalogLanguageDefinition.java | 16 .../k/tooling/maven/model/CatalogProcessor.java| 2 +- .../k/tooling/maven/model/CatalogSupport.java | 2 +- .../k/tooling/maven/model/crd/CamelCatalog.java| 2 +- .../tooling/maven/model/crd/CamelCatalogSpec.java | 2 +- .../k/tooling/maven/model/k8s/ObjectMeta.java | 2 +- .../camel/k/tooling/maven/model/k8s/TypeMeta.java | 2 +- ...gProcessor_3_x.java => CatalogProcessor3x.java} | 4 +- ...he.camel.k.tooling.maven.model.CatalogProcessor | 2 +- .../processors/AbstractCataloProcessorTest.java| 5 +- .../maven/processors/CatalogProcessor3Test.java| 27 +++--- camel-k-runtime-bom/pom.xml| 49 ++ .../main/java/org/apache/camel/k/Constants.java| 2 +- .../java/org/apache/camel/k/ContextCustomizer.java | 4 +- .../main/java/org/apache/camel/k/RoutesLoader.java | 2 +- .../src/main/java/org/apache/camel/k/Runtime.java | 2 +- .../src/main/java/org/apache/camel/k/Source.java | 17 ++-- .../camel/k/listener/AbstractPhaseListener.java| 4 +- .../apache/camel/k/listener/ContextConfigurer.java | 2 +- .../apache/camel/k/listener/RoutesConfigurer.java | 2 +- .../org/apache/camel/k/listener/RoutesDumper.java | 2 +- .../apache/camel/k/support/PropertiesSupport.java | 19 ++-- .../org/apache/camel/k/support/RuntimeSupport.java | 27 +++--- .../org/apache/camel/k/support/URIResolver.java| 12 ++- .../org/apache/camel/k/support/NameCustomizer.java | 2 +- .../apache/camel/k/support/RuntimeSupportTest.java | 6 +- .../src/test/resources/log4j2-test.xml | 18 .../src/main/resources/application.properties | 16 .../src/main/resources/routes.groovy | 17 +++- .../src/main/resources/application.properties | 16 .../src/main/resources/routes.groovy | 17 +++- .../src/main/resources/application.properties | 16 .../src/main/resources/routes.yaml | 2 +- .../camel/k/groovy/GroovyRoutesLoader.groovy | 4 +- .../k/groovy/dsl/ComponentConfiguration.groovy | 4 +- .../k/groovy/dsl/ComponentsConfiguration.groovy| 4 +- .../camel/k/groovy/dsl/ContextConfiguration.groovy | 4 +- .../k/groovy/dsl/IntegrationConfiguration.groovy | 4 +- .../k/groovy/dsl/RegistryConfiguration.groovy | 4 +- .../camel/k/groovy/dsl/RestConfiguration.groovy| 4 +- .../groovy/extension/LogComponentExtension.groovy | 4 +- .../org/apache/camel/k/groovy/LoaderTest.groovy| 2 +- .../camel/k/groovy/dsl/IntegrationTest.groovy | 4 +- .../k/groovy/dsl/extension/LogExtensionTest.groovy | 4 +- .../src/test/resources/log4j2-test.xml | 18 .../src/test/resources/routes-with-bindings.groovy | 16 .../routes-with-component-configuration.groovy | 16 .../src/test/resources/r
[camel-k-runtime] 04/13: chekstyle(license): fix violations
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 commit 50adeda2269edaa7376c0cebb7cc10fbbc044240 Author: lburgazzoli AuthorDate: Tue Jun 25 13:33:59 2019 +0200 chekstyle(license): fix violations --- .../camel-k-runtime-example-health/src/main/resources/routes.groovy| 3 +-- .../camel-k-runtime-example-servlet/src/main/resources/routes.groovy | 3 +-- .../main/groovy/org/apache/camel/k/groovy/GroovyRoutesLoader.groovy| 2 +- .../groovy/org/apache/camel/k/groovy/dsl/ComponentConfiguration.groovy | 2 +- .../org/apache/camel/k/groovy/dsl/ComponentsConfiguration.groovy | 2 +- .../groovy/org/apache/camel/k/groovy/dsl/ContextConfiguration.groovy | 2 +- .../org/apache/camel/k/groovy/dsl/IntegrationConfiguration.groovy | 2 +- .../groovy/org/apache/camel/k/groovy/dsl/RegistryConfiguration.groovy | 2 +- .../main/groovy/org/apache/camel/k/groovy/dsl/RestConfiguration.groovy | 2 +- .../org/apache/camel/k/groovy/extension/LogComponentExtension.groovy | 2 +- .../src/test/groovy/org/apache/camel/k/groovy/LoaderTest.groovy| 2 +- .../test/groovy/org/apache/camel/k/groovy/dsl/IntegrationTest.groovy | 2 +- .../org/apache/camel/k/groovy/dsl/extension/LogExtensionTest.groovy| 2 +- camel-k-runtime-groovy/src/test/resources/routes-with-bindings.groovy | 2 +- .../src/test/resources/routes-with-component-configuration.groovy | 2 +- camel-k-runtime-groovy/src/test/resources/routes-with-rest.groovy | 3 +-- camel-k-runtime-groovy/src/test/resources/routes.groovy| 3 +-- .../src/test/groovy/org/apache/camel/k/yaml/RouteDefinitionTest.groovy | 2 +- .../src/test/groovy/org/apache/camel/k/yaml/RouteTest.groovy | 2 +- .../src/test/groovy/org/apache/camel/k/yaml/TestSupport.groovy | 2 +- .../src/test/groovy/org/apache/camel/k/yaml/parser/ChoiceTest.groovy | 2 +- .../test/groovy/org/apache/camel/k/yaml/parser/ClaimCheckTest.groovy | 2 +- .../test/groovy/org/apache/camel/k/yaml/parser/ConvertBodyTest.groovy | 2 +- .../src/test/groovy/org/apache/camel/k/yaml/parser/DelayTest.groovy| 2 +- .../groovy/org/apache/camel/k/yaml/parser/DynamicRouterTest.groovy | 2 +- .../src/test/groovy/org/apache/camel/k/yaml/parser/FilterTest.groovy | 2 +- .../src/test/groovy/org/apache/camel/k/yaml/parser/FromTest.groovy | 2 +- .../src/test/groovy/org/apache/camel/k/yaml/parser/LogTest.groovy | 2 +- .../src/test/groovy/org/apache/camel/k/yaml/parser/MarshalTest.groovy | 2 +- .../src/test/groovy/org/apache/camel/k/yaml/parser/PipelineTest.groovy | 2 +- .../src/test/groovy/org/apache/camel/k/yaml/parser/ProcessTest.groovy | 2 +- .../test/groovy/org/apache/camel/k/yaml/parser/RemoveHeaderTest.groovy | 2 +- .../groovy/org/apache/camel/k/yaml/parser/RemoveHeadersTest.groovy | 2 +- .../groovy/org/apache/camel/k/yaml/parser/RemovePropertiesTest.groovy | 2 +- .../groovy/org/apache/camel/k/yaml/parser/RemovePropertyTest.groovy| 2 +- .../src/test/groovy/org/apache/camel/k/yaml/parser/RestTest.groovy | 2 +- .../src/test/groovy/org/apache/camel/k/yaml/parser/SetBodyTest.groovy | 2 +- .../test/groovy/org/apache/camel/k/yaml/parser/SetHeaderTest.groovy| 2 +- .../test/groovy/org/apache/camel/k/yaml/parser/SetPropertyTest.groovy | 2 +- .../src/test/groovy/org/apache/camel/k/yaml/parser/SplitTest.groovy| 2 +- .../test/groovy/org/apache/camel/k/yaml/parser/ToDynamicTest.groovy| 2 +- .../src/test/groovy/org/apache/camel/k/yaml/parser/ToTest.groovy | 2 +- .../test/groovy/org/apache/camel/k/yaml/parser/UnmarshalTest.groovy| 2 +- pom.xml| 1 + 44 files changed, 44 insertions(+), 47 deletions(-) diff --git a/camel-k-runtime-examples/camel-k-runtime-example-health/src/main/resources/routes.groovy b/camel-k-runtime-examples/camel-k-runtime-example-health/src/main/resources/routes.groovy index ebfb2f5..452b215 100644 --- a/camel-k-runtime-examples/camel-k-runtime-example-health/src/main/resources/routes.groovy +++ b/camel-k-runtime-examples/camel-k-runtime-example-health/src/main/resources/routes.groovy @@ -1,4 +1,4 @@ -/** +/* * 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. @@ -15,7 +15,6 @@ * limitations under the License. */ - from('servlet:/test') .convertBodyTo(String.class) .to('log:info') \ No newline at end of file diff --git a/camel-k-runtime-examples/camel-k-runtime-example-servlet/src/main/resources/routes.groovy b/camel-k-runtime-examples/camel-k-runtime-example-servlet/src/main/resources/routes.groovy index ebfb2f5..452b215 100644 --- a/camel-k-runtime-examples/camel-k-runtime-example-servlet/src/m
[camel-k-runtime] 11/13: checkstyle: fix camel-knative-http violations
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 commit 2db4d99c7802cf7f480820b009cf98554cff Author: lburgazzoli AuthorDate: Tue Jun 25 14:15:34 2019 +0200 checkstyle: fix camel-knative-http violations --- .../org/apache/camel/component/knative/http/KnativeHttpMain.java | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/camel-knative-http/src/test/java/org/apache/camel/component/knative/http/KnativeHttpMain.java b/camel-knative-http/src/test/java/org/apache/camel/component/knative/http/KnativeHttpMain.java index 194de9d..5333a58 100644 --- a/camel-knative-http/src/test/java/org/apache/camel/component/knative/http/KnativeHttpMain.java +++ b/camel-knative-http/src/test/java/org/apache/camel/component/knative/http/KnativeHttpMain.java @@ -19,7 +19,10 @@ package org.apache.camel.component.knative.http; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.impl.DefaultCamelContext; -public class KnativeHttpMain { +public final class KnativeHttpMain { +private KnativeHttpMain() { +} + public static void main(String[] args) throws Exception { DefaultCamelContext context = new DefaultCamelContext();
[camel-k-runtime] 10/13: checkstyle: fix camel-k-maven-plugin violations
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 commit 9626991d6a4d10a4e8121de143c15d83f8c503de Author: lburgazzoli AuthorDate: Tue Jun 25 14:13:29 2019 +0200 checkstyle: fix camel-k-maven-plugin violations --- .../camel/k/tooling/maven/model/Artifact.java | 5 +++-- .../camel/k/tooling/maven/model/CamelScheme.java | 6 +++--- ...gProcessor_3_x.java => CatalogProcessor3x.java} | 2 +- ...he.camel.k.tooling.maven.model.CatalogProcessor | 2 +- .../processors/AbstractCataloProcessorTest.java| 2 +- .../maven/processors/CatalogProcessor3Test.java| 24 +++--- 6 files changed, 21 insertions(+), 20 deletions(-) diff --git a/camel-k-maven-plugin/src/main/java/org/apache/camel/k/tooling/maven/model/Artifact.java b/camel-k-maven-plugin/src/main/java/org/apache/camel/k/tooling/maven/model/Artifact.java index 12235f2..86ce6eb 100644 --- a/camel-k-maven-plugin/src/main/java/org/apache/camel/k/tooling/maven/model/Artifact.java +++ b/camel-k-maven-plugin/src/main/java/org/apache/camel/k/tooling/maven/model/Artifact.java @@ -56,8 +56,9 @@ public class Artifact { return false; } Artifact artifact = (Artifact) o; -return Objects.equals(groupId, artifact.groupId) && -Objects.equals(artifactId, artifact.artifactId); + +return Objects.equals(groupId, artifact.groupId) +&& Objects.equals(artifactId, artifact.artifactId); } @Override diff --git a/camel-k-maven-plugin/src/main/java/org/apache/camel/k/tooling/maven/model/CamelScheme.java b/camel-k-maven-plugin/src/main/java/org/apache/camel/k/tooling/maven/model/CamelScheme.java index cc568af..51c0227 100644 --- a/camel-k-maven-plugin/src/main/java/org/apache/camel/k/tooling/maven/model/CamelScheme.java +++ b/camel-k-maven-plugin/src/main/java/org/apache/camel/k/tooling/maven/model/CamelScheme.java @@ -59,9 +59,9 @@ public class CamelScheme { return false; } CamelScheme scheme = (CamelScheme) o; -return isHttp() == scheme.isHttp() && -isPassive() == scheme.isPassive() && -Objects.equals(getId(), scheme.getId()); +return isHttp() == scheme.isHttp() +&& isPassive() == scheme.isPassive() +&& Objects.equals(getId(), scheme.getId()); } @Override diff --git a/camel-k-maven-plugin/src/main/java/org/apache/camel/k/tooling/maven/processors/CatalogProcessor_3_x.java b/camel-k-maven-plugin/src/main/java/org/apache/camel/k/tooling/maven/processors/CatalogProcessor3x.java similarity index 99% rename from camel-k-maven-plugin/src/main/java/org/apache/camel/k/tooling/maven/processors/CatalogProcessor_3_x.java rename to camel-k-maven-plugin/src/main/java/org/apache/camel/k/tooling/maven/processors/CatalogProcessor3x.java index 37271a5..8d21e7f 100644 --- a/camel-k-maven-plugin/src/main/java/org/apache/camel/k/tooling/maven/processors/CatalogProcessor_3_x.java +++ b/camel-k-maven-plugin/src/main/java/org/apache/camel/k/tooling/maven/processors/CatalogProcessor3x.java @@ -26,7 +26,7 @@ import org.apache.camel.k.tooling.maven.model.CamelArtifact; import org.apache.camel.k.tooling.maven.model.CatalogProcessor; import org.apache.maven.project.MavenProject; -public class CatalogProcessor_3_x implements CatalogProcessor { +public class CatalogProcessor3x implements CatalogProcessor { private static final List KNOWN_HTTP_URIS = Arrays.asList( "ahc", "ahc-ws", diff --git a/camel-k-maven-plugin/src/main/resources/META-INF/services/org.apache.camel.k.tooling.maven.model.CatalogProcessor b/camel-k-maven-plugin/src/main/resources/META-INF/services/org.apache.camel.k.tooling.maven.model.CatalogProcessor index aa4e3bc..28059d1 100644 --- a/camel-k-maven-plugin/src/main/resources/META-INF/services/org.apache.camel.k.tooling.maven.model.CatalogProcessor +++ b/camel-k-maven-plugin/src/main/resources/META-INF/services/org.apache.camel.k.tooling.maven.model.CatalogProcessor @@ -15,4 +15,4 @@ # limitations under the License. # -org.apache.camel.k.tooling.maven.processors.CatalogProcessor_3_x +org.apache.camel.k.tooling.maven.processors.CatalogProcessor3x diff --git a/camel-k-maven-plugin/src/test/java/org/apache/camel/k/tooling/maven/processors/AbstractCataloProcessorTest.java b/camel-k-maven-plugin/src/test/java/org/apache/camel/k/tooling/maven/processors/AbstractCataloProcessorTest.java index 5b7da7a..84503be 100644 --- a/camel-k-maven-plugin/src/test/java/org/apache/camel/k/tooling/maven/processors/AbstractCataloProcessorTest.java +++ b/camel-k-maven-plugin/src/test/java/org/apache/camel/k/tooling/maven/processors/AbstractCataloProcessorTest.java @@ -20,7 +20,7 @@ import org.apache.camel.catalog.CamelCatalog; import org.apache.camel.catalog.DefaultCamelCatalog; public abstract class Abstr
[camel-k-runtime] 12/13: checkstyle: fix camel-knative violations
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 commit 40cb5f6d76c592364fe4f0dbb687b6d0d60d39f8 Author: lburgazzoli AuthorDate: Tue Jun 25 14:49:03 2019 +0200 checkstyle: fix camel-knative violations --- .../component/knative/KnativeEnvironment.java | 62 +++--- .../org/apache/camel/component/knative/ce/V01.java | 6 +-- .../org/apache/camel/component/knative/ce/V02.java | 6 +-- .../component/knative/CloudEventsV01Test.java | 24 - .../component/knative/CloudEventsV02Test.java | 26 - .../component/knative/KnativeComponentTest.java| 12 ++--- 6 files changed, 68 insertions(+), 68 deletions(-) diff --git a/camel-knative/src/main/java/org/apache/camel/component/knative/KnativeEnvironment.java b/camel-knative/src/main/java/org/apache/camel/component/knative/KnativeEnvironment.java index fffdf35..14e7b51 100644 --- a/camel-knative/src/main/java/org/apache/camel/component/knative/KnativeEnvironment.java +++ b/camel-knative/src/main/java/org/apache/camel/component/knative/KnativeEnvironment.java @@ -80,36 +80,36 @@ public class KnativeEnvironment { @SuppressWarnings("unchecked") private Optional lookup(Knative.Type type, String name) { - final String contextPath = StringHelper.after(name, "/"); - final String serviceName = (contextPath == null) ? name : StringHelper.before(name, "/"); - - return services.stream() - .filter(definition -> { - return Objects.equals(type.name(), definition.getMetadata().get(Knative.KNATIVE_TYPE)) - && Objects.equals(serviceName, definition.getName()); - }) - .map(definition -> { - // - // The context path set on the endpoint overrides the one - // eventually provided by the service definition. - // - if (contextPath != null) { - return new KnativeServiceDefinition( - definition.getType(), - definition.getProtocol(), - definition.getName(), - definition.getHost(), - definition.getPort(), - KnativeSupport.mergeMaps( - definition.getMetadata(), - Collections.singletonMap(Knative.SERVICE_META_PATH, "/" + contextPath) - ) - ); - } - - return definition; - }) - .findFirst(); +final String contextPath = StringHelper.after(name, "/"); +final String serviceName = (contextPath == null) ? name : StringHelper.before(name, "/"); + +return services.stream() +.filter(definition -> { +return Objects.equals(type.name(), definition.getMetadata().get(Knative.KNATIVE_TYPE)) +&& Objects.equals(serviceName, definition.getName()); +}) +.map(definition -> { +// +// The context path set on the endpoint overrides the one +// eventually provided by the service definition. +// +if (contextPath != null) { +return new KnativeServiceDefinition( +definition.getType(), +definition.getProtocol(), +definition.getName(), +definition.getHost(), +definition.getPort(), +KnativeSupport.mergeMaps( +definition.getMetadata(), + Collections.singletonMap(Knative.SERVICE_META_PATH, "/" + contextPath) +) +); +} + +return definition; +}) +.findFirst(); } @@ -178,7 +178,7 @@ public class KnativeEnvironment { // @SuppressWarnings("unchecked") -public final static class KnativeServiceDefinition extends DefaultServiceDefinition { +public static final class KnativeServiceDefinition extends DefaultServiceDefinition { @JsonCreator public KnativeServiceDefinition( @JsonProperty(value = "type", required = true) Knative.Type type, diff --git a/camel-knative/src/main/java/org/apache/camel/component/knative/ce/V01.java b/camel-knative/src/main/java/org/apache/camel/component/knative/ce/V01.java index 703d099..6921e7c 100644 --- a/camel-knative/src/main/java/org/apache/camel/component/knative/ce/V01.java +++ b/camel-knative/src/main/java/org/apache/camel/component/knative/ce/V01.java @@ -35,9 +35,6 @@ import org.apache.commons.lang3.StringUtils; import static or
[camel-k-runtime] 06/13: checkstyle: fix camel-k-runtime-servlet violations
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 commit 9d4efee06512bac5f50e168ddd8cbf3ad6c63c33 Author: lburgazzoli AuthorDate: Tue Jun 25 13:41:14 2019 +0200 checkstyle: fix camel-k-runtime-servlet violations --- .../main/java/org/apache/camel/k/servlet/ServletEndpoint.java | 3 ++- .../java/org/apache/camel/k/servlet/ServletRegistration.java | 10 +- .../camel/k/servlet/ServletRegistrationContextCustomizer.java | 4 ++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/camel-k-runtime-servlet/src/main/java/org/apache/camel/k/servlet/ServletEndpoint.java b/camel-k-runtime-servlet/src/main/java/org/apache/camel/k/servlet/ServletEndpoint.java index d6d21d2..afff9a1 100644 --- a/camel-k-runtime-servlet/src/main/java/org/apache/camel/k/servlet/ServletEndpoint.java +++ b/camel-k-runtime-servlet/src/main/java/org/apache/camel/k/servlet/ServletEndpoint.java @@ -56,7 +56,8 @@ public class ServletEndpoint extends ServiceSupport { .setContextPath(path) .setDeploymentName("camel-k.war"); -context.getRegistry().findByType(ServletRegistration.class).forEach( r -> { +context.getRegistry().findByType(ServletRegistration.class) +.forEach(r -> { LOGGER.info("Registering servlet: {}", r); servletBuilder.addServlet( diff --git a/camel-k-runtime-servlet/src/main/java/org/apache/camel/k/servlet/ServletRegistration.java b/camel-k-runtime-servlet/src/main/java/org/apache/camel/k/servlet/ServletRegistration.java index 197267f..03d5dd2 100644 --- a/camel-k-runtime-servlet/src/main/java/org/apache/camel/k/servlet/ServletRegistration.java +++ b/camel-k-runtime-servlet/src/main/java/org/apache/camel/k/servlet/ServletRegistration.java @@ -72,10 +72,10 @@ public final class ServletRegistration { @Override public String toString() { -return "ServletRegistration{" + -"servlet=" + servlet + -", name='" + name + '\'' + -", mappings=" + mappings + -'}'; +return "ServletRegistration{" ++ "servlet=" + servlet ++ ", name='" + name + '\'' ++ ", mappings=" + mappings ++ '}'; } } diff --git a/camel-k-runtime-servlet/src/main/java/org/apache/camel/k/servlet/ServletRegistrationContextCustomizer.java b/camel-k-runtime-servlet/src/main/java/org/apache/camel/k/servlet/ServletRegistrationContextCustomizer.java index cca2fe6..274964c 100644 --- a/camel-k-runtime-servlet/src/main/java/org/apache/camel/k/servlet/ServletRegistrationContextCustomizer.java +++ b/camel-k-runtime-servlet/src/main/java/org/apache/camel/k/servlet/ServletRegistrationContextCustomizer.java @@ -28,11 +28,11 @@ public class ServletRegistrationContextCustomizer implements ContextCustomizer { private String path; private String camelServletName; -public ServletRegistrationContextCustomizer(){ +public ServletRegistrationContextCustomizer() { this(DEFAULT_PATH, DEFAULT_CAMEL_SERVLET_NAME); } -public ServletRegistrationContextCustomizer(String path, String camelServletName){ +public ServletRegistrationContextCustomizer(String path, String camelServletName) { this.path = path; this.camelServletName = camelServletName; }
[camel-k-runtime] 09/13: checkstyle: fix camel-k-runtime-core violations
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 commit bcb74a2bf1a2057746aac25ddb45e555469d763f Author: lburgazzoli AuthorDate: Tue Jun 25 14:08:51 2019 +0200 checkstyle: fix camel-k-runtime-core violations --- .../java/org/apache/camel/k/ContextCustomizer.java | 2 +- .../src/main/java/org/apache/camel/k/Source.java | 15 ++--- .../camel/k/listener/AbstractPhaseListener.java| 2 -- .../apache/camel/k/support/PropertiesSupport.java | 17 +++ .../org/apache/camel/k/support/RuntimeSupport.java | 25 +++--- .../org/apache/camel/k/support/URIResolver.java| 4 +++- .../apache/camel/k/support/RuntimeSupportTest.java | 4 ++-- 7 files changed, 33 insertions(+), 36 deletions(-) diff --git a/camel-k-runtime-core/src/main/java/org/apache/camel/k/ContextCustomizer.java b/camel-k-runtime-core/src/main/java/org/apache/camel/k/ContextCustomizer.java index bc74c65..e64b131 100644 --- a/camel-k-runtime-core/src/main/java/org/apache/camel/k/ContextCustomizer.java +++ b/camel-k-runtime-core/src/main/java/org/apache/camel/k/ContextCustomizer.java @@ -20,7 +20,7 @@ import org.apache.camel.CamelContext; import org.apache.camel.Ordered; @FunctionalInterface -public interface ContextCustomizer extends Ordered, Comparable{ +public interface ContextCustomizer extends Ordered, Comparable { /** * Perform CamelContext customization. * diff --git a/camel-k-runtime-core/src/main/java/org/apache/camel/k/Source.java b/camel-k-runtime-core/src/main/java/org/apache/camel/k/Source.java index 354d5b4..6f34870 100644 --- a/camel-k-runtime-core/src/main/java/org/apache/camel/k/Source.java +++ b/camel-k-runtime-core/src/main/java/org/apache/camel/k/Source.java @@ -22,7 +22,7 @@ import org.apache.camel.util.ObjectHelper; import org.apache.camel.util.URISupport; import org.apache.commons.lang3.StringUtils; -public class Source { +public final class Source { private final String name; private final String location; private final String language; @@ -53,18 +53,17 @@ public class Source { @Override public String toString() { -return "Source{" + -"location='" + location + '\'' + -", language=" + language + -", compressed=" + compressed + -'}'; +return "Source{" ++ "location='" + location + '\'' ++ ", language=" + language ++ " , compressed=" + compressed ++ '}'; } public static Source create(String uri) throws Exception { final String location = StringUtils.substringBefore(uri, "?"); -if (!location.startsWith(Constants.SCHEME_CLASSPATH) && -!location.startsWith(Constants.SCHEME_FILE)) { +if (!location.startsWith(Constants.SCHEME_CLASSPATH) && !location.startsWith(Constants.SCHEME_FILE)) { throw new IllegalArgumentException("No valid resource format, expected scheme:path, found " + uri); } diff --git a/camel-k-runtime-core/src/main/java/org/apache/camel/k/listener/AbstractPhaseListener.java b/camel-k-runtime-core/src/main/java/org/apache/camel/k/listener/AbstractPhaseListener.java index 43f7402..d39656b 100644 --- a/camel-k-runtime-core/src/main/java/org/apache/camel/k/listener/AbstractPhaseListener.java +++ b/camel-k-runtime-core/src/main/java/org/apache/camel/k/listener/AbstractPhaseListener.java @@ -17,8 +17,6 @@ package org.apache.camel.k.listener; import org.apache.camel.k.Runtime; -import org.apache.camel.CamelContext; -import org.apache.camel.k.ContextCustomizer; public abstract class AbstractPhaseListener implements Runtime.Listener { private final Runtime.Phase phase; 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 0380fe7..2bd59ca 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 @@ -59,18 +59,17 @@ public final class PropertiesSupport { .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(); +final String key = ((String)entry.getKey()).substring(prefix.length()); +final Object val = entry.getValue(); -try { -if (PropertyBindingSupport.bindProperty(context, target, key, val)) { -count.incrementAndGet(); -} -
[camel-k-runtime] 07/13: checkstyle: fix camel-k-runtime-jvm violations
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 commit 3ef7223c9013cb617813c9136a81862eb636ac34 Author: lburgazzoli AuthorDate: Tue Jun 25 13:51:59 2019 +0200 checkstyle: fix camel-k-runtime-jvm violations --- .../src/main/java/org/apache/camel/k/jvm/Application.java| 5 - .../src/main/java/org/apache/camel/k/jvm/ApplicationSupport.java | 4 ++-- .../main/java/org/apache/camel/k/jvm/loader/JavaSourceLoader.java| 2 +- .../src/main/java/org/apache/camel/k/jvm/loader/XmlLoader.java | 2 +- .../src/test/java/org/apache/camel/k/jvm/PropertiesTest.java | 4 ++-- .../test/java/org/apache/camel/k/jvm/RoutesLoadersCommonTest.java| 2 +- .../src/test/java/org/apache/camel/k/jvm/RuntimeTest.java| 4 ++-- pom.xml | 1 + 8 files changed, 14 insertions(+), 10 deletions(-) diff --git a/camel-k-runtime-jvm/src/main/java/org/apache/camel/k/jvm/Application.java b/camel-k-runtime-jvm/src/main/java/org/apache/camel/k/jvm/Application.java index d8bdce1..615a775 100644 --- a/camel-k-runtime-jvm/src/main/java/org/apache/camel/k/jvm/Application.java +++ b/camel-k-runtime-jvm/src/main/java/org/apache/camel/k/jvm/Application.java @@ -21,7 +21,7 @@ import java.util.ServiceLoader; import org.apache.camel.k.Runtime; import org.apache.camel.k.support.PropertiesSupport; -public class Application { +public final class Application { static { // // Configure the logging subsystem log4j2 using a subset of spring boot @@ -34,6 +34,9 @@ public class Application { ApplicationSupport.configureLogging(); } +private Application() { +} + public static void main(String[] args) throws Exception { ApplicationRuntime runtime = new ApplicationRuntime(); runtime.setProperties(PropertiesSupport.loadProperties()); diff --git a/camel-k-runtime-jvm/src/main/java/org/apache/camel/k/jvm/ApplicationSupport.java b/camel-k-runtime-jvm/src/main/java/org/apache/camel/k/jvm/ApplicationSupport.java index 5b260d4..05612d5 100644 --- a/camel-k-runtime-jvm/src/main/java/org/apache/camel/k/jvm/ApplicationSupport.java +++ b/camel-k-runtime-jvm/src/main/java/org/apache/camel/k/jvm/ApplicationSupport.java @@ -39,8 +39,8 @@ public final class ApplicationSupport { .filter(entry -> entry.getValue() instanceof String) .filter(entry -> ((String)entry.getKey()).startsWith(Constants.LOGGING_LEVEL_PREFIX)) .forEach(entry -> { -String key = ((String)entry.getKey()); -String val = ((String)entry.getValue()); +String key = (String)entry.getKey(); +String val = (String)entry.getValue(); String logger = key.substring(Constants.LOGGING_LEVEL_PREFIX.length()); Level level = Level.getLevel(val); diff --git a/camel-k-runtime-jvm/src/main/java/org/apache/camel/k/jvm/loader/JavaSourceLoader.java b/camel-k-runtime-jvm/src/main/java/org/apache/camel/k/jvm/loader/JavaSourceLoader.java index f049466..d040257 100644 --- a/camel-k-runtime-jvm/src/main/java/org/apache/camel/k/jvm/loader/JavaSourceLoader.java +++ b/camel-k-runtime-jvm/src/main/java/org/apache/camel/k/jvm/loader/JavaSourceLoader.java @@ -59,7 +59,7 @@ public class JavaSourceLoader implements RoutesLoader { RoutesBuilder builder = compiled.create().get(); if (builder instanceof RouteBuilder) { -RouteBuilder rb = ((RouteBuilder) builder); +RouteBuilder rb = (RouteBuilder) builder; rb.setContext(context); rb.configure(); diff --git a/camel-k-runtime-jvm/src/main/java/org/apache/camel/k/jvm/loader/XmlLoader.java b/camel-k-runtime-jvm/src/main/java/org/apache/camel/k/jvm/loader/XmlLoader.java index d1ddd46..e6be1a8 100644 --- a/camel-k-runtime-jvm/src/main/java/org/apache/camel/k/jvm/loader/XmlLoader.java +++ b/camel-k-runtime-jvm/src/main/java/org/apache/camel/k/jvm/loader/XmlLoader.java @@ -64,7 +64,7 @@ public class XmlLoader implements RoutesLoader { LOGGER.debug("Loaded {} rests from {}", definition.getRests().size(), source); setRestCollection(definition); -} catch(IllegalArgumentException e) { +} catch (IllegalArgumentException e) { // ignore } catch (UnmarshalException e) { LOGGER.debug("Unable to load RestsDefinition: {}", e.getMessage()); diff --git a/camel-k-runtime-jvm/src/test/java/org/apache/camel/k/jvm/PropertiesTest.java b/camel-k-runtime-jvm/src/test/java/org/apache/camel/k/jvm/PropertiesTest.java index db3f36d..43cbed8 100644 --- a
[camel-k-runtime] 13/13: chore(build): enable checkstyle in jenkins and travis
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 commit 35aed72e2078e9b3aaacdb6afba94377b83b34ad Author: lburgazzoli AuthorDate: Tue Jun 25 14:54:21 2019 +0200 chore(build): enable checkstyle in jenkins and travis --- .travis.yml | 5 +++-- Jenkinsfile | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index def5998..e17473a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,6 +17,7 @@ # limitations under the License. # language: java - +jdk: + - openjdk8 script: - - ./mvnw clean install + - ./mvnw clean install -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -Dcheckstyle.failOnViolation=true -Psourcecheck diff --git a/Jenkinsfile b/Jenkinsfile index 02a8244..0c74fc0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -43,7 +43,7 @@ pipeline { stages { stage('Test & Install') { steps { -sh "./mvnw $MAVEN_PARAMS clean install -f pom.xml" +sh "./mvnw $MAVEN_PARAMS clean install -Dcheckstyle.failOnViolation=true -Psourcecheck -f pom.xml" } }
[camel-k-runtime] 08/13: checkstyle: fix camel-k-runtime-health violations
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 commit f1e9b6c9fc129467ba4e0085f1f87d75550645b8 Author: lburgazzoli AuthorDate: Tue Jun 25 13:58:17 2019 +0200 checkstyle: fix camel-k-runtime-health violations --- .../src/main/java/org/apache/camel/k/health/HealthEndpoint.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/camel-k-runtime-health/src/main/java/org/apache/camel/k/health/HealthEndpoint.java b/camel-k-runtime-health/src/main/java/org/apache/camel/k/health/HealthEndpoint.java index 57e449e..233e895 100644 --- a/camel-k-runtime-health/src/main/java/org/apache/camel/k/health/HealthEndpoint.java +++ b/camel-k-runtime-health/src/main/java/org/apache/camel/k/health/HealthEndpoint.java @@ -40,7 +40,7 @@ public class HealthEndpoint extends HttpServlet { resp.setContentLength(2); resp.setStatus(HttpServletResponse.SC_OK); -try(PrintWriter writer = resp.getWriter()) { +try (PrintWriter writer = resp.getWriter()) { writer.write("OK"); } @@ -49,7 +49,7 @@ public class HealthEndpoint extends HttpServlet { resp.setContentLength(2); resp.setStatus(HttpServletResponse.SC_SERVICE_UNAVAILABLE); -try(PrintWriter writer = resp.getWriter()) { +try (PrintWriter writer = resp.getWriter()) { writer.write("KO"); } }
[camel-k-runtime] 03/13: Add checstyle #87
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 commit 513120d67e0920e2289a338877caee7b9319364b Author: lburgazzoli AuthorDate: Tue Jun 25 13:30:18 2019 +0200 Add checstyle #87 --- pom.xml | 53 + 1 file changed, 53 insertions(+) diff --git a/pom.xml b/pom.xml index 9d1775a..a1238dd 100644 --- a/pom.xml +++ b/pom.xml @@ -64,6 +64,8 @@ 0.3.1 1.6.0 3.0 + 3.0.0 +7.6.1 @@ -135,6 +137,46 @@ + +org.apache.maven.plugins +maven-checkstyle-plugin +${maven-checkstyle-plugin.version} + + +org.apache.camel +camel-buildtools +${camel.version} + + +com.puppycrawl.tools +checkstyle +${maven-checkstyle.version} + + + + +default-cli +validate + +false + camel-checkstyle.xml +true + ${checkstyle.failOnViolation} +false + camel-checkstyle-suppressions.xml +UTF-8 + + ${basedir}/src + + header-java.txt + **/*.java,**/*.groovy,**/*.scala,**/*.properties,**/*.xml,**/*.xsd + + +checkstyle + + + + @@ -437,5 +479,16 @@ + +sourcecheck + + + +org.apache.maven.plugins +maven-checkstyle-plugin + + + +
[camel] branch master updated: Add keys (#3010)
This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git The following commit(s) were added to refs/heads/master by this push: new 9ed3837 Add keys (#3010) 9ed3837 is described below commit 9ed3837ff5270b068b7dcb0d0a0ff239133229cf Author: Luca Burgazzoli AuthorDate: Tue Jul 2 08:04:25 2019 +0200 Add keys (#3010) --- KEYS | 58 ++ 1 file changed, 58 insertions(+) diff --git a/KEYS b/KEYS index b14983f..5099276 100644 --- a/KEYS +++ b/KEYS @@ -1713,3 +1713,61 @@ QAWziLTWM6opqckVEYs3bRwKwwKyJDiOA4fm7lxoPlyVf0fPqL6wKPBjNeKjDsUo SaGp =GGoO -END PGP PUBLIC KEY BLOCK- +pub rsa4096 2016-04-07 [SC] + 33E8BA5A41AB4B428475386137461E41A7B768D7 +uid [ unknown] Luca Burgazzoli +sig 337461E41A7B768D7 2016-04-07 Luca Burgazzoli +sub rsa4096 2016-04-07 [E] +sig 37461E41A7B768D7 2016-04-07 Luca Burgazzoli + +-BEGIN PGP PUBLIC KEY BLOCK- + +mQINBFcGZDsBEACm9YSFt0/qxZ9YO2pArHdfZWCENDLFWaK9/gJw0QBm75aEZVyE +Hmr6izJJanqzQR51TQljAPb4ZSmXxlLnPA57Ouo8RzhcogyAHO91juZD6ANfvGrC +LYnQxGGuAG+IYy3h9l2evZJecqOuS0qT6W36Zk8pGEhhFRJwgiih9sYKdkQmWJpf +vxWkfnqap8v1S71j57IkdIeZiCAOVFUZHGSqzT/aNUuc7JhBDWZuC0mte82UEPF7 +nL5ghJtDatBz/gXN9inic1NqT+LPQRc1xxavGVoLqChTSLHRZB4abm4KqTGG4h0g +Nzxc8RwT4lP150lYZIyeJtv5gZI/osfn/lrbjd7CDsb+XLU5Y7XCf0C32xWJVoHD +CArObpQ40J7gsHCrTom1cbs5vY7RQ7n2zUrmchcyIgN85Qv5qsVWjBTinmcJ2pRK +cG6AwAtZ23yE0dFX+1Qhmkusz9DQtEse7J5pQYsAb3ey8l7Ce112effJ/LO6hVu0 +GpTQDdzqc1wo2gLf+wMiF7oInoWKUB4NTxwylTyaJbyTOHaFodeHoD8i+TSt0gvV +mZPUSJSnlMVIrQHAiTXC2vlkz5/sn+zSXqjRcGMNQ+D3Ob14BTB8iQrRrKlqw2Js +mHXh+uWlHUHGoaFUHGZWhFFTbKPaVQcVS3d7QNoct5jkzCpfIF3wflEIZwARAQAB +tChMdWNhIEJ1cmdhenpvbGkgPGxidXJnYXp6b2xpQGFwYWNoZS5vcmc+iQI4BBMB +AgAiBQJXBmQ7AhsDBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAKCRA3Rh5Bp7do +15tyEACi4W0dLPB6ILf9hykLEBStRStKKPyLgHPepEYF3xe4A4SjUk33vAKchmBk +bx/x4fNH5ViX1Ln4k/i1y24OVKg0ZOdPpMJBFPBxXhfhSGT8iWDMyudotcukzAFL +LjpY8Pv21xwToFDTTyNbhaTx9nho57bTmK1jTKKzSu5gr83ALz+2ok9di15NUtPf +JI+VQVytEAA70tapCupQogYFHmDiaVRNr8c82huIVJjKGmhrJSVSIjepn8JpJ+wK +hSy5huJGQh2AgM/GXK1Cjaf/59L6C7AmlZlwOaQiDidafCXXtfeDzWDqTMzNCaoH +tx31H8aR8k687YtAc40LLDiyXmlUxXWqljGH7eMi3CyhlIw7Uggs5En1h606wg3z +VwmNFDwudgODRQKDNMA84Wa7gdsTkOZmQ1zBY3oC09CKAE0ycCYi62Zaf+Uzb0p9 +DXkDC35Lip86IWuzpt+G25i5kwXDnU8IJwewOEnrDMmGAfl6JImL2//VSAr1ifzG +z94TY0ZAmc66dDWn7PqTUFt3rsw6EvJMwy00wNHVVfIr9habS8JddqLdBvoCBx0O +HeqEL7k/rYm6OWAw8jtydif/DoevScSU2/rT8/RtKnV1kC0PhwsFptoESglNeBX0 +vod5cYM7kKToN9zZMgRVvOODQ0zwHMDAKkSwX1LPtorHQ5QcULkCDQRXBmQ7ARAA +wtfl/Huq4aIfQ8v/VxkfYS18+/XL1ZIiNtVH5DwPgBmk55dGzqqrx7C3Xx1yPqvm +ZlHuafyQ2ier1/NJ9hezGGLxSCS1b5G45nLGBAy+1vnQEH6o4hTnMte6EQxcQzYi +tLQSU+u/sDaV846FDZFCxKgqXYlTDO9v9k292GKcmKanD8SPTeGTdFsaSVigrBvj +wTsxfVYr8sex/JF4bEN7oCqqQmSM5ABLR55NiViU/PWHUBxnD5kCCnPM0m6iITLW +3vFZDIQBn6fi4Nb1qGcB4Yd9LmukRYkYH3rEeCLNeVRkPR8tZfxkxr9xQfzN1GHV +d831CVHGMUs/5oVO/iYpHRpua0XzorthzCSzrMmttb9ueRp5D9wpv6DY0nC3bUBE +WZ+xsRZRr1gTBitDGsNO1AmcSHJ61rPwiQ2xrbl4m0ZTlYlBmNqwl7xtu4Lg4Pz8 +FxfixxF5fomH4Rrq4bfV7YWUZSsVES5ZfOJ4ZYn3+O1ACR13jpH/sGiY1A0gIS9o +BBSdJQYhjVrxLwtJ3S/b6DXRpsiEvFiX1Q75MxpVkjZ6dMDTHcEKICEY8gxbLIfE +ibdXEpjsumhTTB0xqOuFCnWiGUksWmlCObv+3P0kOMwtb2XRz2t+uESwLyrsh7dX +BJh1mXroPuJ136l90EL1LS9gkLa3HkHFx5uxnZjn0TcAEQEAAYkCHwQYAQIACQUC +VwZkOwIbDAAKCRA3Rh5Bp7do1xOxD/wJf7olyMoqavLOyw3TR8UBw25fVxmgblSc +E5QRBSNLSxdN0Cn/dzj21SaIoiibQOS7ma6yIdBH+6cYhZ3DsDZkdadbGOFYlQ6n +XsTqrVsjGv5AYLr1GYQgBKiu5C61dGsMwP187MlwHPm0e0JGHoBHkL5DNw7WK57d +j0SgiYtXkfyECSkHW0qu+Nvq7pZNKXsfn/nyUK9ImrVbHZ7g5+bXFJOnKiid3Gxd +yzqVZKtSvQGZHGJW6Us/YP8j2S5F/KAIsBVuXeoKCceBo1gJOrsVMrP0RWuQH+LC +068K/OLKWtFk7a4ZSnAoPXzyJ0TJdDALrYlLdfuJ1tYD1PezGKLYGfj3GCRNT3hp ++57u98VPNVIkRMwP+VMYf8Y3qYehhcbZ8Tjmwuj8U68H2AIJO5IM2N4wd5xb9Mnt +/o9EOt1jOBMDsprpDN3+jhS/cRBgvgtXBM6sFoUoxuKih3fHXm+HXcgGp6CBCieX +QaxIftPa9/ylwFM0NRPcgwoZuT5EnsMiGYwOFYu/rkBR/GINxU+TerexdidKW6yM +MuJKuyFEl8Tw4VE9tUAc0rF0ggUJ96RtEkQrVzlObqZBOGhfCBoanux5CbWcvSvw +Tv+k57x2/Dc9oRSo3kBtXeiXjTFHPgqNPCDyZyM601CZX6aqOAhvcztoPv4Xs39j +Bq6lxl6uAA== +=f/Ot +-END PGP PUBLIC KEY BLOCK-
[camel] branch master updated: Regen. Fixed camel-cm-sms docs.
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git The following commit(s) were added to refs/heads/master by this push: new 8b164fb Regen. Fixed camel-cm-sms docs. 8b164fb is described below commit 8b164fbe60bb4a2f967c31b9b14d4ef589959450 Author: Claus Ibsen AuthorDate: Tue Jul 2 08:12:36 2019 +0200 Regen. Fixed camel-cm-sms docs. --- components/camel-cm-sms/src/main/docs/cm-sms-component.adoc | 4 ++-- .../main/java/org/apache/camel/component/cm/CMConfiguration.java| 6 +++--- components/readme.adoc | 6 +++--- docs/components/modules/ROOT/pages/cm-sms-component.adoc| 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/components/camel-cm-sms/src/main/docs/cm-sms-component.adoc b/components/camel-cm-sms/src/main/docs/cm-sms-component.adoc index 4470bc5..08af984 100644 --- a/components/camel-cm-sms/src/main/docs/cm-sms-component.adoc +++ b/components/camel-cm-sms/src/main/docs/cm-sms-component.adoc @@ -71,8 +71,8 @@ with the following path and query parameters: [width="100%",cols="2,5,^1,2",options="header"] |=== | Name | Description | Default | Type -| *defaultFrom* (producer) | This is the sender name. The maximum length is 11 characters. | | String -| *defaultMaxNumberOfParts* (producer) | If it is a multipart message forces the max number. Message can be truncated. Technically the gateway will first check if a message is larger than 160 characters, if so, the message will be cut into multiple 153 characters parts limited by these parameters. | 8 | Max(8L)Int +| *defaultFrom* (producer) | *Required* This is the sender name. The maximum length is 11 characters. | | String +| *defaultMaxNumberOfParts* (producer) | If it is a multipart message forces the max number. Message can be truncated. Technically the gateway will first check if a message is larger than 160 characters, if so, the message will be cut into multiple 153 characters parts limited by these parameters. | 8 | int | *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...] | *productToken* (producer) | *Required* The unique token to use | | String | *testConnectionOnStartup* (producer) | Whether to test the connection to the SMS Gateway on startup | false | boolean diff --git a/components/camel-cm-sms/src/main/java/org/apache/camel/component/cm/CMConfiguration.java b/components/camel-cm-sms/src/main/java/org/apache/camel/component/cm/CMConfiguration.java index 38c45de..6c39f04 100644 --- a/components/camel-cm-sms/src/main/java/org/apache/camel/component/cm/CMConfiguration.java +++ b/components/camel-cm-sms/src/main/java/org/apache/camel/component/cm/CMConfiguration.java @@ -28,14 +28,14 @@ import org.apache.camel.spi.UriParams; @UriParams public class CMConfiguration { -@UriParam @Metadata(required = true) @NotNull +@UriParam(javaType = "java.lang.String") @Metadata(required = true) private String productToken; -@UriParam @NotNull @Size(min = 1, max = 11) +@UriParam(javaType = "java.lang.String") @Metadata(required = true) private String defaultFrom; -@UriParam(defaultValue = "8") @Min(1) @Max(8) +@UriParam(defaultValue = "8", javaType = "int") private int defaultMaxNumberOfParts = 8; @UriParam private boolean testConnectionOnStartup; diff --git a/components/readme.adoc b/components/readme.adoc index 2c0757a..7750e56 100644 --- a/components/readme.adoc +++ b/components/readme.adoc @@ -1004,7 +1004,7 @@ Number of Data Formats: 45 in 37 JAR artifacts (0 deprecated) Expression Languages // languages: START -Number of Languages: 16 in 10 JAR artifacts (0 deprecated) +Number of Languages: 17 in 11 JAR artifacts (0 deprecated) [width="100%",cols="4,1,5",options="header"] |=== @@ -1038,6 +1038,8 @@ Number of Languages: 16 in 10 JAR artifacts (0 deprecated) | link:camel-base/src/main/docs/tokenize-language.adoc[Tokenize] (camel-base) | 2.0 | To use Camel message body or header with a tokenizer in Camel expressions or predicates. +| link:camel-jaxp/src/main/docs/xtokenize-language.adoc[XML Tokenize] (camel-jaxp) | 2.14 | To use Camel message body or header with a XML tokenizer in Camel expressions or predicates. + | link:camel-xpath/src/main/docs/xpath-language.adoc[XPath] (camel-xpath) | 1.1 | To use XPath (XML) in Camel expressions or predicates. | link:camel-saxon/src
[camel] branch master updated: Fixed CS
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git The following commit(s) were added to refs/heads/master by this push: new 3ddec4e Fixed CS 3ddec4e is described below commit 3ddec4eebadafd2e8abd2da63135fc77230a14aa Author: Claus Ibsen AuthorDate: Tue Jul 2 08:20:08 2019 +0200 Fixed CS --- .../apache/camel/component/properties/PropertiesComponent.java| 4 ++-- .../org/apache/camel/component/properties/PropertiesSource.java | 8 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/components/camel-properties/src/main/java/org/apache/camel/component/properties/PropertiesComponent.java b/components/camel-properties/src/main/java/org/apache/camel/component/properties/PropertiesComponent.java index ab39061..0697fcc 100644 --- a/components/camel-properties/src/main/java/org/apache/camel/component/properties/PropertiesComponent.java +++ b/components/camel-properties/src/main/java/org/apache/camel/component/properties/PropertiesComponent.java @@ -53,8 +53,6 @@ import org.slf4j.LoggerFactory; @ManagedResource(description = "Managed PropertiesComponent") public class PropertiesComponent extends DefaultComponent implements org.apache.camel.spi.PropertiesComponent { -private static final Logger LOG = LoggerFactory.getLogger(PropertiesComponent.class); - /** * Never check system properties. */ @@ -99,6 +97,8 @@ public class PropertiesComponent extends DefaultComponent implements org.apache. */ public static final String OVERRIDE_PROPERTIES = PropertiesComponent.class.getName() + ".OverrideProperties"; +private static final Logger LOG = LoggerFactory.getLogger(PropertiesComponent.class); + @SuppressWarnings("unchecked") private final Map cacheMap = LRUCacheFactory.newLRUSoftCache(1000); private transient Properties cachedProperties; diff --git a/components/camel-properties/src/main/java/org/apache/camel/component/properties/PropertiesSource.java b/components/camel-properties/src/main/java/org/apache/camel/component/properties/PropertiesSource.java index 0f8f43a..fee8792 100644 --- a/components/camel-properties/src/main/java/org/apache/camel/component/properties/PropertiesSource.java +++ b/components/camel-properties/src/main/java/org/apache/camel/component/properties/PropertiesSource.java @@ -1,13 +1,13 @@ -/** +/* * 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 - * + * + * 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.
[camel] branch master updated: Fixed CS for camel-microprofile-config
This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git The following commit(s) were added to refs/heads/master by this push: new 5492614 Fixed CS for camel-microprofile-config 5492614 is described below commit 549261440ebb37c2694be7d85d900a9261f87c1a Author: Andrea Cosentino AuthorDate: Tue Jul 2 08:20:52 2019 +0200 Fixed CS for camel-microprofile-config --- .../microprofile/config/CamelMicroProfilePropertiesSourceTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/camel-microprofile-config/src/test/java/org/apache/camel/component/microprofile/config/CamelMicroProfilePropertiesSourceTest.java b/components/camel-microprofile-config/src/test/java/org/apache/camel/component/microprofile/config/CamelMicroProfilePropertiesSourceTest.java index 214d4bd..8ede269 100644 --- a/components/camel-microprofile-config/src/test/java/org/apache/camel/component/microprofile/config/CamelMicroProfilePropertiesSourceTest.java +++ b/components/camel-microprofile-config/src/test/java/org/apache/camel/component/microprofile/config/CamelMicroProfilePropertiesSourceTest.java @@ -54,11 +54,11 @@ public class CamelMicroProfilePropertiesSourceTest extends CamelTestSupport { @Test public void testMicroProfileConfig() throws Exception { - getMockEndpoint("mock:result").expectedBodiesReceived("Hello World"); +getMockEndpoint("mock:result").expectedBodiesReceived("Hello World"); - template.sendBody("direct:start", context.resolvePropertyPlaceholders("Hello {{hi}}")); +template.sendBody("direct:start", context.resolvePropertyPlaceholders("Hello {{hi}}")); - assertMockEndpointsSatisfied(); +assertMockEndpointsSatisfied(); } @Override
[camel-quarkus] branch master updated: Add keys
This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git The following commit(s) were added to refs/heads/master by this push: new 1b07f2d Add keys new a1396bd Merge pull request #13 from lburgazzoli/keys 1b07f2d is described below commit 1b07f2d96447a3dc99a51046e4d569ce18c3575c Author: lburgazzoli AuthorDate: Tue Jul 2 06:51:16 2019 +0200 Add keys --- KEYS | 58 ++ 1 file changed, 58 insertions(+) diff --git a/KEYS b/KEYS index b14983f..5099276 100644 --- a/KEYS +++ b/KEYS @@ -1713,3 +1713,61 @@ QAWziLTWM6opqckVEYs3bRwKwwKyJDiOA4fm7lxoPlyVf0fPqL6wKPBjNeKjDsUo SaGp =GGoO -END PGP PUBLIC KEY BLOCK- +pub rsa4096 2016-04-07 [SC] + 33E8BA5A41AB4B428475386137461E41A7B768D7 +uid [ unknown] Luca Burgazzoli +sig 337461E41A7B768D7 2016-04-07 Luca Burgazzoli +sub rsa4096 2016-04-07 [E] +sig 37461E41A7B768D7 2016-04-07 Luca Burgazzoli + +-BEGIN PGP PUBLIC KEY BLOCK- + +mQINBFcGZDsBEACm9YSFt0/qxZ9YO2pArHdfZWCENDLFWaK9/gJw0QBm75aEZVyE +Hmr6izJJanqzQR51TQljAPb4ZSmXxlLnPA57Ouo8RzhcogyAHO91juZD6ANfvGrC +LYnQxGGuAG+IYy3h9l2evZJecqOuS0qT6W36Zk8pGEhhFRJwgiih9sYKdkQmWJpf +vxWkfnqap8v1S71j57IkdIeZiCAOVFUZHGSqzT/aNUuc7JhBDWZuC0mte82UEPF7 +nL5ghJtDatBz/gXN9inic1NqT+LPQRc1xxavGVoLqChTSLHRZB4abm4KqTGG4h0g +Nzxc8RwT4lP150lYZIyeJtv5gZI/osfn/lrbjd7CDsb+XLU5Y7XCf0C32xWJVoHD +CArObpQ40J7gsHCrTom1cbs5vY7RQ7n2zUrmchcyIgN85Qv5qsVWjBTinmcJ2pRK +cG6AwAtZ23yE0dFX+1Qhmkusz9DQtEse7J5pQYsAb3ey8l7Ce112effJ/LO6hVu0 +GpTQDdzqc1wo2gLf+wMiF7oInoWKUB4NTxwylTyaJbyTOHaFodeHoD8i+TSt0gvV +mZPUSJSnlMVIrQHAiTXC2vlkz5/sn+zSXqjRcGMNQ+D3Ob14BTB8iQrRrKlqw2Js +mHXh+uWlHUHGoaFUHGZWhFFTbKPaVQcVS3d7QNoct5jkzCpfIF3wflEIZwARAQAB +tChMdWNhIEJ1cmdhenpvbGkgPGxidXJnYXp6b2xpQGFwYWNoZS5vcmc+iQI4BBMB +AgAiBQJXBmQ7AhsDBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAKCRA3Rh5Bp7do +15tyEACi4W0dLPB6ILf9hykLEBStRStKKPyLgHPepEYF3xe4A4SjUk33vAKchmBk +bx/x4fNH5ViX1Ln4k/i1y24OVKg0ZOdPpMJBFPBxXhfhSGT8iWDMyudotcukzAFL +LjpY8Pv21xwToFDTTyNbhaTx9nho57bTmK1jTKKzSu5gr83ALz+2ok9di15NUtPf +JI+VQVytEAA70tapCupQogYFHmDiaVRNr8c82huIVJjKGmhrJSVSIjepn8JpJ+wK +hSy5huJGQh2AgM/GXK1Cjaf/59L6C7AmlZlwOaQiDidafCXXtfeDzWDqTMzNCaoH +tx31H8aR8k687YtAc40LLDiyXmlUxXWqljGH7eMi3CyhlIw7Uggs5En1h606wg3z +VwmNFDwudgODRQKDNMA84Wa7gdsTkOZmQ1zBY3oC09CKAE0ycCYi62Zaf+Uzb0p9 +DXkDC35Lip86IWuzpt+G25i5kwXDnU8IJwewOEnrDMmGAfl6JImL2//VSAr1ifzG +z94TY0ZAmc66dDWn7PqTUFt3rsw6EvJMwy00wNHVVfIr9habS8JddqLdBvoCBx0O +HeqEL7k/rYm6OWAw8jtydif/DoevScSU2/rT8/RtKnV1kC0PhwsFptoESglNeBX0 +vod5cYM7kKToN9zZMgRVvOODQ0zwHMDAKkSwX1LPtorHQ5QcULkCDQRXBmQ7ARAA +wtfl/Huq4aIfQ8v/VxkfYS18+/XL1ZIiNtVH5DwPgBmk55dGzqqrx7C3Xx1yPqvm +ZlHuafyQ2ier1/NJ9hezGGLxSCS1b5G45nLGBAy+1vnQEH6o4hTnMte6EQxcQzYi +tLQSU+u/sDaV846FDZFCxKgqXYlTDO9v9k292GKcmKanD8SPTeGTdFsaSVigrBvj +wTsxfVYr8sex/JF4bEN7oCqqQmSM5ABLR55NiViU/PWHUBxnD5kCCnPM0m6iITLW +3vFZDIQBn6fi4Nb1qGcB4Yd9LmukRYkYH3rEeCLNeVRkPR8tZfxkxr9xQfzN1GHV +d831CVHGMUs/5oVO/iYpHRpua0XzorthzCSzrMmttb9ueRp5D9wpv6DY0nC3bUBE +WZ+xsRZRr1gTBitDGsNO1AmcSHJ61rPwiQ2xrbl4m0ZTlYlBmNqwl7xtu4Lg4Pz8 +FxfixxF5fomH4Rrq4bfV7YWUZSsVES5ZfOJ4ZYn3+O1ACR13jpH/sGiY1A0gIS9o +BBSdJQYhjVrxLwtJ3S/b6DXRpsiEvFiX1Q75MxpVkjZ6dMDTHcEKICEY8gxbLIfE +ibdXEpjsumhTTB0xqOuFCnWiGUksWmlCObv+3P0kOMwtb2XRz2t+uESwLyrsh7dX +BJh1mXroPuJ136l90EL1LS9gkLa3HkHFx5uxnZjn0TcAEQEAAYkCHwQYAQIACQUC +VwZkOwIbDAAKCRA3Rh5Bp7do1xOxD/wJf7olyMoqavLOyw3TR8UBw25fVxmgblSc +E5QRBSNLSxdN0Cn/dzj21SaIoiibQOS7ma6yIdBH+6cYhZ3DsDZkdadbGOFYlQ6n +XsTqrVsjGv5AYLr1GYQgBKiu5C61dGsMwP187MlwHPm0e0JGHoBHkL5DNw7WK57d +j0SgiYtXkfyECSkHW0qu+Nvq7pZNKXsfn/nyUK9ImrVbHZ7g5+bXFJOnKiid3Gxd +yzqVZKtSvQGZHGJW6Us/YP8j2S5F/KAIsBVuXeoKCceBo1gJOrsVMrP0RWuQH+LC +068K/OLKWtFk7a4ZSnAoPXzyJ0TJdDALrYlLdfuJ1tYD1PezGKLYGfj3GCRNT3hp ++57u98VPNVIkRMwP+VMYf8Y3qYehhcbZ8Tjmwuj8U68H2AIJO5IM2N4wd5xb9Mnt +/o9EOt1jOBMDsprpDN3+jhS/cRBgvgtXBM6sFoUoxuKih3fHXm+HXcgGp6CBCieX +QaxIftPa9/ylwFM0NRPcgwoZuT5EnsMiGYwOFYu/rkBR/GINxU+TerexdidKW6yM +MuJKuyFEl8Tw4VE9tUAc0rF0ggUJ96RtEkQrVzlObqZBOGhfCBoanux5CbWcvSvw +Tv+k57x2/Dc9oRSo3kBtXeiXjTFHPgqNPCDyZyM601CZX6aqOAhvcztoPv4Xs39j +Bq6lxl6uAA== +=f/Ot +-END PGP PUBLIC KEY BLOCK-
[camel] branch master updated: Upgrade Brave Zipkin to version 5.6.6
This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git The following commit(s) were added to refs/heads/master by this push: new 7da288c Upgrade Brave Zipkin to version 5.6.6 7da288c is described below commit 7da288c05d03cd426475bb1858b1eb4e5f93f4b5 Author: Andrea Cosentino AuthorDate: Tue Jul 2 08:34:43 2019 +0200 Upgrade Brave Zipkin to version 5.6.6 --- parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parent/pom.xml b/parent/pom.xml index 110ff63..13d0395 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -106,7 +106,7 @@ 1.61 2.34.0 2.97.0 -5.6.5 +5.6.6 1.12 0.9.5.4 0.9.5.4_1
[camel] 01/01: https://stackoverflow.com/questions/56775883/camel-sns-how-to-use-async-client-without-blocking?noredirect=1#comment100229953_56775883. Work in progress
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch async-aws-sns in repository https://gitbox.apache.org/repos/asf/camel.git commit 9605406b986b57edfd7415bd569654fab34a11d3 Author: Claus Ibsen AuthorDate: Tue Jul 2 08:38:09 2019 +0200 https://stackoverflow.com/questions/56775883/camel-sns-how-to-use-async-client-without-blocking?noredirect=1#comment100229953_56775883. Work in progress --- .../camel/component/aws/sns/SnsComponent.java | 3 +- .../camel/component/aws/sns/SnsConfiguration.java | 9 ++-- .../camel/component/aws/sns/SnsEndpoint.java | 23 + .../camel/component/aws/sns/SnsProducer.java | 56 -- 4 files changed, 53 insertions(+), 38 deletions(-) diff --git a/components/camel-aws-sns/src/main/java/org/apache/camel/component/aws/sns/SnsComponent.java b/components/camel-aws-sns/src/main/java/org/apache/camel/component/aws/sns/SnsComponent.java index aaa1bcd..2a488b3 100644 --- a/components/camel-aws-sns/src/main/java/org/apache/camel/component/aws/sns/SnsComponent.java +++ b/components/camel-aws-sns/src/main/java/org/apache/camel/component/aws/sns/SnsComponent.java @@ -22,6 +22,7 @@ import java.util.Set; import com.amazonaws.regions.Regions; import com.amazonaws.services.sns.AmazonSNS; +import com.amazonaws.services.sns.AmazonSNSAsync; import org.apache.camel.CamelContext; import org.apache.camel.Endpoint; import org.apache.camel.spi.Metadata; @@ -133,7 +134,7 @@ public class SnsComponent extends DefaultComponent { } private void checkAndSetRegistryClient(SnsConfiguration configuration) { -Set clients = getCamelContext().getRegistry().findByType(AmazonSNS.class); +Set clients = getCamelContext().getRegistry().findByType(AmazonSNSAsync.class); if (clients.size() == 1) { configuration.setAmazonSNSClient(clients.stream().findFirst().get()); } diff --git a/components/camel-aws-sns/src/main/java/org/apache/camel/component/aws/sns/SnsConfiguration.java b/components/camel-aws-sns/src/main/java/org/apache/camel/component/aws/sns/SnsConfiguration.java index 7690de8..a6bdc53 100644 --- a/components/camel-aws-sns/src/main/java/org/apache/camel/component/aws/sns/SnsConfiguration.java +++ b/components/camel-aws-sns/src/main/java/org/apache/camel/component/aws/sns/SnsConfiguration.java @@ -17,6 +17,9 @@ package org.apache.camel.component.aws.sns; import com.amazonaws.services.sns.AmazonSNS; +import com.amazonaws.services.sns.AmazonSNSAsync; +import com.amazonaws.services.sns.AmazonSNSAsyncClient; +import com.amazonaws.services.sns.AmazonSNSClient; import com.amazonaws.services.sqs.AmazonSQS; import org.apache.camel.RuntimeCamelException; @@ -31,7 +34,7 @@ public class SnsConfiguration implements Cloneable { // Common properties private String topicName; @UriParam -private AmazonSNS amazonSNSClient; +private AmazonSNSAsync amazonSNSClient; @UriParam(label = "security", secret = true) private String accessKey; @UriParam(label = "security", secret = true) @@ -108,14 +111,14 @@ public class SnsConfiguration implements Cloneable { this.secretKey = secretKey; } -public AmazonSNS getAmazonSNSClient() { +public AmazonSNSAsync getAmazonSNSClient() { return amazonSNSClient; } /** * To use the AmazonSNS as the client */ -public void setAmazonSNSClient(AmazonSNS amazonSNSClient) { +public void setAmazonSNSClient(AmazonSNSAsync amazonSNSClient) { this.amazonSNSClient = amazonSNSClient; } diff --git a/components/camel-aws-sns/src/main/java/org/apache/camel/component/aws/sns/SnsEndpoint.java b/components/camel-aws-sns/src/main/java/org/apache/camel/component/aws/sns/SnsEndpoint.java index 64636b4..b6e750b 100644 --- a/components/camel-aws-sns/src/main/java/org/apache/camel/component/aws/sns/SnsEndpoint.java +++ b/components/camel-aws-sns/src/main/java/org/apache/camel/component/aws/sns/SnsEndpoint.java @@ -27,6 +27,9 @@ import com.amazonaws.auth.AWSStaticCredentialsProvider; import com.amazonaws.auth.BasicAWSCredentials; import com.amazonaws.regions.Regions; import com.amazonaws.services.sns.AmazonSNS; +import com.amazonaws.services.sns.AmazonSNSAsync; +import com.amazonaws.services.sns.AmazonSNSAsyncClient; +import com.amazonaws.services.sns.AmazonSNSAsyncClientBuilder; import com.amazonaws.services.sns.AmazonSNSClientBuilder; import com.amazonaws.services.sns.model.CreateTopicRequest; import com.amazonaws.services.sns.model.CreateTopicResult; @@ -55,7 +58,7 @@ import org.apache.camel.util.ObjectHelper; producerOnly = true, label = "cloud,mobile,messaging") public class SnsEndpoint extends DefaultEndpoint implements HeaderFilterStrategyAware { -private AmazonSNS snsClient; +private AmazonSNSAsync snsClient; @UriPath(description = "Topic name or ARN") @Metadata(required =
[camel] branch async-aws-sns created (now 9605406)
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a change to branch async-aws-sns in repository https://gitbox.apache.org/repos/asf/camel.git. at 9605406 https://stackoverflow.com/questions/56775883/camel-sns-how-to-use-async-client-without-blocking?noredirect=1#comment100229953_56775883. Work in progress This branch includes the following new commits: new 9605406 https://stackoverflow.com/questions/56775883/camel-sns-how-to-use-async-client-without-blocking?noredirect=1#comment100229953_56775883. Work in progress The 1 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.
[camel-quarkus] branch vanilla-compiler-plugin-version created (now 84e5aa6)
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a change to branch vanilla-compiler-plugin-version in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git. at 84e5aa6 Use vanilla Maven Compiler Plugin version (from maven central) This branch includes the following new commits: new 84e5aa6 Use vanilla Maven Compiler Plugin version (from maven central) The 1 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.
[camel-quarkus] 01/01: Use vanilla Maven Compiler Plugin version (from maven central)
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch vanilla-compiler-plugin-version in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git commit 84e5aa67dafb207f752d4227d5885fcc1b49924e Author: Claus Ibsen AuthorDate: Tue Jul 2 08:49:03 2019 +0200 Use vanilla Maven Compiler Plugin version (from maven central) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 97dd621..8205856 100644 --- a/pom.xml +++ b/pom.xml @@ -44,7 +44,7 @@ 3.0.0-M2 0.17.0 -3.8.0-jboss-2 +3.8.0 1.8 1.8 ${maven.compiler.target}