camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dhira...@apache.org
Subject git commit: Minor polish in API component framework
Date Tue, 24 Jun 2014 21:57:15 GMT
Repository: camel
Updated Branches:
  refs/heads/master 5410a4f61 -> 2c1d870c0


Minor polish in API component framework


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

Branch: refs/heads/master
Commit: 2c1d870c09f8b4411c475092dd102a58116e632f
Parents: 5410a4f
Author: Dhiraj Bokde <dhirajsb@yahoo.com>
Authored: Tue Jun 24 14:57:06 2014 -0700
Committer: Dhiraj Bokde <dhirajsb@yahoo.com>
Committed: Tue Jun 24 14:57:06 2014 -0700

----------------------------------------------------------------------
 .../component/ApiMethodPropertiesHelper.java    |  9 +++------
 .../__artifactId__-component/pom.xml            | 21 +++++++++++++++-----
 2 files changed, 19 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/2c1d870c/camel-core/src/main/java/org/apache/camel/util/component/ApiMethodPropertiesHelper.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/util/component/ApiMethodPropertiesHelper.java
b/camel-core/src/main/java/org/apache/camel/util/component/ApiMethodPropertiesHelper.java
index e5e9441..685af97 100644
--- a/camel-core/src/main/java/org/apache/camel/util/component/ApiMethodPropertiesHelper.java
+++ b/camel-core/src/main/java/org/apache/camel/util/component/ApiMethodPropertiesHelper.java
@@ -74,16 +74,13 @@ public abstract class ApiMethodPropertiesHelper<C> {
     public void getEndpointProperties(Object endpointConfiguration,
                                              Map<String, Object> properties) {
 
+        Set<String> names = null;
         if (IntrospectionSupport.getProperties(endpointConfiguration, properties, null, false))
{
-            final Set<String> names = properties.keySet();
+            names = properties.keySet();
             // remove component config properties so we only have endpoint properties
             names.removeAll(componentConfigFields);
         }
-        if (LOG.isDebugEnabled()) {
-            final Set<String> names = properties.keySet();
-            LOG.debug("Found endpoint properties {}",
-                    names.retainAll(getValidEndpointProperties(endpointConfiguration)));
-        }
+        LOG.debug("Found endpoint properties {}", names);
     }
 
     public Set<String> getEndpointPropertyNames(Object endpointConfiguration) {

http://git-wip-us.apache.org/repos/asf/camel/blob/2c1d870c/tooling/archetypes/camel-archetype-api-component/src/main/resources/archetype-resources/__artifactId__-component/pom.xml
----------------------------------------------------------------------
diff --git a/tooling/archetypes/camel-archetype-api-component/src/main/resources/archetype-resources/__artifactId__-component/pom.xml
b/tooling/archetypes/camel-archetype-api-component/src/main/resources/archetype-resources/__artifactId__-component/pom.xml
index a77b6a3..b8df7f7 100644
--- a/tooling/archetypes/camel-archetype-api-component/src/main/resources/archetype-resources/__artifactId__-component/pom.xml
+++ b/tooling/archetypes/camel-archetype-api-component/src/main/resources/archetype-resources/__artifactId__-component/pom.xml
@@ -152,7 +152,6 @@
       <plugin>
         <groupId>org.apache.camel</groupId>
         <artifactId>camel-api-component-maven-plugin</artifactId>
-        <version>${camel-version}</version>
         <executions>
           <execution>
             <id>generate-test-component-classes</id>
@@ -160,10 +159,6 @@
               <goal>fromApis</goal>
             </goals>
             <configuration>
-              <scheme>${schemeName}</scheme>
-              <componentName>${componentName}</componentName>
-              <componentPackage>${componentPackage}</componentPackage>
-              <outPackage>${outPackage}</outPackage>
               <apis>
                 <api>
                   <apiName>hello-file</apiName>
@@ -262,6 +257,22 @@
 
     </plugins>
 
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.camel</groupId>
+          <artifactId>camel-api-component-maven-plugin</artifactId>
+          <version>${camel-version}</version>
+          <configuration>
+            <scheme>${schemeName}</scheme>
+            <componentName>${componentName}</componentName>
+            <componentPackage>${componentPackage}</componentPackage>
+            <outPackage>${outPackage}</outPackage>
+          </configuration>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+
   </build>
 
   <reporting>


Mime
View raw message