This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push: new 3dc451652de deprecate running cdi via camel-maven-plugin and create new cdi project via maven archetype. 3dc451652de is described below commit 3dc451652dee4706f2ba142c1d05562ded410f36 Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Fri Sep 2 07:32:56 2022 +0200 deprecate running cdi via camel-maven-plugin and create new cdi project via maven archetype. --- archetypes/camel-archetype-cdi/pom.xml | 2 +- .../src/main/docs/camel-maven-plugin.adoc | 17 ----------------- .../src/main/java/org/apache/camel/maven/RunMojo.java | 3 +++ 3 files changed, 4 insertions(+), 18 deletions(-) diff --git a/archetypes/camel-archetype-cdi/pom.xml b/archetypes/camel-archetype-cdi/pom.xml index 8afb2403323..14ccdd8c880 100644 --- a/archetypes/camel-archetype-cdi/pom.xml +++ b/archetypes/camel-archetype-cdi/pom.xml @@ -29,7 +29,7 @@ <groupId>org.apache.camel.archetypes</groupId> <artifactId>camel-archetype-cdi</artifactId> - <name>Camel :: Archetypes :: CDI Based Router</name> + <name>Camel :: Archetypes :: CDI Based Router (deprecated)</name> <description>Creates a new Camel project using CDI.</description> <packaging>maven-archetype</packaging> diff --git a/tooling/maven/camel-maven-plugin/src/main/docs/camel-maven-plugin.adoc b/tooling/maven/camel-maven-plugin/src/main/docs/camel-maven-plugin.adoc index b20a5806f98..a2b0ab8fa7b 100644 --- a/tooling/maven/camel-maven-plugin/src/main/docs/camel-maven-plugin.adoc +++ b/tooling/maven/camel-maven-plugin/src/main/docs/camel-maven-plugin.adoc @@ -39,23 +39,6 @@ The maven plugin *run* goal supports the following options which can be configur |=== -=== Running OSGi Blueprint - -Use the `camel-karaf-maven-plugin` which is intended for Apache Camel on Karaf/OSGi. - -=== Running CDI - -The `camel:run` plugin also supports running a CDI application - -This allows you to boot up any CDI services you wish - whether they are Camel-related, or any other CDI enabled services. -You should add the CDI container of your choice (e.g. Weld or OpenWebBeans) to the dependencies of the camel-maven-plugin such as in this example. - -From the source of Camel you can run a CDI example via - ----- -cd examples/camel-example-cdi -mvn compile camel:run ----- === Logging the classpath diff --git a/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/RunMojo.java b/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/RunMojo.java index 48659fa630e..6862b1db8f5 100644 --- a/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/RunMojo.java +++ b/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/RunMojo.java @@ -134,6 +134,7 @@ public class RunMojo extends AbstractExecMojo { /** * Whether to use CDI when running, instead of Spring */ + @Deprecated @Parameter(property = "camel.useCDI") protected Boolean useCDI; @@ -361,6 +362,7 @@ public class RunMojo extends AbstractExecMojo { // must include plugin dependencies for cdi extraPluginDependencyArtifactId = "camel-cdi"; getLog().info("Using " + mainClass + " to initiate a CamelContext"); + getLog().warn("Running CDI in camel-maven-plugin is deprecated"); } else if (usingKameletMain) { mainClass = "org.apache.camel.main.KameletMain"; // must include plugin dependencies for kamelet @@ -627,6 +629,7 @@ public class RunMojo extends AbstractExecMojo { } @SuppressWarnings("unchecked") + @Deprecated private boolean detectCDIOnClassPath() { List<Dependency> deps = project.getCompileDependencies(); for (Dependency dep : deps) {