camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bvah...@apache.org
Subject git commit: Polished as per made suggestions on CAMEL-7023 which applies for the camel-guice-plugin as well.
Date Mon, 02 Dec 2013 19:29:46 GMT
Updated Branches:
  refs/heads/master fa48ad8e4 -> 708a3cb62


Polished as per made suggestions on CAMEL-7023 which applies for the camel-guice-plugin as
well.

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

Branch: refs/heads/master
Commit: 708a3cb6247fd3a30c7dd6ab7602ec84e0f2a0b6
Parents: fa48ad8
Author: Babak Vahdat <bvahdat@apache.org>
Authored: Mon Dec 2 20:29:33 2013 +0100
Committer: Babak Vahdat <bvahdat@apache.org>
Committed: Mon Dec 2 20:29:33 2013 +0100

----------------------------------------------------------------------
 .../src/main/java/org/apache/camel/guice/Main.java           | 4 ++--
 .../src/main/java/org/apache/camel/guice/maven/RunMojo.java  | 8 ++------
 2 files changed, 4 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/708a3cb6/components/camel-guice/src/main/java/org/apache/camel/guice/Main.java
----------------------------------------------------------------------
diff --git a/components/camel-guice/src/main/java/org/apache/camel/guice/Main.java b/components/camel-guice/src/main/java/org/apache/camel/guice/Main.java
index 4a200d4..76af353 100644
--- a/components/camel-guice/src/main/java/org/apache/camel/guice/Main.java
+++ b/components/camel-guice/src/main/java/org/apache/camel/guice/Main.java
@@ -37,6 +37,7 @@ import org.apache.camel.CamelContext;
 import org.apache.camel.ProducerTemplate;
 import org.apache.camel.guice.inject.Injectors;
 import org.apache.camel.main.MainSupport;
+import org.apache.camel.model.Constants;
 import org.apache.camel.util.ObjectHelper;
 import org.apache.camel.view.ModelFileGenerator;
 
@@ -164,7 +165,6 @@ public class Main extends MainSupport {
     }
 
     protected ModelFileGenerator createModelFileGenerator() throws JAXBException {
-        return new ModelFileGenerator(
-            JAXBContext.newInstance("org.apache.camel.model:org.apache.camel.model.config:org.apache.camel.model.dataformat:org.apache.camel.model.language:org.apache.camel.model.loadbalancer"));
+        return new ModelFileGenerator(JAXBContext.newInstance(Constants.JAXB_CONTEXT_PACKAGES));
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/708a3cb6/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 b96cf4b..82e60b7 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
@@ -367,12 +367,8 @@ public class RunMojo extends AbstractExecMojo {
             public void run() {
                 try {
                     Method main = Thread.currentThread().getContextClassLoader().loadClass(mainClass)
-                        .getMethod("main", new Class[] {String[].class});
-                    if (!main.isAccessible()) {
-                        getLog().debug("Setting accessibility to true in order to invoke
main().");
-                        main.setAccessible(true);
-                    }
-                    main.invoke(main, new Object[] {arguments});
+                                        .getMethod("main", String[].class);
+                    main.invoke(null, new Object[] {arguments});
                 } catch (Exception e) { // just pass it on
                     Thread.currentThread().getThreadGroup().uncaughtException(Thread.currentThread(),
e);
                 }


Mime
View raw message