You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2014/12/18 08:00:51 UTC

[1/2] camel git commit: Fixed @UriPath for new component.

Repository: camel
Updated Branches:
  refs/heads/master d04e5c9cc -> 0b1a1c506


Fixed @UriPath for new component.


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

Branch: refs/heads/master
Commit: 388b597d99439e208e7ed83f940371d584de3f3a
Parents: d04e5c9
Author: Claus Ibsen <da...@apache.org>
Authored: Thu Dec 18 07:51:09 2014 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Thu Dec 18 07:51:09 2014 +0100

----------------------------------------------------------------------
 .../google/mail/GoogleMailComponent.java        |  2 ++
 .../google/mail/GoogleMailConfiguration.java    | 25 +++++++++++++++++++-
 .../google/mail/GoogleMailEndpoint.java         |  8 +++++--
 3 files changed, 32 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/388b597d/components/camel-google-mail/src/main/java/org/apache/camel/component/google/mail/GoogleMailComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-google-mail/src/main/java/org/apache/camel/component/google/mail/GoogleMailComponent.java b/components/camel-google-mail/src/main/java/org/apache/camel/component/google/mail/GoogleMailComponent.java
index 8e02bdd..2f5631b 100644
--- a/components/camel-google-mail/src/main/java/org/apache/camel/component/google/mail/GoogleMailComponent.java
+++ b/components/camel-google-mail/src/main/java/org/apache/camel/component/google/mail/GoogleMailComponent.java
@@ -68,6 +68,8 @@ public class GoogleMailComponent extends AbstractApiComponent<GoogleMailApiName,
 
     @Override
     protected Endpoint createEndpoint(String uri, String methodName, GoogleMailApiName apiName, GoogleMailConfiguration endpointConfiguration) {
+        endpointConfiguration.setApiName(apiName);
+        endpointConfiguration.setMethodName(methodName);
         return new GoogleMailEndpoint(uri, this, apiName, methodName, endpointConfiguration);
     }
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/388b597d/components/camel-google-mail/src/main/java/org/apache/camel/component/google/mail/GoogleMailConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-google-mail/src/main/java/org/apache/camel/component/google/mail/GoogleMailConfiguration.java b/components/camel-google-mail/src/main/java/org/apache/camel/component/google/mail/GoogleMailConfiguration.java
index 1b9417e..913a9cc 100644
--- a/components/camel-google-mail/src/main/java/org/apache/camel/component/google/mail/GoogleMailConfiguration.java
+++ b/components/camel-google-mail/src/main/java/org/apache/camel/component/google/mail/GoogleMailConfiguration.java
@@ -20,9 +20,10 @@ import java.util.Arrays;
 import java.util.List;
 
 import com.google.api.services.gmail.GmailScopes;
-
+import org.apache.camel.component.google.mail.internal.GoogleMailApiName;
 import org.apache.camel.spi.UriParam;
 import org.apache.camel.spi.UriParams;
