You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2015/06/30 11:16:43 UTC

[1/2] camel git commit: CAMEL-8921: Cleanup a bit on the example-cdi and archetype

Repository: camel
Updated Branches:
  refs/heads/master fbfcd3a4b -> dfe42401f


CAMEL-8921: Cleanup a bit on the example-cdi and archetype


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/188b3752
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/188b3752
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/188b3752

Branch: refs/heads/master
Commit: 188b3752ebc928ba04f9d71a3c69ee3e13bca090
Parents: fbfcd3a
Author: Claus Ibsen <da...@apache.org>
Authored: Tue Jun 30 11:14:39 2015 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Tue Jun 30 11:14:39 2015 +0200

----------------------------------------------------------------------
 .../camel/cdi/internal/CamelExtension.java      |  2 +-
 examples/camel-example-cdi/pom.xml              | 37 ++++++++++----------
 .../org/apache/camel/example/cdi/MyRoutes.java  |  4 ---
 3 files changed, 20 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/188b3752/components/camel-cdi/src/main/java/org/apache/camel/cdi/internal/CamelExtension.java
----------------------------------------------------------------------
diff --git a/components/camel-cdi/src/main/java/org/apache/camel/cdi/internal/CamelExtension.java b/components/camel-cdi/src/main/java/org/apache/camel/cdi/internal/CamelExtension.java
index 7ac19b9..fcc1238 100644
--- a/components/camel-cdi/src/main/java/org/apache/camel/cdi/internal/CamelExtension.java
+++ b/components/camel-cdi/src/main/java/org/apache/camel/cdi/internal/CamelExtension.java
@@ -107,7 +107,7 @@ public class CamelExtension implements Extension {
 
     }
 
