[1/2] camel git commit: Fixed tests

2015-08-06 Thread davsclaus
Repository: camel
Updated Branches:
  refs/heads/master cc158b2ac - 0a5c9a2c9


Fixed tests


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

Branch: refs/heads/master
Commit: 7e54c2f5eaea6ff53744df48977a5fe175a13f52
Parents: cc158b2
Author: Claus Ibsen davscl...@apache.org
Authored: Thu Aug 6 10:42:03 2015 +0200
Committer: Claus Ibsen davscl...@apache.org
Committed: Thu Aug 6 10:42:03 2015 +0200

--
 .../org/apache/camel/component/quartz/QuartzHelper.java   |  3 ++-
 .../org/apache/camel/component/quartz/BaseQuartzTest.java |  6 --
 .../camel/component/quartz/QuartzManagementTest.java  | 10 --
 3 files changed, 6 insertions(+), 13 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/7e54c2f5/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzHelper.java
--
diff --git 
a/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzHelper.java
 
b/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzHelper.java
index 676fbb2..3ed1dda 100644
--- 
a/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzHelper.java
+++ 
b/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzHelper.java
@@ -28,7 +28,8 @@ public final class QuartzHelper {
 if (camelContext.getManagementName() != null) {
 return camelContext.getManagementName();
 } else {
-return camelContext.getManagementNameStrategy().getName();
+// fallback as name
+return camelContext.getName();
 }
 }
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/7e54c2f5/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/BaseQuartzTest.java
--
diff --git 
a/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/BaseQuartzTest.java
 
b/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/BaseQuartzTest.java
index 512d48b..8508e15 100644
--- 
a/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/BaseQuartzTest.java
+++ 
b/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/BaseQuartzTest.java
@@ -17,11 +17,13 @@
 package org.apache.camel.component.quartz;
 
 import org.apache.camel.CamelContext;
