Skip to content

Commit

Permalink
Merge pull request syndesisio#98 from oscerd/S3-cp-object-connector
Browse files Browse the repository at this point in the history
  • Loading branch information
pure-bot[bot] authored Oct 25, 2017
2 parents afcf333 + b7b0197 commit e79a797
Show file tree
Hide file tree
Showing 10 changed files with 904 additions and 3 deletions.
180 changes: 180 additions & 0 deletions connectors/aws-s3-copy-object-connector/pom.xml
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>
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");
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
class=io.syndesis.s3.copy.S3CopyObjectConnectorComponent
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":{

}
}
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
}
}
Loading

0 comments on commit e79a797

Please sign in to comment.