Skip to content

Commit

Permalink
Add FTP extension
Browse files Browse the repository at this point in the history
fixes #463
  • Loading branch information
jamesnetherton committed Nov 22, 2019
1 parent 54ff524 commit 095f11d
Show file tree
Hide file tree
Showing 21 changed files with 989 additions and 2 deletions.
11 changes: 10 additions & 1 deletion docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ As of Camel Quarkus {camel-quarkus-last-release} the following Camel artifacts a
== Camel Components

// components: START
Number of Camel components: 41 in 36 JAR artifacts (0 deprecated)
Number of Camel components: 44 in 37 JAR artifacts (0 deprecated)

[width="100%",cols="4,1,5",options="header"]
|===
Expand Down Expand Up @@ -60,6 +60,12 @@ Number of Camel components: 41 in 36 JAR artifacts (0 deprecated)
| link:https://camel.apache.org/components/latest/file-component.html[File] (camel-quarkus-file) +
`file:directoryName` | 0.4 | The file component is used for reading or writing files.

| link:https://camel.apache.org/components/latest/ftp-component.html[FTP] (camel-quarkus-ftp) +
`ftp:host:port/directoryName` | 0.5 | The \ftp component is used for uploading or downloading files from FTP servers.

| link:https://camel.apache.org/components/latest/ftps-component.html[FTPS] (camel-quarkus-ftp) +
`ftps:host:port/directoryName` | 0.5 | The \ftps (FTP secure SSL/TLS) component is used for uploading or downloading files from FTP servers.

| link:https://camel.apache.org/components/latest/infinispan-component.html[Infinispan] (camel-quarkus-infinispan) +
`infinispan:cacheName` | 0.2 | For reading/writing from/to Infinispan distributed key/value store and data grid.

Expand Down Expand Up @@ -105,6 +111,9 @@ Number of Camel components: 41 in 36 JAR artifacts (0 deprecated)
| link:https://camel.apache.org/components/latest/servlet-component.html[Servlet] (camel-quarkus-servlet) +
`servlet:contextPath` | 0.2 | To use a HTTP Servlet as entry for Camel routes when running in a servlet container.

| link:https://camel.apache.org/components/latest/sftp-component.html[SFTP] (camel-quarkus-ftp) +
`sftp:host:port/directoryName` | 0.5 | The \sftp (FTP over SSH) component is used for uploading or downloading files from SFTP servers.

| link:https://camel.apache.org/components/latest/sjms-component.html[Simple JMS] (camel-quarkus-sjms) +
`sjms:destinationType:destinationName` | 0.5 | The sjms component (simple jms) allows messages to be sent to (or consumed from) a JMS Queue or Topic (uses JMS 1.x API).

