You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ch...@apache.org on 2014/07/03 18:18:29 UTC
[1/3] git commit: Adding a camel-box karaf feature.
Repository: camel
Updated Branches:
refs/heads/master 3511f1e3c -> 18d5c3c61
Adding a camel-box karaf feature.
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/2936f191
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/2936f191
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/2936f191
Branch: refs/heads/master
Commit: 2936f1918e95d8ed655af109c866b712c8c2535d
Parents: 3511f1e
Author: Hiram Chirino <hi...@hiramchirino.com>
Authored: Thu Jul 3 12:05:01 2014 -0400
Committer: Hiram Chirino <hi...@hiramchirino.com>
Committed: Thu Jul 3 12:05:01 2014 -0400
----------------------------------------------------------------------
components/camel-box/pom.xml | 2 --
parent/pom.xml | 2 ++
.../features/src/main/resources/features.xml | 21 ++++++++++++++++++++
3 files changed, 23 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/2936f191/components/camel-box/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-box/pom.xml b/components/camel-box/pom.xml
index aee2b38..c65e9b1 100644
--- a/components/camel-box/pom.xml
+++ b/components/camel-box/pom.xml
@@ -20,8 +20,6 @@
<componentName>Box</componentName>
<componentPackage>org.apache.camel.component.box</componentPackage>
<outPackage>org.apache.camel.component.box.internal</outPackage>
- <boxjavalibv2.version>3.0.9</boxjavalibv2.version>
- <htmlunit.version>2.15</htmlunit.version>
<camel.osgi.export.pkg>${componentPackage}</camel.osgi.export.pkg>
<camel.osgi.private.pkg>${outPackage}</camel.osgi.private.pkg>
http://git-wip-us.apache.org/repos/asf/camel/blob/2936f191/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index d68fd41..67a25de 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -69,6 +69,7 @@
<bsh-version>2.0b5</bsh-version>
<!-- bouncycastle 1.50 does not work in OSGi - http://www.bouncycastle.org/jira/browse/BJA-476 -->
<bouncycastle-version>1.49</bouncycastle-version>
+ <boxjavalibv2.version>3.0.9</boxjavalibv2.version>
<build-helper-maven-plugin-version>1.8</build-helper-maven-plugin-version>
<c3p0-version>0.9.1.2</c3p0-version>
<castor-bundle-version>1.3.2_2</castor-bundle-version>
@@ -184,6 +185,7 @@
<!-- Spring 3.2.x and 4.0.x still stick to JPA 2.0. Hibernate 4.3.x upgraded to JPA 2.1. -->
<hibernate-version>4.2.13.Final</hibernate-version>
<hsqldb-version>2.3.2</hsqldb-version>
+ <htmlunit.version>2.15</htmlunit.version>
<httpunit-version>1.7</httpunit-version>
<httpcore4-version>4.3.2</httpcore4-version>
<httpclient4-version>4.3.3</httpclient4-version>
http://git-wip-us.apache.org/repos/asf/camel/blob/2936f191/platforms/karaf/features/src/main/resources/features.xml
----------------------------------------------------------------------
diff --git a/platforms/karaf/features/src/main/resources/features.xml b/platforms/karaf/features/src/main/resources/features.xml
index a4ec9f6..0113901 100644
--- a/platforms/karaf/features/src/main/resources/features.xml
+++ b/platforms/karaf/features/src/main/resources/features.xml
@@ -172,6 +172,27 @@
<feature version='${project.version}'>camel-core</feature>
<bundle>mvn:org.apache.camel/camel-bindy/${project.version}</bundle>
</feature>
+ <feature name='camel-box' version='${project.version}' resolver='(obr)' start-level='50'>
+ <feature version='${project.version}'>camel-core</feature>
+ <bundle>mvn:org.apache.camel/camel-box/${project.version}</bundle>
+ <bundle dependency='true'>mvn:org.apache.httpcomponents/httpcore-osgi/${httpcore4-version}</bundle>
+ <bundle dependency='true'>mvn:org.apache.httpcomponents/httpclient-osgi/${httpclient4-version}</bundle>
+ <bundle dependency='true'>wrap:mvn:org.apache.httpcomponents/httpmime-osgi/${httpclient4-version}</bundle>
+ <bundle dependency='true'>wrap:mvn:org.apache.httpcomponents/httpclient-cache-osgi/${httpclient4-version}</bundle>
+ <bundle dependency='true'>mvn:org.apache.commons/commons-lang3/${commons-lang3-version}</bundle>
+ <bundle dependency='true'>mvn:commons-lang/commons-lang/${commons-lang-version}</bundle>
+ <bundle dependency='true'>mvn:com.fasterxml.jackson.core/jackson-core/${jackson2-version}</bundle>
+ <bundle dependency='true'>mvn:com.fasterxml.jackson.core/jackson-databind/${jackson2-version}</bundle>
+ <bundle dependency='true'>mvn:com.fasterxml.jackson.core/jackson-annotations/${jackson2-version}</bundle>
+ <bundle dependency='true'>mvn:commons-io/commons-io/${commons-io-version}</bundle>
+ <bundle dependency='true'>wrap:mvn:net.box/boxjavalibv2/${boxjavalibv2.version}</bundle>
+ <bundle dependency='true'>wrap:mvn:net.sourceforge.htmlunit/htmlunit/${htmlunit.version}</bundle>
+ <bundle dependency='true'>wrap:mvn:net.sourceforge.htmlunit/htmlunit-core/${htmlunit.version}</bundle>
+ <bundle dependency='true'>wrap:mvn:net.sourceforge.htmlunit/htmlunit-core-js/${htmlunit.version}</bundle>
+ <bundle dependency='true'>wrap:mvn:net.sourceforge.cssparser/cssparser/0.9.14</bundle>
+ <bundle dependency='true'>wrap:mvn:org.w3c.css/sac/1.3</bundle>
+ <bundle dependency='true'>mvn:commons-codec/commons-codec/${commons-codec-version}</bundle>
+ </feature>
<feature name='camel-cache' version='${project.version}' resolver='(obr)' start-level='50'>
<feature version='${project.version}'>camel-core</feature>
<bundle dependency='true'>mvn:net.sf.ehcache/ehcache/${ehcache-version}</bundle>
[3/3] git commit: Adding a box.com osgi example.
Posted by ch...@apache.org.
Adding a box.com osgi example.
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/18d5c3c6
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/18d5c3c6
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/18d5c3c6
Branch: refs/heads/master
Commit: 18d5c3c616383f7a345e51cafb8e32da7d23a9fd
Parents: f055501
Author: Hiram Chirino <hi...@hiramchirino.com>
Authored: Thu Jul 3 12:18:20 2014 -0400
Committer: Hiram Chirino <hi...@hiramchirino.com>
Committed: Thu Jul 3 12:18:20 2014 -0400
----------------------------------------------------------------------
examples/camel-example-box-osgi/README.txt | 33 +++
examples/camel-example-box-osgi/pom.xml | 85 ++++++++
.../src/main/resources/META-INF/LICENSE.txt | 203 +++++++++++++++++++
.../src/main/resources/META-INF/NOTICE.txt | 11 +
.../resources/META-INF/spring/camel-context.xml | 44 ++++
.../src/test/resources/log4j.properties | 31 +++
6 files changed, 407 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/18d5c3c6/examples/camel-example-box-osgi/README.txt
----------------------------------------------------------------------
diff --git a/examples/camel-example-box-osgi/README.txt b/examples/camel-example-box-osgi/README.txt
new file mode 100644
index 0000000..a1f99eb
--- /dev/null
+++ b/examples/camel-example-box-osgi/README.txt
@@ -0,0 +1,33 @@
+Box.com OSGi Example
+====================
+
+A simple example which sets up a camel route to upload files
+found in an `inbox` directory to a box.com account.
+
+You will need to edit the `src/main/resources/META-INF/spring/camel-context.xml`
+file and enter in your box.com credentials.
+
+Then you will need to compile the example:
+ mvn install
+
+To run the example on Apache ServiceMix 4.x or Apache Karaf 2.2.x
+
+1) launch karaf
+
+2) Add features required
+features:addUrl mvn:org.apache.camel.karaf/apache-camel/${version}/xml/features
+features:install camel-spring
+features:install camel-box
+
+3) Deploy the example
+osgi:install -s mvn:org.apache.camel/camel-example-cxf-osgi/${version}
+
+4) Copy files to the inbox directory.
+
+5) Watch them get transferred to your box.com account.
+
+Please help us make Apache Camel better - we appreciate any feedback you may
+have. Enjoy!
+
+------------------------
+The Camel Riders!
http://git-wip-us.apache.org/repos/asf/camel/blob/18d5c3c6/examples/camel-example-box-osgi/pom.xml
----------------------------------------------------------------------
diff --git a/examples/camel-example-box-osgi/pom.xml b/examples/camel-example-box-osgi/pom.xml
new file mode 100644
index 0000000..7ef0b24
--- /dev/null
+++ b/examples/camel-example-box-osgi/pom.xml
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<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>
+
+ <parent>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>examples</artifactId>
+ <version>2.14-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>camel-example-box-osgi</artifactId>
+ <name>Camel :: Example :: Box :: OSGI</name>
+ <description>An example which use a Box Endpoint in OSGi</description>
+ <packaging>bundle</packaging>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-box</artifactId>
+ </dependency>
+
+ <!-- logging -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </dependency>
+ <!-- test -->
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-test-spring</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <!-- to generate the MANIFEST-FILE of the bundle -->
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <manifestLocation>target/META-INF</manifestLocation>
+ <instructions>
+ <Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
+ <Export-Package>org.apache.camel.example*</Export-Package>
+ <Import-Package>
+ *
+ </Import-Package>
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
http://git-wip-us.apache.org/repos/asf/camel/blob/18d5c3c6/examples/camel-example-box-osgi/src/main/resources/META-INF/LICENSE.txt
----------------------------------------------------------------------
diff --git a/examples/camel-example-box-osgi/src/main/resources/META-INF/LICENSE.txt b/examples/camel-example-box-osgi/src/main/resources/META-INF/LICENSE.txt
new file mode 100644
index 0000000..6b0b127
--- /dev/null
+++ b/examples/camel-example-box-osgi/src/main/resources/META-INF/LICENSE.txt
@@ -0,0 +1,203 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed 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.
+
http://git-wip-us.apache.org/repos/asf/camel/blob/18d5c3c6/examples/camel-example-box-osgi/src/main/resources/META-INF/NOTICE.txt
----------------------------------------------------------------------
diff --git a/examples/camel-example-box-osgi/src/main/resources/META-INF/NOTICE.txt b/examples/camel-example-box-osgi/src/main/resources/META-INF/NOTICE.txt
new file mode 100644
index 0000000..2e215bf
--- /dev/null
+++ b/examples/camel-example-box-osgi/src/main/resources/META-INF/NOTICE.txt
@@ -0,0 +1,11 @@
+ =========================================================================
+ == NOTICE file corresponding to the section 4 d of ==
+ == the Apache License, Version 2.0, ==
+ == in this case for the Apache Camel distribution. ==
+ =========================================================================
+
+ This product includes software developed by
+ The Apache Software Foundation (http://www.apache.org/).
+
+ Please read the different LICENSE files present in the licenses directory of
+ this distribution.
http://git-wip-us.apache.org/repos/asf/camel/blob/18d5c3c6/examples/camel-example-box-osgi/src/main/resources/META-INF/spring/camel-context.xml
----------------------------------------------------------------------
diff --git a/examples/camel-example-box-osgi/src/main/resources/META-INF/spring/camel-context.xml b/examples/camel-example-box-osgi/src/main/resources/META-INF/spring/camel-context.xml
new file mode 100644
index 0000000..14b056d
--- /dev/null
+++ b/examples/camel-example-box-osgi/src/main/resources/META-INF/spring/camel-context.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:camel="http://camel.apache.org/schema/spring"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
+ ">
+
+ <bean id="box" class="org.apache.camel.component.box.BoxComponent">
+ <property name="configuration">
+ <bean class="org.apache.camel.component.box.BoxConfiguration">
+ <property name="userName" value=""/>
+ <property name="userPassword" value=""/>
+ <property name="clientId" value=""/>
+ <property name="clientSecret" value=""/>
+ </bean>
+ </property>
+ </bean>
+
+ <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
+ <route>
+ <from uri="file://inbox"/>
+ <to uri="box://files/uploadFile?inBody=fileUploadRequest"/>
+ </route>
+ </camelContext>
+
+</beans>
http://git-wip-us.apache.org/repos/asf/camel/blob/18d5c3c6/examples/camel-example-box-osgi/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/examples/camel-example-box-osgi/src/test/resources/log4j.properties b/examples/camel-example-box-osgi/src/test/resources/log4j.properties
new file mode 100644
index 0000000..8e97c07
--- /dev/null
+++ b/examples/camel-example-box-osgi/src/test/resources/log4j.properties
@@ -0,0 +1,31 @@
+## ------------------------------------------------------------------------
+## 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
+#
+log4j.rootLogger=INFO, out
+
+#
+# uncomment the following line to enable debugging of Camel
+#
+#log4j.logger.org.apache.camel=DEBUG
+
+log4j.appender.out=org.apache.log4j.ConsoleAppender
+log4j.appender.out.layout=org.apache.log4j.PatternLayout
+log4j.appender.out.layout.ConversionPattern=[%10.10t] %-30.30c{1} %-5p %m%n
+
[2/3] git commit: Support configuring the camel-box integration test
account settings via maven properties so users can configure them in
~/.m2/settings.xml
Posted by ch...@apache.org.
Support configuring the camel-box integration test account settings via maven properties so users can configure them in ~/.m2/settings.xml
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/f0555014
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/f0555014
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/f0555014
Branch: refs/heads/master
Commit: f0555014875c548637d8c1ab0dd6d19b3592f312
Parents: 2936f19
Author: Hiram Chirino <hi...@hiramchirino.com>
Authored: Thu Jul 3 12:11:50 2014 -0400
Committer: Hiram Chirino <hi...@hiramchirino.com>
Committed: Thu Jul 3 12:11:50 2014 -0400
----------------------------------------------------------------------
components/camel-box/pom.xml | 6 ++++++
.../camel/component/box/AbstractBoxTestSupport.java | 16 ++++++++++++++++
2 files changed, 22 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/f0555014/components/camel-box/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-box/pom.xml b/components/camel-box/pom.xml
index c65e9b1..74cd1d5 100644
--- a/components/camel-box/pom.xml
+++ b/components/camel-box/pom.xml
@@ -488,6 +488,12 @@
<includes>
<include>**/*Test.java</include>
</includes>
+ <systemPropertyVariables>
+ <camel.box.userName>${camel.box.userName}</camel.box.userName>
+ <camel.box.userPassword>${camel.box.userPassword}</camel.box.userPassword>
+ <camel.box.clientId>${camel.box.clientId}</camel.box.clientId>
+ <camel.box.clientSecret>${camel.box.clientSecret}</camel.box.clientSecret>
+ </systemPropertyVariables>
</configuration>
</plugin>
</plugins>
http://git-wip-us.apache.org/repos/asf/camel/blob/f0555014/components/camel-box/src/test/java/org/apache/camel/component/box/AbstractBoxTestSupport.java
----------------------------------------------------------------------
diff --git a/components/camel-box/src/test/java/org/apache/camel/component/box/AbstractBoxTestSupport.java b/components/camel-box/src/test/java/org/apache/camel/component/box/AbstractBoxTestSupport.java
index 130bcaf..0373cda 100644
--- a/components/camel-box/src/test/java/org/apache/camel/component/box/AbstractBoxTestSupport.java
+++ b/components/camel-box/src/test/java/org/apache/camel/component/box/AbstractBoxTestSupport.java
@@ -82,6 +82,15 @@ public abstract class AbstractBoxTestSupport extends CamelTestSupport {
e);
}
+ addSystemProperty("camel.box.userName", "userName", properties);
+ addSystemProperty("camel.box.userPassword", "userPassword", properties);
+ addSystemProperty("camel.box.clientId", "clientId", properties);
+ addSystemProperty("camel.box.clientSecret", "clientSecret", properties);
+ addSystemProperty("camel.box.refreshToken", "refreshToken", properties);
+ addSystemProperty("camel.box.testFolderId", "testFolderId", properties);
+ addSystemProperty("camel.box.testFileId", "testFileId", properties);
+ addSystemProperty("camel.box.testUserId", "testUserId", properties);
+
// cache test properties
refreshToken = properties.getProperty(REFRESH_TOKEN_PROPERTY);
testFolderId = properties.getProperty("testFolderId");
@@ -136,6 +145,13 @@ public abstract class AbstractBoxTestSupport extends CamelTestSupport {
return context;
}
+ private void addSystemProperty(String sourceName, String targetName, Properties properties) {
+ String value = System.getProperty(sourceName);
+ if( value!=null && !value.trim().isEmpty() ) {
+ properties.put(targetName, value);
+ }
+ }
+
@AfterClass
public static void tearDownAfterClass() throws Exception {
CamelTestSupport.tearDownAfterClass();