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 2015/06/22 09:26:15 UTC
[1/3] camel git commit: Thanks Babak for spotting this.
Repository: camel
Updated Branches:
refs/heads/master d769cba8d -> 1ba91cba7
Thanks Babak for spotting this.
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/90d337e1
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/90d337e1
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/90d337e1
Branch: refs/heads/master
Commit: 90d337e1e0166a157fbbf63c2411ceba919f129e
Parents: d769cba
Author: Claus Ibsen <da...@apache.org>
Authored: Mon Jun 22 09:04:53 2015 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Mon Jun 22 09:04:53 2015 +0200
----------------------------------------------------------------------
.../java/org/apache/camel/maven/packaging/ErrorDetail.java | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/90d337e1/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/ErrorDetail.java
----------------------------------------------------------------------
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/ErrorDetail.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/ErrorDetail.java
index 3266a58..c85eb29 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/ErrorDetail.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/ErrorDetail.java
@@ -19,6 +19,9 @@ package org.apache.camel.maven.packaging;
import java.util.ArrayList;
import java.util.List;
+/**
+ * Holder to keep information about detected errors.
+ */
public final class ErrorDetail {
private String kind;
@@ -27,11 +30,11 @@ public final class ErrorDetail {
private boolean missingDescription;
private boolean missingSyntax;
private boolean missingUriPath;
- private List<String> missingComponentDocumentation = new ArrayList<>();
- private List<String> missingEndpointDocumentation = new ArrayList<>();
+ private final List<String> missingComponentDocumentation = new ArrayList<>();
+ private final List<String> missingEndpointDocumentation = new ArrayList<>();
public boolean hasErrors() {
- return missingLabel || missingDescription || missingDescription || missingUriPath || !missingComponentDocumentation.isEmpty() || !missingEndpointDocumentation.isEmpty();
+ return missingLabel || missingDescription || missingSyntax || missingUriPath || !missingComponentDocumentation.isEmpty() || !missingEndpointDocumentation.isEmpty();
}
public String getKind() {
[2/3] camel git commit: Component docs
Posted by da...@apache.org.
Component docs
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/67505910
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/67505910
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/67505910
Branch: refs/heads/master
Commit: 67505910e9788a4361d6d9c42c32bc052f32edab
Parents: 90d337e
Author: Claus Ibsen <da...@apache.org>
Authored: Mon Jun 22 09:28:28 2015 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Mon Jun 22 09:28:28 2015 +0200
----------------------------------------------------------------------
.../component/twitter/TwitterEndpointDirect.java | 6 ++----
.../component/twitter/TwitterEndpointEvent.java | 15 ++++++++-------
2 files changed, 10 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/67505910/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterEndpointDirect.java
----------------------------------------------------------------------
diff --git a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterEndpointDirect.java b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterEndpointDirect.java
index 2c6103f..bc5b350 100644
--- a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterEndpointDirect.java
+++ b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterEndpointDirect.java
@@ -26,16 +26,14 @@ import org.apache.camel.component.direct.DirectEndpoint;
import org.apache.camel.component.twitter.consumer.Twitter4JConsumer;
import org.apache.camel.component.twitter.consumer.TwitterConsumerDirect;
import org.apache.camel.component.twitter.data.EndpointType;
-import org.apache.camel.spi.UriEndpoint;
-import org.apache.camel.spi.UriParam;
/**
* Twitter direct endpoint
*/
-@UriEndpoint(scheme = "twitter", title = "Twitter", syntax = "twitter:type", consumerClass = Twitter4JConsumer.class, label = "api,social")
public class TwitterEndpointDirect extends DirectEndpoint implements TwitterEndpoint {
- @UriParam
+ // only TwitterEndpointPolling is annotated
+
private TwitterConfiguration properties;
public TwitterEndpointDirect(String uri, TwitterComponent component, TwitterConfiguration properties) {
http://git-wip-us.apache.org/repos/asf/camel/blob/67505910/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterEndpointEvent.java
----------------------------------------------------------------------
diff --git a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterEndpointEvent.java b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterEndpointEvent.java
index a250ceb..0690664 100644
--- a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterEndpointEvent.java
+++ b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterEndpointEvent.java
@@ -19,17 +19,14 @@ package org.apache.camel.component.twitter;
import org.apache.camel.Consumer;
import org.apache.camel.Processor;
import org.apache.camel.Producer;
-import org.apache.camel.component.direct.DirectEndpoint;
import org.apache.camel.component.twitter.consumer.Twitter4JConsumer;
import org.apache.camel.component.twitter.consumer.TwitterConsumerEvent;
import org.apache.camel.component.twitter.data.EndpointType;
-import org.apache.camel.spi.UriEndpoint;
-import org.apache.camel.spi.UriParam;
+import org.apache.camel.impl.DefaultEndpoint;
-@UriEndpoint(scheme = "twitter", title = "Twitter", syntax = "twitter:type", consumerClass = Twitter4JConsumer.class, label = "api,social")
-public class TwitterEndpointEvent extends DirectEndpoint implements TwitterEndpoint {
+public class TwitterEndpointEvent extends DefaultEndpoint implements TwitterEndpoint {
- @UriParam
+ // only TwitterEndpointPolling is annotated
private TwitterConfiguration properties;
public TwitterEndpointEvent(String uri, TwitterComponent component, TwitterConfiguration properties) {
@@ -62,11 +59,15 @@ public class TwitterEndpointEvent extends DirectEndpoint implements TwitterEndpo
}
@Override
+ public boolean isSingleton() {
+ return true;
+ }
+
+ @Override
protected void doStop() throws Exception {
super.doStop();
if (properties.getTwitterStream() != null) {
properties.getTwitterStream().shutdown();
}
}
-
}
[3/3] camel git commit: Polished
Posted by da...@apache.org.
Polished
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/1ba91cba
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/1ba91cba
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/1ba91cba
Branch: refs/heads/master
Commit: 1ba91cba7064add4dd910c1d14a386968a97639a
Parents: 6750591
Author: Claus Ibsen <da...@apache.org>
Authored: Mon Jun 22 09:28:59 2015 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Mon Jun 22 09:28:59 2015 +0200
----------------------------------------------------------------------
components/camel-twitter/pom.xml | 133 +++++++++++++++++-----------------
1 file changed, 67 insertions(+), 66 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/1ba91cba/components/camel-twitter/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-twitter/pom.xml b/components/camel-twitter/pom.xml
index f0533b3..4710719 100644
--- a/components/camel-twitter/pom.xml
+++ b/components/camel-twitter/pom.xml
@@ -15,62 +15,63 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
+ <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.camel</groupId>
- <artifactId>components</artifactId>
- <version>2.16-SNAPSHOT</version>
- </parent>
+ <parent>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>components</artifactId>
+ <version>2.16-SNAPSHOT</version>
+ </parent>
- <artifactId>camel-twitter</artifactId>
- <packaging>bundle</packaging>
- <name>Camel :: Twitter</name>
- <description>Camel Twitter support</description>
+ <artifactId>camel-twitter</artifactId>
+ <packaging>bundle</packaging>
+ <name>Camel :: Twitter</name>
+ <description>Camel Twitter support</description>
- <properties>
- <camel.osgi.export.pkg>org.apache.camel.component.twitter.*</camel.osgi.export.pkg>
- <camel.osgi.export.service>org.apache.camel.spi.ComponentResolver;component=twitter</camel.osgi.export.service>
- </properties>
+ <properties>
+ <camel.osgi.export.pkg>org.apache.camel.component.twitter.*</camel.osgi.export.pkg>
+ <camel.osgi.export.service>org.apache.camel.spi.ComponentResolver;component=twitter</camel.osgi.export.service>
+ </properties>
- <dependencies>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.twitter4j</groupId>
- <artifactId>twitter4j-core</artifactId>
- <version>${twitter4j-version}</version>
- </dependency>
- <dependency>
- <groupId>org.twitter4j</groupId>
- <artifactId>twitter4j-stream</artifactId>
- <version>${twitter4j-version}</version>
- </dependency>
-
- <!-- test dependencies -->
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-test</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- <scope>test</scope>
- </dependency>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.twitter4j</groupId>
+ <artifactId>twitter4j-core</artifactId>
+ <version>${twitter4j-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.twitter4j</groupId>
+ <artifactId>twitter4j-stream</artifactId>
+ <version>${twitter4j-version}</version>
+ </dependency>
- </dependencies>
-
- <build>
+ <!-- test dependencies -->
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-test</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+
+ <build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
@@ -78,17 +79,17 @@
<childDelegation>false</childDelegation>
<useFile>true</useFile>
<forkCount>1</forkCount>
- <reuseForks>true</reuseForks>
+ <reuseForks>true</reuseForks>
<forkedProcessTimeoutInSeconds>300</forkedProcessTimeoutInSeconds>
<includes>
- <!-- Here we only run test of -->
- <include>**/*UriConfigurationTest.java</include>
+ <!-- Here we only run test of -->
+ <include>**/*UriConfigurationTest.java</include>
</includes>
</configuration>
</plugin>
</plugins>
</build>
-
+
<profiles>
<profile>
<id>twitter-test</id>
@@ -96,18 +97,18 @@
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <childDelegation>false</childDelegation>
- <useFile>true</useFile>
- <forkCount>1</forkCount>
- <reuseForks>true</reuseForks>
- <forkedProcessTimeoutInSeconds>300</forkedProcessTimeoutInSeconds>
- <includes>
- <include>**/*Test.java</include>
- </includes>
- </configuration>
- </plugin>
- </plugins>
+ <configuration>
+ <childDelegation>false</childDelegation>
+ <useFile>true</useFile>
+ <forkCount>1</forkCount>
+ <reuseForks>true</reuseForks>
+ <forkedProcessTimeoutInSeconds>300</forkedProcessTimeoutInSeconds>
+ <includes>
+ <include>**/*Test.java</include>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
</build>
</profile>
</profiles>