forked from syndesisio/connectors
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request syndesisio#98 from oscerd/S3-cp-object-connector
- Loading branch information
Showing
10 changed files
with
904 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,180 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<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> | ||
<artifactId>connectors</artifactId> | ||
<groupId>io.syndesis</groupId> | ||
<version>0.5-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>aws-s3-copy-object-connector</artifactId> | ||
<name>Syndesis Connectors :: AWS S3 Copy Object Connector</name> | ||
<packaging>jar</packaging> | ||
<version>0.5-SNAPSHOT</version> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> | ||
</properties> | ||
|
||
<dependencyManagement> | ||
<dependencies> | ||
<!-- Camel BOM --> | ||
<dependency> | ||
<groupId>org.apache.camel</groupId> | ||
<artifactId>camel-parent</artifactId> | ||
<version>${camel.version}</version> | ||
<scope>import</scope> | ||
<type>pom</type> | ||
</dependency> | ||
</dependencies> | ||
</dependencyManagement> | ||
|
||
<dependencies> | ||
|
||
<!-- base component to use for this connector --> | ||
<dependency> | ||
<groupId>org.apache.camel</groupId> | ||
<artifactId>camel-aws</artifactId> | ||
<version>${camel.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.camel</groupId> | ||
<artifactId>camel-aws-starter</artifactId> | ||
<version>${camel.version}</version> | ||
</dependency> | ||
|
||
<!-- camel-connector --> | ||
<dependency> | ||
<groupId>org.apache.camel</groupId> | ||
<artifactId>camel-connector</artifactId> | ||
<version>${camel.version}</version> | ||
</dependency> | ||
|
||
|
||
<!-- camel and spring boot compiler plugins --> | ||
<dependency> | ||
<groupId>org.apache.camel</groupId> | ||
<artifactId>apt</artifactId> | ||
<version>${camel.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-configuration-processor</artifactId> | ||
<version>${spring-boot.version}</version> | ||
</dependency> | ||
|
||
<!-- testing --> | ||
<dependency> | ||
<groupId>org.apache.camel</groupId> | ||
<artifactId>camel-test</artifactId> | ||
<version>${camel.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.camel</groupId> | ||
<artifactId>camel-test-spring</artifactId> | ||
<version>${camel.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-test</artifactId> | ||
<version>${spring-boot.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<defaultGoal>install</defaultGoal> | ||
|
||
<plugins> | ||
|
||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>3.6.1</version> | ||
<configuration> | ||
<source>1.8</source> | ||
<target>1.8</target> | ||
</configuration> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-resources-plugin</artifactId> | ||
<version>3.0.2</version> | ||
<configuration> | ||
<encoding>UTF-8</encoding> | ||
</configuration> | ||
</plugin> | ||
|
||
<!-- generate components meta-data and validate component includes documentation etc --> | ||
<plugin> | ||
<groupId>org.apache.camel</groupId> | ||
<artifactId>camel-package-maven-plugin</artifactId> | ||
<version>${camel.version}</version> | ||
<executions> | ||
<execution> | ||
<id>prepare</id> | ||
<goals> | ||
<goal>prepare-components</goal> | ||
</goals> | ||
<phase>generate-resources</phase> | ||
</execution> | ||
<execution> | ||
<id>validate</id> | ||
<goals> | ||
<goal>validate-components</goal> | ||
</goals> | ||
<phase>prepare-package</phase> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
|
||
<!-- turn off jar plugin as we use connector plugin to jar instead --> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-jar-plugin</artifactId> | ||
<version>${maven-jar-plugin.version}</version> | ||
<executions> | ||
<execution> | ||
<id>default-jar</id> | ||
<phase /> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
|
||
<!-- connector plugin will build the jar --> | ||
<plugin> | ||
<groupId>org.apache.camel</groupId> | ||
<artifactId>camel-connector-maven-plugin</artifactId> | ||
<version>${camel.version}</version> | ||
<executions> | ||
<execution> | ||
<id>boot</id> | ||
<goals> | ||
<goal>prepare-spring-boot-auto-configuration</goal> | ||
</goals> | ||
<configuration> | ||
<!-- we done want license headers --> | ||
<includeLicenseHeader>false</includeLicenseHeader> | ||
<!-- we dont camel.connector as prefix --> | ||
<configurationPrefix>false</configurationPrefix> | ||
</configuration> | ||
</execution> | ||
<execution> | ||
<id>connector</id> | ||
<goals> | ||
<goal>jar</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
|
||
</plugins> | ||
</build> | ||
|
||
</project> |
14 changes: 14 additions & 0 deletions
14
...py-object-connector/src/main/java/io/syndesis/s3/copy/S3CopyObjectConnectorComponent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package io.syndesis.s3.copy; | ||
|
||
import org.apache.camel.component.connector.DefaultConnectorComponent; | ||
|
||
/** | ||
* Camel S3CopyObjectConnectorComponent connector | ||
*/ | ||
public class S3CopyObjectConnectorComponent extends DefaultConnectorComponent { | ||
|
||
public S3CopyObjectConnectorComponent() { | ||
super("aws-s3-copy-object-connector", "io.syndesis.s3.copy.S3CopyObjectConnectorComponent"); | ||
} | ||
|
||
} |
1 change: 1 addition & 0 deletions
1
.../main/resources/META-INF/services/org/apache/camel/component/aws-s3-copy-object-connector
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
class=io.syndesis.s3.copy.S3CopyObjectConnectorComponent |
92 changes: 92 additions & 0 deletions
92
connectors/aws-s3-copy-object-connector/src/main/resources/camel-connector-schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
{ | ||
"component":{ | ||
"kind":"component", | ||
"baseScheme":"aws-s3", | ||
"scheme":"aws-s3-copy-object-connector", | ||
"syntax":"aws-s3-copy-object-connector:bucketNameOrArn", | ||
"title":"S3CopyObject", | ||
"description":"Copy Object with S3", | ||
"label":"AWS", | ||
"deprecated":false, | ||
"async":false, | ||
"producerOnly":true, | ||
"lenientProperties":false, | ||
"javaType":"io.syndesis.s3.copy.S3CopyObjectConnectorComponent", | ||
"groupId":"io.syndesis", | ||
"artifactId":"aws-s3-copy-object-connector", | ||
"version":"0.5-SNAPSHOT" | ||
}, | ||
"componentProperties":{ | ||
|
||
}, | ||
"properties":{ | ||
"accessKey":{ | ||
"kind":"parameter", | ||
"displayName":"Access Key", | ||
"group":"common", | ||
"required":false, | ||
"type":"string", | ||
"javaType":"java.lang.String", | ||
"deprecated":false, | ||
"secret":false, | ||
"description":"Amazon AWS Access Key" | ||
}, | ||
"secretKey":{ | ||
"kind":"parameter", | ||
"displayName":"Secret Key", | ||
"group":"common", | ||
"required":false, | ||
"type":"string", | ||
"javaType":"java.lang.String", | ||
"deprecated":false, | ||
"secret":false, | ||
"description":"Amazon AWS Secret Key" | ||
}, | ||
"deleteAfterWrite":{ | ||
"kind":"parameter", | ||
"displayName":"Delete After Write", | ||
"group":"producer", | ||
"label":"producer", | ||
"required":false, | ||
"type":"boolean", | ||
"javaType":"boolean", | ||
"deprecated":false, | ||
"secret":false, | ||
"defaultValue":false, | ||
"description":"Delete file object after the S3 file has been uploaded" | ||
}, | ||
"operation":{ | ||
"kind":"parameter", | ||
"displayName":"Operation", | ||
"group":"producer", | ||
"label":"producer", | ||
"required":false, | ||
"type":"object", | ||
"javaType":"org.apache.camel.component.aws.s3.S3Operations", | ||
"enum":[ | ||
"deleteBucket", | ||
"listBuckets", | ||
"copyObject" | ||
], | ||
"deprecated":false, | ||
"secret":false, | ||
"defaultValue":"copyObject", | ||
"description":"The operation to do in case the user don't want to do only an upload" | ||
}, | ||
"region":{ | ||
"kind":"parameter", | ||
"displayName":"Region", | ||
"group":"producer", | ||
"label":"producer", | ||
"required":false, | ||
"type":"string", | ||
"javaType":"java.lang.String", | ||
"deprecated":false, | ||
"secret":false, | ||
"description":"The region where the bucket is located. This option is used in the com.amazonaws.services.s3.model.CreateBucketRequest." | ||
} | ||
}, | ||
"connectorProperties":{ | ||
|
||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
connectors/aws-s3-copy-object-connector/src/main/resources/camel-connector.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"baseScheme": "aws-s3", | ||
"baseGroupId": "org.apache.camel", | ||
"baseArtifactId": "camel-aws", | ||
"baseVersion": "2.20.0", | ||
"baseJavaType" : "org.apache.camel.component.aws.s3.S3Component", | ||
"name": "S3CopyObject", | ||
"scheme": "aws-s3-copy-object-connector", | ||
"javaType": "io.syndesis.s3.copy.S3CopyObjectConnectorComponent", | ||
"groupId" : "io.syndesis", | ||
"artifactId" : "aws-s3-copy-object-connector", | ||
"version" : "0.5-SNAPSHOT", | ||
"description" : "Copy Object with S3", | ||
"labels" : [ "AWS"], | ||
"pattern": "To", | ||
"inputDataType" : "java:File", | ||
"outputDataType" : "none", | ||
"componentOptions" : [ ], | ||
"endpointOptions" : [ "bucketName", "accessKey", "secretKey", "operation", "deleteAfterWrite", "region" ], | ||
"endpointValues" : { | ||
"operation" : "copyObject", | ||
"deleteAfterWrite" : false | ||
} | ||
} |
Oops, something went wrong.