camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dhira...@apache.org
Subject [1/2] git commit: CAMEL-7772: Set blank apiName for single proxy class with null apiName
Date Mon, 01 Sep 2014 06:46:45 GMT
Repository: camel
Updated Branches:
  refs/heads/master 7f9959b65 -> 89a8b35b8


CAMEL-7772: Set blank apiName for single proxy class with null apiName


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

Branch: refs/heads/master
Commit: 89a8b35b8899f6c295012214f1b9342cd7d22feb
Parents: 6547fc7
Author: Dhiraj Bokde <dhirajsb@yahoo.com>
Authored: Sun Aug 31 23:40:19 2014 -0700
Committer: Dhiraj Bokde <dhirajsb@yahoo.com>
Committed: Sun Aug 31 23:41:09 2014 -0700

----------------------------------------------------------------------
 .../java/org/apache/camel/maven/ApiComponentGeneratorMojo.java  | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/89a8b35b/tooling/maven/camel-api-component-maven-plugin/src/main/java/org/apache/camel/maven/ApiComponentGeneratorMojo.java
----------------------------------------------------------------------
diff --git a/tooling/maven/camel-api-component-maven-plugin/src/main/java/org/apache/camel/maven/ApiComponentGeneratorMojo.java
b/tooling/maven/camel-api-component-maven-plugin/src/main/java/org/apache/camel/maven/ApiComponentGeneratorMojo.java
index e099c61..07532f8 100644
--- a/tooling/maven/camel-api-component-maven-plugin/src/main/java/org/apache/camel/maven/ApiComponentGeneratorMojo.java
+++ b/tooling/maven/camel-api-component-maven-plugin/src/main/java/org/apache/camel/maven/ApiComponentGeneratorMojo.java
@@ -70,6 +70,11 @@ public class ApiComponentGeneratorMojo extends AbstractApiMethodBaseMojo
{
         setSharedProjectState(true);
 
         try {
+            // fix apiName for single API use-case since Maven configurator sets empty parameters
as null!!!
+            if (apis.length == 1 && apis[0].getApiName() == null) {
+                apis[0].setApiName("");
+            }
+
             // generate API methods for each API proxy
             for (ApiProxy api : apis) {
                 // validate API configuration


Mime
View raw message