-    protected  void detectRouteBuilders(@Observes ProcessAnnotatedType<?> process) throws Exception {
+    protected void detectRouteBuilders(@Observes ProcessAnnotatedType<?> process) throws Exception {
         AnnotatedType<?> annotatedType = process.getAnnotatedType();
         ContextName annotation = annotatedType.getAnnotation(ContextName.class);
         Class<?> javaClass = annotatedType.getJavaClass();

http://git-wip-us.apache.org/repos/asf/camel/blob/188b3752/examples/camel-example-cdi/pom.xml
----------------------------------------------------------------------
diff --git a/examples/camel-example-cdi/pom.xml b/examples/camel-example-cdi/pom.xml
index 248877a..10119a5 100644
--- a/examples/camel-example-cdi/pom.xml
+++ b/examples/camel-example-cdi/pom.xml
@@ -36,40 +36,41 @@
       <artifactId>camel-cdi</artifactId>
     </dependency>
 
-    <!-- the various CDI/JEE annotations -->
-    <dependency>
-      <groupId>javax.inject</groupId>
-      <artifactId>javax.inject</artifactId>
-      <version>1</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-ejb_3.1_spec</artifactId>
-      <version>1.0.2</version>
-    </dependency>
+    <!-- cdi api -->
     <dependency>
       <groupId>javax.enterprise</groupId>
       <artifactId>cdi-api</artifactId>
       <version>1.2</version>
+      <scope>provided</scope>
     </dependency>
 
-    <!-- lets use deltaspike & weld -->
+    <!-- need to use a CDI container such as JBoss Weld -->
+    <!-- lets use weld for CDI -->
     <dependency>
-      <groupId>org.apache.deltaspike.cdictrl</groupId>
-      <artifactId>deltaspike-cdictrl-weld</artifactId>
-      <version>${deltaspike-version}</version>
+      <groupId>org.jboss.weld.se</groupId>
+      <artifactId>weld-se</artifactId>
+      <version>${weld2-version}</version>
     </dependency>
     <dependency>
-      <groupId>org.jboss.weld.se</groupId>
-      <artifactId>weld-se-core</artifactId>
+      <groupId>org.jboss.weld</groupId>
+      <artifactId>weld-core</artifactId>
       <version>${weld2-version}</version>
     </dependency>
+    <dependency>
+      <groupId>org.apache.deltaspike.cdictrl</groupId>
+      <artifactId>deltaspike-cdictrl-weld</artifactId>
+      <version>${deltaspike-version}</version>
+    </dependency>
 
-    <!-- logging -->
+    <!-- use log4j as logger -->
     <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-log4j12</artifactId>
     </dependency>
+    <dependency>
+      <groupId>log4j</groupId>
+      <artifactId>log4j</artifactId>
+    </dependency>
 
   </dependencies>
 

http://git-wip-us.apache.org/repos/asf/camel/blob/188b3752/examples/camel-example-cdi/src/main/java/org/apache/camel/example/cdi/MyRoutes.java
----------------------------------------------------------------------
diff --git a/examples/camel-example-cdi/src/main/java/org/apache/camel/example/cdi/MyRoutes.java b/examples/camel-example-cdi/src/main/java/org/apache/camel/example/cdi/MyRoutes.java
index 4796d93..ba1bef7 100644
--- a/examples/camel-example-cdi/src/main/java/org/apache/camel/example/cdi/MyRoutes.java
+++ b/examples/camel-example-cdi/src/main/java/org/apache/camel/example/cdi/MyRoutes.java
@@ -16,8 +16,6 @@
  */
 package org.apache.camel.example.cdi;
 
-import javax.ejb.Startup;
-import javax.enterprise.context.ApplicationScoped;
 import javax.inject.Inject;
 
 import org.apache.camel.Endpoint;
@@ -29,8 +27,6 @@ import org.apache.camel.cdi.Uri;
  * Configures all our Camel routes, components, endpoints and beans
  */
 @ContextName
-@Startup
-@ApplicationScoped
 public class MyRoutes extends RouteBuilder {
 
     @Inject


[2/2] camel git commit: CAMEL-8921: Cleanup a bit on the example-cdi and archetype

Posted by da...@apache.org.
CAMEL-8921: Cleanup a bit on the example-cdi and archetype


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/dfe42401
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/dfe42401
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/dfe42401

Branch: refs/heads/master
Commit: dfe42401f799beba22eb594c7b800c3d6d6b79eb
Parents: 188b375
Author: Claus Ibsen <da...@apache.org>
Authored: Tue Jun 30 11:22:45 2015 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Tue Jun 30 11:22:45 2015 +0200

----------------------------------------------------------------------
 .../META-INF/maven/archetype-metadata.xml       |  9 ----
 .../main/resources/archetype-resources/pom.xml  | 43 ++++++++------------
 .../src/main/java/MyRoutes.java                 |  4 --
 3 files changed, 16 insertions(+), 40 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/dfe42401/tooling/archetypes/camel-archetype-cdi/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml
----------------------------------------------------------------------
diff --git a/tooling/archetypes/camel-archetype-cdi/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml b/tooling/archetypes/camel-archetype-cdi/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml
index 8293339..2f5e78e 100644
--- a/tooling/archetypes/camel-archetype-cdi/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml
+++ b/tooling/archetypes/camel-archetype-cdi/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml
@@ -24,12 +24,6 @@
     <requiredProperty key="camel-version">
       <defaultValue>${project.version}</defaultValue>
     </requiredProperty>
-    <requiredProperty key="log4j-version">
-      <defaultValue>${log4j-version}</defaultValue>
-    </requiredProperty>
-    <requiredProperty key="geronimo-ejb-spec-version">
-      <defaultValue>${geronimo-ejb_3.1_spec-version}</defaultValue>
-    </requiredProperty>
     <requiredProperty key="cdi-api-version">
       <defaultValue>1.2</defaultValue>
     </requiredProperty>
@@ -48,9 +42,6 @@
     <requiredProperty key="exec-maven-plugin-version">
       <defaultValue>${exec-maven-plugin-version}</defaultValue>
     </requiredProperty>
-    <requiredProperty key="slf4j-api-version">
-      <defaultValue>${slf4j-api-version}</defaultValue>
-    </requiredProperty>
     <requiredProperty key="slf4j-version">
       <defaultValue>${slf4j-version}</defaultValue>
     </requiredProperty>

http://git-wip-us.apache.org/repos/asf/camel/blob/dfe42401/tooling/archetypes/camel-archetype-cdi/src/main/resources/archetype-resources/pom.xml
----------------------------------------------------------------------
diff --git a/tooling/archetypes/camel-archetype-cdi/src/main/resources/archetype-resources/pom.xml b/tooling/archetypes/camel-archetype-cdi/src/main/resources/archetype-resources/pom.xml
index 37348b8..59a819c 100644
--- a/tooling/archetypes/camel-archetype-cdi/src/main/resources/archetype-resources/pom.xml
+++ b/tooling/archetypes/camel-archetype-cdi/src/main/resources/archetype-resources/pom.xml
@@ -34,52 +34,40 @@
   </properties>
 
   <dependencies>
-    <dependency>
-      <groupId>org.apache.camel</groupId>
-      <artifactId>camel-core</artifactId>
-      <version>${camel-version}</version>
-    </dependency>
+
     <dependency>
       <groupId>org.apache.camel</groupId>
       <artifactId>camel-cdi</artifactId>
       <version>${camel-version}</version>
     </dependency>
 
-    <!-- the various CDI/JEE annotations -->
-    <dependency>
-      <groupId>javax.inject</groupId>
-      <artifactId>javax.inject</artifactId>
-      <version>1</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-ejb_3.1_spec</artifactId>
-      <version>${geronimo-ejb-spec-version}</version>
-    </dependency>
+    <!-- cdi api -->
     <dependency>
       <groupId>javax.enterprise</groupId>
       <artifactId>cdi-api</artifactId>
       <version>${cdi-api-version}</version>
+      <scope>provided</scope>
     </dependency>
 
-    <!-- lets use deltaspike & weld -->
+    <!-- need to use a CDI container such as JBoss Weld -->
+    <!-- lets use weld for CDI -->
     <dependency>
-      <groupId>org.apache.deltaspike.cdictrl</groupId>
-      <artifactId>deltaspike-cdictrl-weld</artifactId>
-      <version>${deltaspike-version}</version>
+      <groupId>org.jboss.weld.se</groupId>
+      <artifactId>weld-se</artifactId>
+      <version>${weld2-version}</version>
     </dependency>
     <dependency>
-      <groupId>org.jboss.weld.se</groupId>
-      <artifactId>weld-se-core</artifactId>
+      <groupId>org.jboss.weld</groupId>
+      <artifactId>weld-core</artifactId>
       <version>${weld2-version}</version>
     </dependency>
-
-    <!-- logging -->
     <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-api</artifactId>
-      <version>${slf4j-api-version}</version>
+      <groupId>org.apache.deltaspike.cdictrl</groupId>
+      <artifactId>deltaspike-cdictrl-weld</artifactId>
+      <version>${deltaspike-version}</version>
     </dependency>
+
+    <!-- logging -->
     <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-log4j12</artifactId>
@@ -98,6 +86,7 @@
       <version>${camel-version}</version>
       <scope>test</scope>
     </dependency>
+
   </dependencies>
 
   <build>

http://git-wip-us.apache.org/repos/asf/camel/blob/dfe42401/tooling/archetypes/camel-archetype-cdi/src/main/resources/archetype-resources/src/main/java/MyRoutes.java
----------------------------------------------------------------------
diff --git a/tooling/archetypes/camel-archetype-cdi/src/main/resources/archetype-resources/src/main/java/MyRoutes.java b/tooling/archetypes/camel-archetype-cdi/src/main/resources/archetype-resources/src/main/java/MyRoutes.java
index 2ddfc41..7943215 100644
--- a/tooling/archetypes/camel-archetype-cdi/src/main/resources/archetype-resources/src/main/java/MyRoutes.java
+++ b/tooling/archetypes/camel-archetype-cdi/src/main/resources/archetype-resources/src/main/java/MyRoutes.java
@@ -16,8 +16,6 @@
 ## ------------------------------------------------------------------------
 package ${package};
 
-import javax.ejb.Startup;
-import javax.enterprise.context.ApplicationScoped;
 import javax.inject.Inject;
 
 import org.apache.camel.Endpoint;
@@ -29,8 +27,6 @@ import org.apache.camel.cdi.Uri;
  * Configures all our Camel routes, components, endpoints and beans
  */
 @ContextName("myCdiCamelContext")
-@Startup
-@ApplicationScoped
 public class MyRoutes extends RouteBuilder {
 
     @Inject