+import org.apache.camel.spi.UriPath;
 
 /**
  * Component configuration for GoogleMail component.
@@ -31,6 +32,12 @@ import org.apache.camel.spi.UriParams;
 public class GoogleMailConfiguration {
     private static final List<String> DEFAULT_SCOPES = Arrays.asList(GmailScopes.GMAIL_COMPOSE, GmailScopes.GMAIL_MODIFY, GmailScopes.MAIL_GOOGLE_COM);
 
+    @UriPath
+    private GoogleMailApiName apiName;
+
+    @UriPath
+    private String methodName;
+
     @UriParam
     private List<String> scopes = DEFAULT_SCOPES;
 
@@ -49,6 +56,22 @@ public class GoogleMailConfiguration {
     @UriParam
     private String applicationName;
 
+    public GoogleMailApiName getApiName() {
+        return apiName;
+    }
+
+    public void setApiName(GoogleMailApiName apiName) {
+        this.apiName = apiName;
+    }
+
+    public String getMethodName() {
+        return methodName;
+    }
+
+    public void setMethodName(String methodName) {
+        this.methodName = methodName;
+    }
+
     public String getClientId() {
         return clientId;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/388b597d/components/camel-google-mail/src/main/java/org/apache/camel/component/google/mail/GoogleMailEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-google-mail/src/main/java/org/apache/camel/component/google/mail/GoogleMailEndpoint.java b/components/camel-google-mail/src/main/java/org/apache/camel/component/google/mail/GoogleMailEndpoint.java
index d203670..a25acc5 100644
--- a/components/camel-google-mail/src/main/java/org/apache/camel/component/google/mail/GoogleMailEndpoint.java
+++ b/components/camel-google-mail/src/main/java/org/apache/camel/component/google/mail/GoogleMailEndpoint.java
@@ -28,6 +28,7 @@ import org.apache.camel.component.google.mail.internal.GoogleMailApiName;
 import org.apache.camel.component.google.mail.internal.GoogleMailConstants;
 import org.apache.camel.component.google.mail.internal.GoogleMailPropertiesHelper;
 import org.apache.camel.spi.UriEndpoint;
+import org.apache.camel.spi.UriParam;
 import org.apache.camel.util.component.AbstractApiEndpoint;
 import org.apache.camel.util.component.ApiMethod;
 import org.apache.camel.util.component.ApiMethodPropertiesHelper;
@@ -35,15 +36,18 @@ import org.apache.camel.util.component.ApiMethodPropertiesHelper;
 /**
  * Represents a GoogleMail endpoint.
  */
-@UriEndpoint(scheme = "google-mail", consumerClass = GoogleMailConsumer.class, consumerPrefix = "consumer")
+@UriEndpoint(scheme = "google-mail", consumerClass = GoogleMailConsumer.class, consumerPrefix = "consumer", label = "api,cloud,mail")
 public class GoogleMailEndpoint extends AbstractApiEndpoint<GoogleMailApiName, GoogleMailConfiguration> {
 
     // TODO create and manage API proxy
     private Object apiProxy;
 
+    @UriParam
+    private GoogleMailConfiguration configuration;
+
     public GoogleMailEndpoint(String uri, GoogleMailComponent component, GoogleMailApiName apiName, String methodName, GoogleMailConfiguration endpointConfiguration) {
         super(uri, component, apiName, methodName, GoogleMailApiCollection.getCollection().getHelper(apiName), endpointConfiguration);
-
+        this.configuration = endpointConfiguration;
     }
 
     @Override


[2/2] camel git commit: CAMEL-7999: Skip include spring boot json files.

Posted by da...@apache.org.
CAMEL-7999: Skip include spring boot json files.


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

Branch: refs/heads/master
Commit: 0b1a1c5063853de2bc72e191d5eb6b81ee59f02b
Parents: 388b597
Author: Claus Ibsen <da...@apache.org>
Authored: Thu Dec 18 08:00:39 2014 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Thu Dec 18 08:00:39 2014 +0100

----------------------------------------------------------------------
 .../org/apache/camel/maven/packaging/PrepareCatalogMojo.java   | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/0b1a1c50/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareCatalogMojo.java
----------------------------------------------------------------------
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareCatalogMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareCatalogMojo.java
index 7d43e25..ec6c4c7 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareCatalogMojo.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareCatalogMojo.java
@@ -294,8 +294,10 @@ public class PrepareCatalogMojo extends AbstractMojo {
         File[] files = dir.listFiles(filter);
         if (files != null) {
             for (File file : files) {
-                boolean jsonFile = file.isFile() && file.getName().endsWith(".json");
-                boolean componentFile = file.isFile() && file.getName().equals("component.properties");
+                // skip files in root dirs as Camel does not store information there but others may do
+                boolean rootDir = "classes".equals(dir.getName()) || "META-INF".equals(dir.getName());
+                boolean jsonFile = !rootDir && file.isFile() && file.getName().endsWith(".json");
+                boolean componentFile = !rootDir && file.isFile() && file.getName().equals("component.properties");
                 if (jsonFile) {
                     found.add(file);
                 } else if (componentFile) {