Repository: camel Updated Branches: refs/heads/master b1b49bfba -> 2051db4b4
http://git-wip-us.apache.org/repos/asf/camel/blob/2051db4b/components/camel-tarfile/src/test/resources/org/apache/camel/aggregate/tarfile/data/another/hello.txt ---------------------------------------------------------------------- diff --git a/components/camel-tarfile/src/test/resources/org/apache/camel/aggregate/tarfile/data/another/hello.txt b/components/camel-tarfile/src/test/resources/org/apache/camel/aggregate/tarfile/data/another/hello.txt new file mode 100644 index 0000000..b6fc4c6 --- /dev/null +++ b/components/camel-tarfile/src/test/resources/org/apache/camel/aggregate/tarfile/data/another/hello.txt @@ -0,0 +1 @@ +hello \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/2051db4b/components/camel-tarfile/src/test/resources/org/apache/camel/aggregate/tarfile/data/chiau.txt ---------------------------------------------------------------------- diff --git a/components/camel-tarfile/src/test/resources/org/apache/camel/aggregate/tarfile/data/chiau.txt b/components/camel-tarfile/src/test/resources/org/apache/camel/aggregate/tarfile/data/chiau.txt new file mode 100644 index 0000000..7842486 --- /dev/null +++ b/components/camel-tarfile/src/test/resources/org/apache/camel/aggregate/tarfile/data/chiau.txt @@ -0,0 +1 @@ +chau \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/2051db4b/components/camel-tarfile/src/test/resources/org/apache/camel/aggregate/tarfile/data/hi.txt ---------------------------------------------------------------------- diff --git a/components/camel-tarfile/src/test/resources/org/apache/camel/aggregate/tarfile/data/hi.txt b/components/camel-tarfile/src/test/resources/org/apache/camel/aggregate/tarfile/data/hi.txt new file mode 100644 index 0000000..32f95c0 --- /dev/null +++ b/components/camel-tarfile/src/test/resources/org/apache/camel/aggregate/tarfile/data/hi.txt @@ -0,0 +1 @@ +hi \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/2051db4b/components/camel-tarfile/src/test/resources/org/apache/camel/aggregate/tarfile/data/hola.txt ---------------------------------------------------------------------- diff --git a/components/camel-tarfile/src/test/resources/org/apache/camel/aggregate/tarfile/data/hola.txt b/components/camel-tarfile/src/test/resources/org/apache/camel/aggregate/tarfile/data/hola.txt new file mode 100644 index 0000000..b8b4a4e --- /dev/null +++ b/components/camel-tarfile/src/test/resources/org/apache/camel/aggregate/tarfile/data/hola.txt @@ -0,0 +1 @@ +hola \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/2051db4b/components/camel-tarfile/src/test/resources/org/apache/camel/aggregate/tarfile/data/other/greetings.txt ---------------------------------------------------------------------- diff --git a/components/camel-tarfile/src/test/resources/org/apache/camel/aggregate/tarfile/data/other/greetings.txt b/components/camel-tarfile/src/test/resources/org/apache/camel/aggregate/tarfile/data/other/greetings.txt new file mode 100644 index 0000000..9eaa11a --- /dev/null +++ b/components/camel-tarfile/src/test/resources/org/apache/camel/aggregate/tarfile/data/other/greetings.txt @@ -0,0 +1 @@ +greetings \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/2051db4b/components/camel-tarfile/src/test/resources/org/apache/camel/dataformat/tarfile/SpringTarSplitterRouteTest.xml ---------------------------------------------------------------------- diff --git a/components/camel-tarfile/src/test/resources/org/apache/camel/dataformat/tarfile/SpringTarSplitterRouteTest.xml b/components/camel-tarfile/src/test/resources/org/apache/camel/dataformat/tarfile/SpringTarSplitterRouteTest.xml new file mode 100644 index 0000000..8212452 --- /dev/null +++ b/components/camel-tarfile/src/test/resources/org/apache/camel/dataformat/tarfile/SpringTarSplitterRouteTest.xml @@ -0,0 +1,42 @@ +<?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" + 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 + "> + + <!-- START SNIPPET: e1 --> + + <!-- use a bean to define a custom expression --> + <bean id="tarSplitter" class="org.apache.camel.dataformat.tarfile.TarSplitter"/> + + <camelContext xmlns="http://camel.apache.org/schema/spring"> + <route> + <from uri="file:src/test/resources/org/apache/camel/dataformat/tarfile/data?consumer.delay=1000&noop=true"/> + <split streaming="true"> + <!-- refer to our custom expression, using ref tag --> + <ref>tarSplitter</ref> + <convertBodyTo type="java.lang.String" charset="UTF-8"/> + <to uri="mock:processTarEntry"/> + </split> + </route> + </camelContext> + <!-- END SNIPPET: e1 --> +</beans> http://git-wip-us.apache.org/repos/asf/camel/blob/2051db4b/components/camel-tarfile/src/test/resources/org/apache/camel/dataformat/tarfile/data/tarfile.tar ---------------------------------------------------------------------- diff --git a/components/camel-tarfile/src/test/resources/org/apache/camel/dataformat/tarfile/data/tarfile.tar b/components/camel-tarfile/src/test/resources/org/apache/camel/dataformat/tarfile/data/tarfile.tar new file mode 100644 index 0000000..a0d49b0 Binary files /dev/null and b/components/camel-tarfile/src/test/resources/org/apache/camel/dataformat/tarfile/data/tarfile.tar differ http://git-wip-us.apache.org/repos/asf/camel/blob/2051db4b/components/pom.xml ---------------------------------------------------------------------- diff --git a/components/pom.xml b/components/pom.xml index cd89967..0725607 100644 --- a/components/pom.xml +++ b/components/pom.xml @@ -225,6 +225,7 @@ <module>camel-syslog</module> <module>camel-swagger</module> <module>camel-tagsoup</module> + <module>camel-tarfile</module> <module>camel-twitter</module> <module>camel-undertow</module> <module>camel-univocity-parsers</module> http://git-wip-us.apache.org/repos/asf/camel/blob/2051db4b/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 9638402..cf5cd88 100644 --- a/platforms/karaf/features/src/main/resources/features.xml +++ b/platforms/karaf/features/src/main/resources/features.xml @@ -1547,6 +1547,11 @@ <feature version='${project.version}'>camel-core</feature> <bundle>mvn:org.apache.camel/camel-tagsoup/${project.version}</bundle> </feature> + <feature name='camel-tarfile' version='${project.version}' resolver='(obr)' start-level='50'> + <feature version='${project.version}'>camel-core</feature> + <bundle>mvn:org.apache.camel/camel-tarfile/${project.version}</bundle> + <bundle dependency='true'>mvn:org.apache.commons/commons-compress/${commons-compress-version}</bundle> + </feature> <feature name='camel-test' version='${project.version}' resolver='(obr)' start-level='50'> <feature version='${project.version}'>camel-core</feature> <feature version='${project.version}'>camel-spring</feature>