Expand Down
79 changes: 79 additions & 0 deletions extensions/ftp/deployment/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
<?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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-ftp-parent</artifactId>
<version>0.4.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>camel-quarkus-ftp-deployment</artifactId>
<name>Camel Quarkus :: FTP :: Deployment</name>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-bom-deployment</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-file-deployment</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-core-deployment</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-ftp</artifactId>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessorPaths>
<path>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-extension-processor</artifactId>
<version>${quarkus.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</build>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
/*
* 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.quarkus.component.ftp.deployment;

import io.quarkus.deployment.annotations.BuildProducer;
import io.quarkus.deployment.annotations.BuildStep;
import io.quarkus.deployment.builditem.FeatureBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;

import org.apache.camel.component.file.remote.FtpConfiguration;
import org.apache.camel.component.file.remote.FtpsConfiguration;
import org.apache.camel.component.file.remote.RemoteFileConfiguration;
import org.apache.camel.component.file.remote.SftpConfiguration;

class FtpProcessor {

private static final String FEATURE = "camel-ftp";

@BuildStep
FeatureBuildItem feature() {
return new FeatureBuildItem(FEATURE);
}

@BuildStep
void registerForReflection(BuildProducer<ReflectiveClassBuildItem> reflectiveClass) {
reflectiveClass.produce(new ReflectiveClassBuildItem(true, false,
RemoteFileConfiguration.class,
FtpConfiguration.class,
FtpsConfiguration.class,
SftpConfiguration.class));

reflectiveClass.produce(new ReflectiveClassBuildItem(true, true,
"com.jcraft.jsch.CipherNone",
"com.jcraft.jsch.DHEC256",
"com.jcraft.jsch.DHEC384",
"com.jcraft.jsch.DHEC521",
"com.jcraft.jsch.DHG1",
"com.jcraft.jsch.DHG14",
"com.jcraft.jsch.DHGEX",
"com.jcraft.jsch.DHGEX256",
"com.jcraft.jsch.jce.AES128CBC",
"com.jcraft.jsch.jce.AES128CTR",
"com.jcraft.jsch.jce.AES192CBC",
"com.jcraft.jsch.jce.AES192CTR",
"com.jcraft.jsch.jce.AES256CBC",
"com.jcraft.jsch.jce.AES256CTR",
"com.jcraft.jsch.jce.ARCFOUR",
"com.jcraft.jsch.jce.ARCFOUR128",
"com.jcraft.jsch.jce.ARCFOUR256",
"com.jcraft.jsch.jce.BlowfishCBC",
"com.jcraft.jsch.jce.DH",
"com.jcraft.jsch.jce.ECDHN",
"com.jcraft.jsch.jce.HMACMD5",
"com.jcraft.jsch.jce.HMACMD596",
"com.jcraft.jsch.jce.HMACSHA1",
"com.jcraft.jsch.jce.HMACSHA1",
"com.jcraft.jsch.jce.HMACSHA196",
"com.jcraft.jsch.jce.HMACSHA256",
"com.jcraft.jsch.jce.KeyPairGenDSA",
"com.jcraft.jsch.jce.KeyPairGenECDSA",
"com.jcraft.jsch.jce.KeyPairGenRSA",
"com.jcraft.jsch.jce.MD5",
"com.jcraft.jsch.jce.Random",
"com.jcraft.jsch.jce.SHA1",
"com.jcraft.jsch.jce.SHA256",
"com.jcraft.jsch.jce.SHA384",
"com.jcraft.jsch.jce.SHA512",
"com.jcraft.jsch.jce.SignatureDSA",
"com.jcraft.jsch.jce.SignatureECDSA256",
"com.jcraft.jsch.jce.SignatureECDSA384",
"com.jcraft.jsch.jce.SignatureECDSA521",
"com.jcraft.jsch.jce.SignatureRSA",
"com.jcraft.jsch.jce.TripleDESCBC",
"com.jcraft.jsch.jce.TripleDESCTR",
"com.jcraft.jsch.jcraft.Compression",
"com.jcraft.jsch.jgss.GSSContextKrb5",
"com.jcraft.jsch.UserAuthGSSAPIWithMIC",
"com.jcraft.jsch.UserAuthKeyboardInteractive",
"com.jcraft.jsch.UserAuthNone",
"com.jcraft.jsch.UserAuthPassword",
"com.jcraft.jsch.UserAuthPublicKey"));
}
}
39 changes: 39 additions & 0 deletions extensions/ftp/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-build-parent</artifactId>
<version>0.4.1-SNAPSHOT</version>
<relativePath>../../poms/build-parent/pom.xml</relativePath>
</parent>

<artifactId>camel-quarkus-ftp-parent</artifactId>
<name>Camel Quarkus :: FTP</name>
<packaging>pom</packaging>

<modules>
<module>deployment</module>
<module>runtime</module>
</modules>
</project>
82 changes: 82 additions & 0 deletions extensions/ftp/runtime/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
<?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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-ftp-parent</artifactId>
<version>0.4.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>camel-quarkus-ftp</artifactId>
<name>Camel Quarkus :: FTP :: Runtime</name>

<properties>
<firstVersion>0.5.0</firstVersion>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-bom</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-ftp</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-core</artifactId>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-bootstrap-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessorPaths>
<path>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-extension-processor</artifactId>
<version>${quarkus.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#
# 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.
#

---
name: "Camel Quarkus FTP"
description: "Camel FTP support"
metadata:
keywords:
- "camel"
- "ftp"
guide: "https://quarkus.io/guides/camel"
categories:
- "integration"
1 change: 1 addition & 0 deletions extensions/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
<module>exec</module>
<module>fhir</module>
<module>file</module>
<module>ftp</module>
<module>hystrix</module>
<module>infinispan</module>
<module>jackson</module>
Expand Down

0 comments on commit 095f11d

Please sign in to comment.