camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bvah...@apache.org
Subject git commit: CAMEL-7037: Fixed the NPE when using the embedded or the run goal of guice-maven-plugin.
Date Wed, 04 Dec 2013 11:36:46 GMT
Updated Branches:
  refs/heads/camel-2.12.x c14b4f380 -> ba7071b2c


CAMEL-7037: Fixed the NPE when using the embedded or the run goal of guice-maven-plugin.


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

Branch: refs/heads/camel-2.12.x
Commit: ba7071b2c0b463194db28ec351f16788ad64836d
Parents: c14b4f3
Author: Babak Vahdat <bvahdat@apache.org>
Authored: Wed Dec 4 12:34:56 2013 +0100
Committer: Babak Vahdat <bvahdat@apache.org>
Committed: Wed Dec 4 12:36:37 2013 +0100

----------------------------------------------------------------------
 .../java/org/apache/camel/guice/maven/EmbeddedMojo.java  |  4 ++--
 .../main/java/org/apache/camel/guice/maven/RunMojo.java  | 11 ++++++++---
 2 files changed, 10 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/ba7071b2/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/EmbeddedMojo.java
----------------------------------------------------------------------
diff --git a/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/EmbeddedMojo.java
b/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/EmbeddedMojo.java
index 36d743e..ced1a95 100644
--- a/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/EmbeddedMojo.java
+++ b/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/EmbeddedMojo.java
@@ -45,8 +45,8 @@ public class EmbeddedMojo extends AbstractExecMojo {
      * A value <= 0 will run forever.
      * Adding a s indicates seconds - eg "5s" means 5 seconds.
      *
-     * @parameter property="-1"
-     * @readonly
+     * @parameter property="camel.duration"
+     *            default-value="-1"
      */
     protected String duration;
 

http://git-wip-us.apache.org/repos/asf/camel/blob/ba7071b2/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/RunMojo.java
----------------------------------------------------------------------
diff --git a/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/RunMojo.java
b/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/RunMojo.java
index 1f352d5..78c032d 100644
--- a/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/RunMojo.java
+++ b/tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/RunMojo.java
@@ -85,8 +85,8 @@ public class RunMojo extends AbstractExecMojo {
      * milliseconds. A value <= 0 will run forever.
      * Adding a s indicates seconds - eg "5s" means 5 seconds.
      *
-     * @parameter property="-1"
-     *
+     * @parameter property="camel.duration"
+     *            default-value="-1"
      */
     protected String duration;
 
@@ -374,6 +374,11 @@ public class RunMojo extends AbstractExecMojo {
                     }
                     main.invoke(main, new Object[] {arguments});
                 } catch (Exception e) { // just pass it on
+                    // let it be printed so end users can see the exception on the console
+                    getLog().error("*************************************");
+                    getLog().error("Error occurred while running main from: " + mainClass);
+                    getLog().error(e);
+                    getLog().error("*************************************");
                     Thread.currentThread().getThreadGroup().uncaughtException(Thread.currentThread(),
e);
                 }
             }
@@ -399,7 +404,7 @@ public class RunMojo extends AbstractExecMojo {
             try {
                 threadGroup.destroy();
             } catch (IllegalThreadStateException e) {
-                getLog().warn("Couldn't destroy threadgroup " + threadGroup, e);
+                getLog().warn("Couldn't destroy thread group " + threadGroup, e);
             }
         }
 


Mime
View raw message