+import org.apache.camel.management.JmxSystemPropertyKeys;
 import org.apache.camel.test.junit4.CamelTestSupport;
 
 public class BaseQuartzTest extends CamelTestSupport {
 
-protected boolean isEnableJmx() {
+@Override
+protected boolean useJmx() {
 return true;
 }
 
@@ -30,7 +32,7 @@ public class BaseQuartzTest extends CamelTestSupport {
 CamelContext context = super.createCamelContext();
 
 QuartzComponent quartz = context.getComponent(quartz, 
QuartzComponent.class);
-quartz.setEnableJmx(isEnableJmx());
+quartz.setEnableJmx(useJmx());
 
 return context;
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/7e54c2f5/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/QuartzManagementTest.java
--
diff --git 
a/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/QuartzManagementTest.java
 
b/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/QuartzManagementTest.java
index b428fed..fa8ead7 100644
--- 
a/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/QuartzManagementTest.java
+++ 
b/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/QuartzManagementTest.java
@@ -24,16 +24,6 @@ import org.junit.Test;
 
 public class QuartzManagementTest extends BaseQuartzTest {
 
-@Override
-protected boolean useJmx() {
-return true;
-}
-
-@Override
-protected boolean isEnableJmx() {
-return true;
-}
-
 protected MBeanServer getMBeanServer() {
 return 
context.getManagementStrategy().getManagementAgent().getMBeanServer();
 }



camel git commit: camel-jclouds requires guice 3

2015-08-06 Thread davsclaus
Repository: camel
Updated Branches:
  refs/heads/master 0a5c9a2c9 - c9a5fe8e9


camel-jclouds requires guice 3


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

Branch: refs/heads/master
Commit: c9a5fe8e9b51e3a6c7d0fd8312d4df2bf0047546
Parents: 0a5c9a2
Author: Claus Ibsen davscl...@apache.org
Authored: Thu Aug 6 11:26:19 2015 +0200
Committer: Claus Ibsen davscl...@apache.org
Committed: Thu Aug 6 11:26:19 2015 +0200

--
 components/camel-jclouds/pom.xml | 98 ++-
 parent/pom.xml   |  3 +-
 2 files changed, 53 insertions(+), 48 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/c9a5fe8e/components/camel-jclouds/pom.xml
--
diff --git a/components/camel-jclouds/pom.xml b/components/camel-jclouds/pom.xml
index 21fec12..bf71510 100644
--- a/components/camel-jclouds/pom.xml
+++ b/components/camel-jclouds/pom.xml
@@ -17,60 +17,64 @@
 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;
-modelVersion4.0.0/modelVersion
+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;
+  modelVersion4.0.0/modelVersion
 
-parent
-groupIdorg.apache.camel/groupId
-artifactIdcomponents/artifactId
-version2.16-SNAPSHOT/version
-/parent
+  parent
+groupIdorg.apache.camel/groupId
+artifactIdcomponents/artifactId
+version2.16-SNAPSHOT/version
+  /parent
 
-artifactIdcamel-jclouds/artifactId
-packagingbundle/packaging
-nameCamel :: JClouds/name
-descriptionCamel JClouds support/description
+  artifactIdcamel-jclouds/artifactId
+  packagingbundle/packaging
+  nameCamel :: JClouds/name
+  descriptionCamel JClouds support/description
 
-properties
-camel.osgi.import.before.defaults
-
com.google.common.*;version=${jclouds-google-guava-version-range},
-/camel.osgi.import.before.defaults
+  properties
+camel.osgi.import.before.defaults
+  com.google.common.*;version=${jclouds-google-guava-version-range},
+/camel.osgi.import.before.defaults
 
-
camel.osgi.export.pkgorg.apache.camel.component.jclouds.*/camel.osgi.export.pkg
-
camel.osgi.export.serviceorg.apache.camel.spi.ComponentResolver;component=jclouds/camel.osgi.export.service
-
google-guava-version${jclouds-google-guava-version}/google-guava-version
-/properties
+
camel.osgi.export.pkgorg.apache.camel.component.jclouds.*/camel.osgi.export.pkg
+
camel.osgi.export.serviceorg.apache.camel.spi.ComponentResolver;component=jclouds/camel.osgi.export.service
 
-dependencies
-dependency
-groupIdorg.apache.camel/groupId
-artifactIdcamel-core/artifactId
-/dependency
+!-- jclouds requires guice 3 --
+
google-guava-version${jclouds-google-guava-version}/google-guava-version
+guice-version${guice3-version}/guice-version
+  /properties
 
-!-- jclouds --
-dependency
-groupIdorg.apache.jclouds/groupId
-artifactIdjclouds-blobstore/artifactId
-version${jclouds-version}/version
-/dependency
+  dependencies
+dependency
+  groupIdorg.apache.camel/groupId
+  artifactIdcamel-core/artifactId
+/dependency
 
- dependency
-groupIdorg.apache.jclouds/groupId
-artifactIdjclouds-compute/artifactId
-version${jclouds-version}/version
-/dependency
+!-- jclouds --
+dependency
+  groupIdorg.apache.jclouds/groupId
+  artifactIdjclouds-blobstore/artifactId
+  version${jclouds-version}/version
+/dependency
 
-!-- test --
-dependency
-groupIdorg.apache.camel/groupId
-artifactIdcamel-test-spring/artifactId
-scopetest/scope
-/dependency
-dependency
-groupIdorg.slf4j/groupId
-artifactIdslf4j-log4j12/artifactId
-scopetest/scope
-/dependency
+dependency
+  groupIdorg.apache.jclouds/groupId
+  artifactIdjclouds-compute/artifactId
+  version${jclouds-version}/version
+/dependency
 
-/dependencies
+!-- test --
+dependency
+  groupIdorg.apache.camel/groupId
+  artifactIdcamel-test-spring/artifactId
+  scopetest/scope
+

svn commit: r960945 - in /websites/production/camel/content: book-in-one-page.html book-pattern-appendix.html cache/main.pageCache message-endpoint.html

2015-08-06 Thread buildbot
Author: buildbot
Date: Thu Aug  6 09:20:37 2015
New Revision: 960945

Log:
Production update by buildbot for camel

Modified:
websites/production/camel/content/book-in-one-page.html
websites/production/camel/content/book-pattern-appendix.html
websites/production/camel/content/cache/main.pageCache
websites/production/camel/content/message-endpoint.html

Modified: websites/production/camel/content/book-in-one-page.html
==
--- websites/production/camel/content/book-in-one-page.html (original)
+++ websites/production/camel/content/book-in-one-page.html Thu Aug  6 09:20:37 
2015
@@ -3685,11 +3685,11 @@ The tutorial has been designed in two pa
 While not actual tutorials you might find working through the source of the 
various a shape=rect href=examples.htmlExamples/a useful./li/ul
 
 h2 id=BookInOnePage-TutorialonSpringRemotingwithJMSTutorial on Spring 
Remoting with JMS/h2p#160;/pdiv class=confluence-information-macro 
confluence-information-macro-informationp class=titleThanks/pspan 
class=aui-icon aui-icon-small aui-iconfont-info 
confluence-information-macro-icon/spandiv 
class=confluence-information-macro-bodypThis tutorial was kindly donated 
to Apache Camel by Martin Gilday./p/div/divh2 
id=BookInOnePage-PrefacePreface/h2pThis tutorial aims to guide the 
reader through the stages of creating a project which uses Camel to facilitate 
the routing of messages from a JMS queue to a a shape=rect 
class=external-link href=http://www.springramework.org; 
rel=nofollowSpring/a service. The route works in a synchronous fashion 
returning a response to the client./ppstyle type=text/css/*![CDATA[*/
-div.rbtoc1438777098451 {padding: 0px;}
-div.rbtoc1438777098451 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1438777098451 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1438852726461 {padding: 0px;}
+div.rbtoc1438852726461 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1438852726461 li {margin-left: 0px;padding-left: 0px;}
 
-/*]]*//style/pdiv class=toc-macro rbtoc1438777098451
+/*]]*//style/pdiv class=toc-macro rbtoc1438852726461
 ul class=toc-indentationlia shape=rect 
href=#BookInOnePage-TutorialonSpringRemotingwithJMSTutorial on Spring 
Remoting with JMS/a/lilia shape=rect 
href=#BookInOnePage-PrefacePreface/a/lilia shape=rect 
href=#BookInOnePage-PrerequisitesPrerequisites/a/lilia shape=rect 
href=#BookInOnePage-DistributionDistribution/a/lilia shape=rect 
href=#BookInOnePage-AboutAbout/a/lilia shape=rect 
href=#BookInOnePage-CreatetheCamelProjectCreate the Camel Project/a
 ul class=toc-indentationlia shape=rect 
href=#BookInOnePage-UpdatethePOMwithDependenciesUpdate the POM with 
Dependencies/a/li/ul
 /lilia shape=rect href=#BookInOnePage-WritingtheServerWriting the 
Server/a
@@ -5789,11 +5789,11 @@ So we completed the last piece in the pi
 pThis example has been removed from strongCamel 2.9/strong onwards. 
Apache Axis 1.4 is a very old and unsupported framework. We encourage users to 
use a shape=rect href=cxf.htmlCXF/a instead of Axis./p/div/div
 
 style type=text/css/*![CDATA[*/
-div.rbtoc1438777098902 {padding: 0px;}
-div.rbtoc1438777098902 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1438777098902 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1438852727063 {padding: 0px;}
+div.rbtoc1438852727063 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1438852727063 li {margin-left: 0px;padding-left: 0px;}
 
-/*]]*//stylediv class=toc-macro rbtoc1438777098902
+/*]]*//stylediv class=toc-macro rbtoc1438852727063
 ul class=toc-indentationlia shape=rect 
href=#BookInOnePage-TutorialusingAxis1.4withApacheCamelTutorial using Axis 
1.4 with Apache Camel/a
 ul class=toc-indentationlia shape=rect 
href=#BookInOnePage-PrerequisitesPrerequisites/a/lilia shape=rect 
href=#BookInOnePage-DistributionDistribution/a/lilia shape=rect 
href=#BookInOnePage-IntroductionIntroduction/a/lilia shape=rect 
href=#BookInOnePage-SettinguptheprojecttorunAxisSetting up the project to 
run Axis/a
 ul class=toc-indentationlia shape=rect 
href=#BookInOnePage-Maven2Maven 2/a/lilia shape=rect 
href=#BookInOnePage-wsdlwsdl/a/lilia shape=rect 
href=#BookInOnePage-ConfiguringAxisConfiguring Axis/a/lilia 
shape=rect href=#BookInOnePage-RunningtheExampleRunning the 
Example/a/li/ul
@@ -12175,7 +12175,7 @@ from(quot;activemq:My.Queuequot;).
 /div/divp#160;/ph3 id=BookInOnePage-DynamicToDynamic 
To/h3pstrongAvailable as of Camel 2.16/strong/ppThere is a new 
lt;toDgt; that allows to send a message to a dynamic computed#160;a 
shape=rect href=endpoint.htmlEndpoint/a using one or more#160;a 
shape=rect href=expression.htmlExpression/a that are concat together. By 
default the#160;a shape=rect href=simple.htmlSimple/a language is used 
to compute the#160;endpoint. For example to send a message to a endpoint 
defined by a header you can do/pdiv class=code panel pdl 
style=border-width: 1px;div class=codeContent panelContent pdl
 script class=brush: 

[2/2] camel git commit: Start implementing the CoAP producer

2015-08-06 Thread dkulp
Start implementing the CoAP producer


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

Branch: refs/heads/master
Commit: d7803241b619273896497c5aa35d933aaf21a201
Parents: cad2ca3
Author: Daniel Kulp dk...@apache.org
Authored: Thu Aug 6 15:23:44 2015 -0400
Committer: Daniel Kulp dk...@apache.org
Committed: Thu Aug 6 15:23:44 2015 -0400

--
 .../org/apache/camel/coap/CoAPProducer.java | 68 ++--
 .../apache/camel/coap/CoAPComponentTest.java| 22 +--
 2 files changed, 81 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/d7803241/components/camel-coap/src/main/java/org/apache/camel/coap/CoAPProducer.java
--
diff --git 
a/components/camel-coap/src/main/java/org/apache/camel/coap/CoAPProducer.java 
b/components/camel-coap/src/main/java/org/apache/camel/coap/CoAPProducer.java
index 70ab363..a3fead9 100644
--- 
a/components/camel-coap/src/main/java/org/apache/camel/coap/CoAPProducer.java
+++ 
b/components/camel-coap/src/main/java/org/apache/camel/coap/CoAPProducer.java
@@ -16,17 +16,21 @@
  */
 package org.apache.camel.coap;
 
+import java.net.URI;
+
 import org.apache.camel.Exchange;
+import org.apache.camel.Message;
 import org.apache.camel.impl.DefaultProducer;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.eclipse.californium.core.CoapClient;
+import org.eclipse.californium.core.CoapResponse;
+import org.eclipse.californium.core.coap.MediaTypeRegistry;
 
 /**
  * The CoAP producer.
  */
 public class CoAPProducer extends DefaultProducer {
-private static final Logger LOG = 
LoggerFactory.getLogger(CoAPProducer.class);
-private CoAPEndpoint endpoint;
+private final CoAPEndpoint endpoint;
+private CoapClient client;
 
 public CoAPProducer(CoAPEndpoint endpoint) {
 super(endpoint);
@@ -34,7 +38,61 @@ public class CoAPProducer extends DefaultProducer {
 }
 
 public void process(Exchange exchange) throws Exception {
-System.out.println(exchange.getIn().getBody());
+CoapClient client = getClient(exchange);
+String ct = exchange.getIn().getHeader(Exchange.CONTENT_TYPE, 
String.class);
+if (ct == null) {
+//?default?
+ct = application/octet-stream;
+}
+String method = exchange.getIn().getHeader(Exchange.HTTP_METHOD, 
String.class);
+if (method == null) {
+method = endpoint.getCoapMethod();
+}
+if (method == null) {
+Object body = exchange.getIn().getBody();
+if (body == null) {
+method = GET;
+} else {
+method = POST;
+}
+}
+int mediaType = MediaTypeRegistry.parse(ct);
+CoapResponse response = null;
+switch (method) {
+case GET:
+response = client.get();
+break;
+case DELETE:
+response = client.delete();
+break;
+case POST:
+byte[] bodyPost = exchange.getIn().getBody(byte[].class);
+response = client.post(bodyPost, mediaType);
+break;
+case PUT:
+byte[] bodyPut = exchange.getIn().getBody(byte[].class);
+response = client.put(bodyPut, mediaType);
+break;
+default:
+break;
+}
+
+if (response != null) {
+Message resp = exchange.getOut();
+String mt = 
MediaTypeRegistry.toString(response.getOptions().getContentFormat());
+resp.setHeader(org.apache.camel.Exchange.CONTENT_TYPE, mt);
+resp.setBody(response.getPayload());
+}
 }
 
+private synchronized CoapClient getClient(Exchange exchange) {
+if (client == null) {
+URI uri = exchange.getIn().getHeader(coapUri, URI.class);
+if (uri == null) {
+uri = endpoint.getUri();
+}
+client = new CoapClient(uri);
+}
+return client;
+}
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/d7803241/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPComponentTest.java
--
diff --git 
a/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPComponentTest.java
 
b/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPComponentTest.java
index e5dd94b..71c538d 100644
--- 
a/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPComponentTest.java
+++ 

[1/2] camel git commit: Make sure the jetty9 jars are before camel-jetty-common so that when pulled into eclipse, we don't get the jetty8 jars

2015-08-06 Thread dkulp
Repository: camel
Updated Branches:
  refs/heads/master cae52275b - d7803241b


Make sure the jetty9 jars are before camel-jetty-common so that when pulled 
into eclipse, we don't get the jetty8 jars


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

Branch: refs/heads/master
Commit: cad2ca3b01f28685ee058ba6fc3d12da7e6f514a
Parents: cae5227
Author: Daniel Kulp dk...@apache.org
Authored: Thu Aug 6 14:58:46 2015 -0400
Committer: Daniel Kulp dk...@apache.org
Committed: Thu Aug 6 14:58:46 2015 -0400

--
 components/camel-jetty9/pom.xml | 22 +++---
 1 file changed, 11 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/cad2ca3b/components/camel-jetty9/pom.xml
--
diff --git a/components/camel-jetty9/pom.xml b/components/camel-jetty9/pom.xml
index 2175d3d..b073563 100644
--- a/components/camel-jetty9/pom.xml
+++ b/components/camel-jetty9/pom.xml
@@ -57,17 +57,6 @@
   /exclusions
 /dependency
 dependency
-  groupIdorg.apache.camel/groupId
-  artifactIdcamel-jetty-common/artifactId
-  exclusions
-!-- must use the servlet-api that jetty 9 provides which is 3.1 --
-exclusion
-  groupIdorg.apache.geronimo.specs/groupId
-  artifactIdgeronimo-servlet_3.0_spec/artifactId
-/exclusion
-  /exclusions
-/dependency
-dependency
   groupIdorg.eclipse.jetty/groupId
   artifactIdjetty-server/artifactId
   version${jetty9-version}/version
@@ -104,6 +93,17 @@
   version${jetty9-version}/version
 /dependency
 
+dependency
+groupIdorg.apache.camel/groupId
+artifactIdcamel-jetty-common/artifactId
+exclusions
+!-- must use the servlet-api that jetty 9 provides which is 3.1 
--
+exclusion
+groupIdorg.apache.geronimo.specs/groupId
+artifactIdgeronimo-servlet_3.0_spec/artifactId
+/exclusion
+/exclusions
+/dependency
 !-- test dependencies --
 dependency
   groupIdorg.apache.camel/groupId



camel git commit: CAMEL-9059: Jetty exposes its endpoint without component name

2015-08-06 Thread davsclaus
Repository: camel
Updated Branches:
  refs/heads/master c9a5fe8e9 - a5165015c


CAMEL-9059: Jetty exposes its endpoint without component name


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

Branch: refs/heads/master
Commit: a5165015cb6e239989e37d7e03bbbd5327e9075c
Parents: c9a5fe8
Author: Claus Ibsen davscl...@apache.org
Authored: Thu Aug 6 15:27:51 2015 +0200
Committer: Claus Ibsen davscl...@apache.org
Committed: Thu Aug 6 15:27:51 2015 +0200

--
 .../org/apache/camel/component/jetty/JettyHttpComponent.java | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/a5165015/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java
--
diff --git 
a/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java
 
b/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java
index 94b58d7..dafc0f7 100644
--- 
a/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java
+++ 
b/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java
@@ -198,9 +198,13 @@ public abstract class JettyHttpComponent extends 
HttpCommonComponent implements
 // restructure uri to be based on the parameters left as we dont want 
to include the Camel internal options
 URI httpUri = URISupport.createRemainingURI(addressUri, parameters);
 // create endpoint after all known parameters have been extracted from 
parameters
+
+// include component scheme in the uri
+String scheme = ObjectHelper.before(uri, :);
+endpointUri = new URI(scheme + : + endpointUri);
+
 JettyHttpEndpoint endpoint = createEndpoint(endpointUri, httpUri);
-
-
+
 if (headerFilterStrategy != null) {
 endpoint.setHeaderFilterStrategy(headerFilterStrategy);
 } else {



camel git commit: Fixed camel-src and archetype

2015-08-06 Thread davsclaus
Repository: camel
Updated Branches:
  refs/heads/master 3f8df7fca - 6ff4e76b9


Fixed camel-src and archetype


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

Branch: refs/heads/master
Commit: 6ff4e76b96cdc37d378632d59b54123c1362cc46
Parents: 3f8df7f
Author: Claus Ibsen davscl...@apache.org
Authored: Thu Aug 6 10:00:46 2015 +0200
Committer: Claus Ibsen davscl...@apache.org
Committed: Thu Aug 6 10:00:46 2015 +0200

--
 .../java/org/apache/camel/scr/ScrHelper.java| 121 +++
 .../apache/camel/scr/internal/ScrHelper.java| 121 ---
 .../src/test/java/__className__Test.java|   6 +-
 3 files changed, 124 insertions(+), 124 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/6ff4e76b/components/camel-scr/src/main/java/org/apache/camel/scr/ScrHelper.java
--
diff --git 
a/components/camel-scr/src/main/java/org/apache/camel/scr/ScrHelper.java 
b/components/camel-scr/src/main/java/org/apache/camel/scr/ScrHelper.java
new file mode 100644
index 000..2918965
--- /dev/null
+++ b/components/camel-scr/src/main/java/org/apache/camel/scr/ScrHelper.java
@@ -0,0 +1,121 @@
+/**
+ * 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.
+ */
+package org.apache.camel.scr;
+
+import java.io.File;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import javax.xml.XMLConstants;
+import javax.xml.namespace.NamespaceContext;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathExpression;
+import javax.xml.xpath.XPathExpressionException;
+import javax.xml.xpath.XPathFactory;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Helper class.
+ */
+public final class ScrHelper {
+
+private static final Logger LOG = LoggerFactory.getLogger(ScrHelper.class);
+
+private ScrHelper() {
+}
+
+public static MapString, String getScrProperties(String componentName) 
throws Exception {
+return 
getScrProperties(String.format(target/classes/OSGI-INF/%s.xml, 
componentName), componentName);
+}
+
+public static MapString, String getScrProperties(String xmlLocation, 
String componentName) throws Exception {
+MapString, String result = new HashMapString, String();
+
+final Document dom = readXML(new File(xmlLocation));
+final XPath xPath = 
XPathFactory.newInstance(XPathFactory.DEFAULT_OBJECT_MODEL_URI, 
com.sun.org.apache.xpath.internal.jaxp.XPathFactoryImpl, null).newXPath();
+xPath.setNamespaceContext(new ScrNamespaceContext(dom, xPath));
+
+String propertyListExpression = 
String.format(/components/scr:component[@name='%s']/property, componentName);
+XPathExpression propertyList = xPath.compile(propertyListExpression);
+XPathExpression propertyName = xPath.compile(@name);
+XPathExpression propertyValue = xPath.compile(@value);
+NodeList nodes = (NodeList) propertyList.evaluate(dom, 
XPathConstants.NODESET);
+for (int i = 0; i  nodes.getLength(); i++) {
+Node node = nodes.item(i);
+result.put((String) propertyName.evaluate(node, 
XPathConstants.STRING), (String) propertyValue.evaluate(node, 
XPathConstants.STRING));
+}
+return result;
+}
+
+private static Document readXML(File xml) throws Exception {
+DocumentBuilderFactory builderFactory = 
DocumentBuilderFactory.newInstance();
+builderFactory.setNamespaceAware(true);
+DocumentBuilder builder = builderFactory.newDocumentBuilder();
+return builder.parse(xml);
+}
+
+private static final class ScrNamespaceContext implements 

[3/3] camel git commit: Fixed CS

2015-08-06 Thread davsclaus
Fixed CS


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

Branch: refs/heads/master
Commit: cc158b2acd4a8490408549c3add1f42881489312
Parents: 8c20822
Author: Claus Ibsen davscl...@apache.org
Authored: Thu Aug 6 10:20:41 2015 +0200
Committer: Claus Ibsen davscl...@apache.org
Committed: Thu Aug 6 10:21:11 2015 +0200

--
 camel-core/src/main/java/org/apache/camel/impl/osgi/Activator.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/cc158b2a/camel-core/src/main/java/org/apache/camel/impl/osgi/Activator.java
--
diff --git a/camel-core/src/main/java/org/apache/camel/impl/osgi/Activator.java 
b/camel-core/src/main/java/org/apache/camel/impl/osgi/Activator.java
index 6457747..f0e584c 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/osgi/Activator.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/osgi/Activator.java
@@ -90,7 +90,7 @@ public class Activator implements BundleActivator, 
BundleTrackerCustomizer {
 private long bundleId;
 
 // Map from package name to the capability we export for this package
-private final MapString, BundleCapability packageCapabilities = new 
HashMap();
+private final MapString, BundleCapability packageCapabilities = new 
HashMapString, BundleCapability();
 
 public void start(BundleContext context) throws Exception {
 LOG.info(Camel activator starting);



[1/3] camel git commit: Fixed tests

2015-08-06 Thread davsclaus
Repository: camel
Updated Branches:
  refs/heads/camel-2.15.x cfb6cd629 - ca7e0c7ee
  refs/heads/master 8c20822b4 - cc158b2ac


Fixed tests


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

Branch: refs/heads/camel-2.15.x
Commit: c3fc7585e0dc962976b3350e1b6ed3fb8b71d75a
Parents: cfb6cd6
Author: Claus Ibsen davscl...@apache.org
Authored: Thu Aug 6 10:17:44 2015 +0200
Committer: Claus Ibsen davscl...@apache.org
Committed: Thu Aug 6 10:17:44 2015 +0200

--
 ...roducerRouteAddRemoveRegisterAlwaysTest.java |  9 ++--
 .../management/ManagedRouteAddRemoveTest.java   | 44 ++--
 2 files changed, 28 insertions(+), 25 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/c3fc7585/camel-core/src/test/java/org/apache/camel/management/ManagedProducerRouteAddRemoveRegisterAlwaysTest.java
--
diff --git 
a/camel-core/src/test/java/org/apache/camel/management/ManagedProducerRouteAddRemoveRegisterAlwaysTest.java
 
b/camel-core/src/test/java/org/apache/camel/management/ManagedProducerRouteAddRemoveRegisterAlwaysTest.java
index 86ec502..46b64d0 100644
--- 
a/camel-core/src/test/java/org/apache/camel/management/ManagedProducerRouteAddRemoveRegisterAlwaysTest.java
+++ 
b/camel-core/src/test/java/org/apache/camel/management/ManagedProducerRouteAddRemoveRegisterAlwaysTest.java
@@ -29,6 +29,8 @@ import org.apache.camel.component.mock.MockEndpoint;
  */
 public class ManagedProducerRouteAddRemoveRegisterAlwaysTest extends 
ManagementTestSupport {
 
+private int size = 10;
+
 @Override
 protected CamelContext createCamelContext() throws Exception {
 CamelContext context = super.createCamelContext();
@@ -47,7 +49,7 @@ public class ManagedProducerRouteAddRemoveRegisterAlwaysTest 
extends ManagementT
 
 // number of services
 SetObjectName names = mbeanServer.queryNames(on, null);
-assertEquals(9, names.size());
+assertEquals(size, names.size());
 
 // number of producers
 ObjectName onP = 
ObjectName.getInstance(org.apache.camel:context=camel-1,type=producers,*);
@@ -72,7 +74,7 @@ public class ManagedProducerRouteAddRemoveRegisterAlwaysTest 
extends ManagementT
 
 // there should still be the same number of services
 names = mbeanServer.queryNames(on, null);
-assertEquals(9, names.size());
+assertEquals(size, names.size());
 
 // but as its recipient list which is dynamic-to we add new producers 
because we have register always
 namesP = mbeanServer.queryNames(onP, null);
@@ -87,14 +89,13 @@ public class 
ManagedProducerRouteAddRemoveRegisterAlwaysTest extends ManagementT
 
 // there should still be the same number of services
 names = mbeanServer.queryNames(on, null);
-assertEquals(9, names.size());
+assertEquals(size, names.size());
 
 // and we still have the other producers, but not the one from the 2nd 
route that was removed
 namesP = mbeanServer.queryNames(onP, null);
 assertEquals(4, namesP.size());
 
 log.info(Shutting down...);
-
 }
 
 @Override

http://git-wip-us.apache.org/repos/asf/camel/blob/c3fc7585/camel-core/src/test/java/org/apache/camel/management/ManagedRouteAddRemoveTest.java
--
diff --git 
a/camel-core/src/test/java/org/apache/camel/management/ManagedRouteAddRemoveTest.java
 
b/camel-core/src/test/java/org/apache/camel/management/ManagedRouteAddRemoveTest.java
index 46656de..6878baf 100644
--- 
a/camel-core/src/test/java/org/apache/camel/management/ManagedRouteAddRemoveTest.java
+++ 
b/camel-core/src/test/java/org/apache/camel/management/ManagedRouteAddRemoveTest.java
@@ -32,6 +32,8 @@ import org.apache.camel.component.mock.MockEndpoint;
  * @version 
  */
 public class ManagedRouteAddRemoveTest extends ManagementTestSupport {
+
+private int size = 10;
 
 @Override
 protected RouteBuilder createRouteBuilder() throws Exception {
@@ -59,7 +61,7 @@ public class ManagedRouteAddRemoveTest extends 
ManagementTestSupport {
 // number of services
 ObjectName on = 
ObjectName.getInstance(org.apache.camel:context=camel-1,type=services,*);
 SetObjectName names = mbeanServer.queryNames(on, null);
-assertEquals(9, names.size());
+assertEquals(size, names.size());
 
 // number of producers
 ObjectName onP = 
ObjectName.getInstance(org.apache.camel:context=camel-1,type=producers,*);
@@ -84,7 +86,7 @@ public class ManagedRouteAddRemoveTest extends 
ManagementTestSupport 

camel git commit: Upgrade Spring Batch to version 3.0.4.RELEASE

2015-08-06 Thread acosentino
Repository: camel
Updated Branches:
  refs/heads/master a5165015c - cae52275b


Upgrade Spring Batch to version 3.0.4.RELEASE


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

Branch: refs/heads/master
Commit: cae52275b1011f6bd97434e37b466856f570243d
Parents: a516501
Author: Andrea Cosentino anco...@gmail.com
Authored: Thu Aug 6 17:38:13 2015 +0200
Committer: Andrea Cosentino anco...@gmail.com
Committed: Thu Aug 6 17:42:35 2015 +0200

--
 parent/pom.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/cae52275/parent/pom.xml
--
diff --git a/parent/pom.xml b/parent/pom.xml
index ccdace5..3840f57 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -445,8 +445,8 @@
 spark-rest-version2.0.0/spark-rest-version
 spark-rest-bundle-version2.0.0_1/spark-rest-bundle-version
 splunk-version1.4.0.0_1/splunk-version
-spring-batch-version3.0.3.RELEASE/spring-batch-version
-spring-batch-bundle-version3.0.3.RELEASE_1/spring-batch-bundle-version
+spring-batch-version3.0.4.RELEASE/spring-batch-version
+spring-batch-bundle-version3.0.4.RELEASE_1/spring-batch-bundle-version
 spring-boot-version1.2.5.RELEASE/spring-boot-version
 spring-castor-bundle-version1.2.0/spring-castor-bundle-version
 spring-data-commons-version1.6.1.RELEASE/spring-data-commons-version