camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmoulli...@apache.org
Subject svn commit: r1393451 - in /camel/trunk/examples/camel-example-cdi: ./ src/test/java/org/apache/camel/example/cdi/ src/test/java/org/apache/camel/example/cdi/one/ src/test/java/org/apache/camel/example/cdi/two/ src/test/resources/
Date Wed, 03 Oct 2012 12:16:42 GMT
Author: cmoulliard
Date: Wed Oct  3 12:16:42 2012
New Revision: 1393451

URL: http://svn.apache.org/viewvc?rev=1393451&view=rev
Log:
Polish the code

Modified:
    camel/trunk/examples/camel-example-cdi/pom.xml
    camel/trunk/examples/camel-example-cdi/src/test/java/org/apache/camel/example/cdi/ArchiveUtil.java
    camel/trunk/examples/camel-example-cdi/src/test/java/org/apache/camel/example/cdi/one/DeploymentFactory.java
    camel/trunk/examples/camel-example-cdi/src/test/java/org/apache/camel/example/cdi/two/DeploymentFactory.java
    camel/trunk/examples/camel-example-cdi/src/test/resources/arquillian.xml

Modified: camel/trunk/examples/camel-example-cdi/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-cdi/pom.xml?rev=1393451&r1=1393450&r2=1393451&view=diff
==============================================================================
--- camel/trunk/examples/camel-example-cdi/pom.xml (original)
+++ camel/trunk/examples/camel-example-cdi/pom.xml Wed Oct  3 12:16:42 2012
@@ -188,8 +188,8 @@
                         <artifactId>maven-surefire-plugin</artifactId>
                         <configuration>
                             <systemPropertyVariables>
