camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [2/2] git commit: Polished the salesforce pom.xml to be like the others. And added some info logging how many classes the component found on startup.
Date Thu, 16 Jan 2014 10:17:35 GMT
Polished the salesforce pom.xml to be like the others. And added some info logging how many
classes the component found on startup.


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

Branch: refs/heads/camel-2.12.x
Commit: 827a1a53ea458420ac1e6d16cbd2c73e09a357de
Parents: 71abad2
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Thu Jan 16 11:21:08 2014 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Thu Jan 16 11:21:28 2014 +0100

----------------------------------------------------------------------
 .../camel-salesforce-component/pom.xml          | 10 +++---
 .../salesforce/SalesforceComponent.java         |  9 ++++-
 .../src/test/resources/log4j.properties         | 38 ++++++++++++++------
 3 files changed, 41 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/827a1a53/components/camel-salesforce/camel-salesforce-component/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-component/pom.xml b/components/camel-salesforce/camel-salesforce-component/pom.xml
index 528b266..bd54d1d 100644
--- a/components/camel-salesforce/camel-salesforce-component/pom.xml
+++ b/components/camel-salesforce/camel-salesforce-component/pom.xml
@@ -31,11 +31,11 @@
   <description>Camel Salesforce support</description>
 
   <properties>
-    <camel.osgi.export.pkg />
-    <camel.osgi.export>
-      org.apache.camel.component.salesforce;version=${project.version},
-      org.apache.camel.component.salesforce.api.*;version=${project.version}
-    </camel.osgi.export>
+    <camel.osgi.export.pkg>
+      org.apache.camel.component.salesforce,
+      org.apache.camel.component.salesforce.api.*
+    </camel.osgi.export.pkg>
+    <camel.osgi.export.service>org.apache.camel.spi.ComponentResolver;component=salesforce</camel.osgi.export.service>
     <camel.osgi.private.pkg>org.apache.camel.component.salesforce.internal.*</camel.osgi.private.pkg>
   </properties>
 

http://git-wip-us.apache.org/repos/asf/camel/blob/827a1a53/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceComponent.java
b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceComponent.java
index f4ae8c9..b6302bb 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceComponent.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceComponent.java
@@ -18,7 +18,13 @@ package org.apache.camel.component.salesforce;
 
 import java.lang.reflect.Field;
 import java.lang.reflect.Modifier;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
@@ -153,6 +159,7 @@ public class SalesforceComponent extends UriEndpointComponent implements
Endpoin
         if (packages != null && packages.length > 0) {
             // parse the packages to create SObject name to class map
             classMap = parsePackages();
+            LOG.info("Found {} generated classes in packages: {}", classMap.size(), Arrays.asList(packages));
         } else {
             // use an empty map to avoid NPEs later
             LOG.warn("Missing property packages, getSObject* operations will NOT work");

http://git-wip-us.apache.org/repos/asf/camel/blob/827a1a53/components/camel-salesforce/camel-salesforce-component/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/resources/log4j.properties
b/components/camel-salesforce/camel-salesforce-component/src/test/resources/log4j.properties
index 9bbf19e..7ddaf0f 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/resources/log4j.properties
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/resources/log4j.properties
@@ -1,18 +1,36 @@
+## ------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ------------------------------------------------------------------------
+
 #
-# The logging properties used
+# The logging properties used for testing.
 #
-log4j.rootLogger=INFO, out
+log4j.rootLogger=INFO, file
 
-# uncomment the following line to turn on Camel debugging
-#log4j.logger.org.apache.camel=DEBUG
+# uncomment the following to enable camel debugging
+#log4j.logger.org.apache.camel.component.salesforce=DEBUG
 
 # CONSOLE appender not used by default
 log4j.appender.out=org.apache.log4j.ConsoleAppender
 log4j.appender.out.layout=org.apache.log4j.PatternLayout
-log4j.appender.out.layout.ConversionPattern=[%30.30t] %-30.30c{1} %-5p %m%n
-#log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
-
-log4j.throwableRenderer=org.apache.log4j.EnhancedThrowableRenderer
+#log4j.appender.out.layout.ConversionPattern=[%30.30t] %-30.30c{1} %-5p %m%n
+log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
 
-#log4j.logger.org.apache.http=DEBUG
-#log4j.logger.org.apache.camel.component.salesforce=TRACE
+# File appender
+log4j.appender.file=org.apache.log4j.FileAppender
+log4j.appender.file.layout=org.apache.log4j.PatternLayout
+log4j.appender.file.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
+log4j.appender.file.file=target/camel-salesforce-test.log


Mime
View raw message