camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [1/2] camel git commit: CAMEL-8921: Cleanup a bit on the example-cdi and archetype
Date Tue, 30 Jun 2015 09:16:43 GMT
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 <davsclaus@apache.org>
Authored: Tue Jun 30 11:14:39 2015 +0200
Committer: Claus Ibsen <davsclaus@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


Mime
View raw message