-                                <arquillian.launch>weld-ee-embedded-1.1</arquillian.launch>
-                                <arquillian>weld-ee-embedded-1.1</arquillian>
+                                <arquillian.launch>weld-ee-embedded</arquillian.launch>
+                                <arquillian>weld-ee-embedded</arquillian>
                             </systemPropertyVariables>
                             <includes>
                                 <include>**/*Test.java</include>

Modified: camel/trunk/examples/camel-example-cdi/src/test/java/org/apache/camel/example/cdi/ArchiveUtil.java
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-cdi/src/test/java/org/apache/camel/example/cdi/ArchiveUtil.java?rev=1393451&r1=1393450&r2=1393451&view=diff
==============================================================================
--- camel/trunk/examples/camel-example-cdi/src/test/java/org/apache/camel/example/cdi/ArchiveUtil.java
(original)
+++ camel/trunk/examples/camel-example-cdi/src/test/java/org/apache/camel/example/cdi/ArchiveUtil.java
Wed Oct  3 12:16:42 2012
@@ -13,11 +13,10 @@ import org.jboss.shrinkwrap.resolver.api
 import java.io.File;
 
 /**
- *  Util class used to create Archive used by Arquillian
+ *  Util class used to create Jar or War archive used by Arquillian
  */
 public class ArchiveUtil {
 
-    //weld-ee-embedded-1.1
     @TargetsContainer("")
     public static Archive<?> createJarArchive(String[] packages) {
 
@@ -32,7 +31,6 @@ public class ArchiveUtil {
         return jar;
     }
 
-    // jbossas-managed
     @TargetsContainer("")
     public static Archive<?> createWarArchive(String[] packages) {
 

Modified: camel/trunk/examples/camel-example-cdi/src/test/java/org/apache/camel/example/cdi/one/DeploymentFactory.java
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-cdi/src/test/java/org/apache/camel/example/cdi/one/DeploymentFactory.java?rev=1393451&r1=1393450&r2=1393451&view=diff
==============================================================================
--- camel/trunk/examples/camel-example-cdi/src/test/java/org/apache/camel/example/cdi/one/DeploymentFactory.java
(original)
+++ camel/trunk/examples/camel-example-cdi/src/test/java/org/apache/camel/example/cdi/one/DeploymentFactory.java
Wed Oct  3 12:16:42 2012
@@ -25,6 +25,10 @@ import org.jboss.shrinkwrap.api.Archive;
  */
 public class DeploymentFactory {
 
+    private static String WELD_EMBEDDED_CONTAINER = "weld-ee-embedded";
+    private static String JBOSSAS_MANAGED_CONTAINER = "jbossas-managed";
+
+
     @Deployment
     public static Archive<?> createArchive() {
 
@@ -34,12 +38,10 @@ public class DeploymentFactory {
         // TODO FIND A BETTER WAY TO PASS PACKAGES
         String[] packages = {"org.apache.camel.example.cdi","org.apache.camel.example.cdi.one"};
 
-        System.out.println("Deployment type : " + deploymentType);
-
-        if (deploymentType.equals("weld-ee-embedded-1.1")) {
+        if (deploymentType.equals(WELD_EMBEDDED_CONTAINER)) {
             archive = ArchiveUtil.createJarArchive(packages);
 
-        } else if (deploymentType.equals("jbossas-managed")) {
+        } else if (deploymentType.equals(JBOSSAS_MANAGED_CONTAINER)) {
             archive =  ArchiveUtil.createWarArchive(packages);
         }
         return archive;

Modified: camel/trunk/examples/camel-example-cdi/src/test/java/org/apache/camel/example/cdi/two/DeploymentFactory.java
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-cdi/src/test/java/org/apache/camel/example/cdi/two/DeploymentFactory.java?rev=1393451&r1=1393450&r2=1393451&view=diff
==============================================================================
--- camel/trunk/examples/camel-example-cdi/src/test/java/org/apache/camel/example/cdi/two/DeploymentFactory.java
(original)
+++ camel/trunk/examples/camel-example-cdi/src/test/java/org/apache/camel/example/cdi/two/DeploymentFactory.java
Wed Oct  3 12:16:42 2012
@@ -21,10 +21,13 @@ import org.jboss.arquillian.container.te
 import org.jboss.shrinkwrap.api.Archive;
 
 /**
- *  Factory to create archive (jar, war)
+ *  Factory to select appropriate archive according to container
  */
 public class DeploymentFactory {
 
+    private static String WELD_EMBEDDED_CONTAINER = "weld-ee-embedded";
+    private static String JBOSSAS_MANAGED_CONTAINER = "jbossas-managed";
+
     @Deployment
     public static Archive<?> createArchive() {
 
@@ -34,12 +37,10 @@ public class DeploymentFactory {
         // TODO FIND A BETTER WAY TO PASS PACKAGES
         String[] packages = {"org.apache.camel.example.cdi","org.apache.camel.example.cdi.two"};
 
-        System.out.println("Deployment type : " + deploymentType);
-
-        if (deploymentType.equals("weld-ee-embedded-1.1")) {
+        if (deploymentType.equals(WELD_EMBEDDED_CONTAINER)) {
             archive = ArchiveUtil.createJarArchive(packages);
 
-        } else if (deploymentType.equals("jbossas-managed")) {
+        } else if (deploymentType.equals(JBOSSAS_MANAGED_CONTAINER)) {
             archive =  ArchiveUtil.createWarArchive(packages);
         }
         return archive;

Modified: camel/trunk/examples/camel-example-cdi/src/test/resources/arquillian.xml
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-cdi/src/test/resources/arquillian.xml?rev=1393451&r1=1393450&r2=1393451&view=diff
==============================================================================
--- camel/trunk/examples/camel-example-cdi/src/test/resources/arquillian.xml (original)
+++ camel/trunk/examples/camel-example-cdi/src/test/resources/arquillian.xml Wed Oct  3 12:16:42
2012
@@ -3,7 +3,7 @@
             xsi:schemaLocation="http://jboss.org/schema/arquillian
               http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
 
-    <container qualifier="weld-ee-embedded-1.1"/>
+    <container qualifier="weld-ee-embedded"/>
 
     <container qualifier="jbossas-managed">
         <configuration>



Mime
View raw message