diff --git a/README.md b/README.md
index e651e78..451b8e9 100644
--- a/README.md
+++ b/README.md
@@ -5,9 +5,15 @@ Spring Integration Extension for Amazon Web Services (AWS)
## Amazon Web Services (AWS)
-Launched in 2006, [Amazon Web Services][] (AWS) provides key infrastructure services for business through its cloud computing platform. Using cloud computing businesses can adopt a new business model whereby they do not have to plan and invest in procuring their own IT infrastructure. They can use the infrastructure and services provided by the cloud service provider and pay as they use the services. Visit [http://aws.amazon.com/products/] for more details about various products offered by Amazon as a part their cloud computing services.
+Launched in 2006, [Amazon Web Services][] (AWS) provides key infrastructure services for business through
+its cloud computing platform. Using cloud computing businesses can adopt a new business model whereby they
+do not have to plan and invest in procuring their own IT infrastructure. They can use the infrastructure and services
+provided by the cloud service provider and pay as they use the services. Visit [http://aws.amazon.com/products/]
+for more details about various products offered by Amazon as a part their cloud computing services.
-*Spring Integration Extension for Amazon Web Services* provides Spring Integration adapters for the various services provided by the [AWS SDK for Java][].
+*Spring Integration Extension for Amazon Web Services* provides Spring Integration adapters for the various services
+provided by the [AWS SDK for Java][].
+Note the Spring Integration AWS Extension is based on the [Spring Cloud AWS][] project.
## Spring Integration's extensions to AWS
@@ -20,22 +26,35 @@ This guide intends to explain briefly the various adapters available for [Amazon
* **Amazon SimpleDB** (Not initiated)
* **Amazon SNS** (Not initiated)
-Sample XML Namespace configurations for each adapter as well as sample code snippets are provided wherever necessary. Of the above libraries, *SES* and *SNS* provide outbound adapters only. All other services have inbound and outbound adapters. The *SQS* inbound adapter is capable of receiving notifications sent out from *SNS* where the topic is an *SQS* Queue.
+Sample XML Namespace configurations for each adapter as well as sample code snippets are provided wherever necessary.
+Of the above libraries, *SES* and *SNS* provide outbound adapters only. All other services have inbound
+and outbound adapters. The *SQS* inbound adapter is capable of receiving notifications sent out from *SNS*
+where the topic is an *SQS* Queue.
-For *DymamoDB* and *SimpleDB*, besides providing *Inbound*- and *Outbound Adapters*, a *MessageStore* implementation is provided, too.
+For *DymamoDB* and *SimpleDB*, besides providing *Inbound*- and *Outbound Adapters*,
+a *MessageStore* implementation is provided, too.
# Executing the test cases.
-All test cases for the adapters are present in the *src/test/java* folder. On executing the build, maven's surefire plugin will execute all the tests.
+All test cases for the adapters are present in the *src/test/java* folder. On executing the build, maven surefire
+plugin will execute all the tests.
-> Please note that all the tests ending with **AWSTests.java* connect to the actual [Amazon Web Services][] and are excluded by default in the maven build. All other tests rely on mocking to test the functionality. You need to execute the **AWSTests.java* manually to test the connectivity to AWS using your credentials.
+> Please note that all the tests ending with **AWSTests.java* connect to the actual [Amazon Web Services][]
+and are excluded by default in the maven build. All other tests rely on mocking to test the functionality.
+You need to execute the **AWSTests.java* manually to test the connectivity to AWS using your credentials.
-All these **AWSTests.java* tests look for the file *awscredentials.properties* in the classpath. To be on the safe side, create the following file at *src/test/resources*:
-*spring-integration-aws/src/test/resources/awscredentials.properties*. It is added to the *.gitignore* file by default. This will prevent this file to be checked in accidentally and revealing your credentials.
+All these **AWSTests.java* tests look for the file *awscredentials.properties* in the classpath.
+To be on the safe side, create the following file at *src/test/resources*:
+*spring-integration-aws/src/test/resources/awscredentials.properties*. It is added to the *.gitignore* file by default.
+This will prevent this file to be checked in accidentally and revealing your credentials.
-This file needs to have two properties *accessKey* and *secretKey*, holding the values of your access key and secret key respectively.
+This file needs to have two properties *accessKey* and *secretKey*, holding the values of your access key
+and secret key respectively.
-> **Note: AWS Services are chargeable and we recommend not to execute the **AWSTests.java* as part of your regular builds. AWS does provide a free tier which is sufficient to perform your tests without being charged (not true for DynamoDB though), however keep a check on your account usage regularly. Get more information about AWS free tier at [http://aws.amazon.com/free/][]**
+> **Note: AWS Services are chargeable and we recommend not to execute the **AWSTests.java* as part
+of your regular builds. AWS does provide a free tier which is sufficient to perform your tests without being charged
+(not true for DynamoDB though), however keep a check on your account usage regularly.
+Get more information about AWS free tier at [http://aws.amazon.com/free/][]**
#Adapters
@@ -48,93 +67,14 @@ This file needs to have two properties *accessKey* and *secretKey*, holding the
##Simple Email Service (SES)
-###Introduction
-
-Amazon Simple Email Service (SES) is a web service for sending emails from the cloud. It supports two types of mails currently, the simple mail and raw email.
-Use simple mail if your application just needs to send out emails with some html formatting and without embedded images or attachments. Raw emails gives more flixibility to
-send complex emails with embedded images and attachments.
-For more details about Amazon SES and its pricing visit [http://aws.amazon.com/ses/]
-We have an outbound channel adapter for the Amazon SES Service for sending out simple and raw emails with complete namespace support for configuring the adapter.
-To prevent misuse of the service, Amazon has enforced some restrictions, for sandbox you need to verify email ids which would be used in *to, cc, bcc* and *from*. For more details on how to use SES and
-other details refer to the SES documentation at [http://aws.amazon.com/documentation/ses/][].
-
-###Outbound Channel Adapter
-
-Below xml snippet is a simple definition of the outbound channel adapter
-
-
-
-
-
-
-*propertiesFile* attribute contains the AWS access key and secret key. The
-name of the properties are *accessKey* and *secretKey* respectively.
-An alternative to the *propertiesFile* attribute is the *accessKey* and the
-*secretKey* attributes containing the values of access key and the secret key. The definition will look as below.
-
-
-
-
-Both the approaches for providing the credentials are mutually exclusive to each other.
-
-####Sending Mail Messages
-We shall now see a java code snippet to send a mail using the SNS adapter
-
-
-* **Simple Mail Message**
-
- A Simple Mail Message does not support attachments and embedded contents. It supports basic html content to be sent as the mail body.
-
- Map headers = new HashMap();
- headers.put("fromEmailId", "xyz@somemail.com");
- headers.put("htmlFormat", true);
- headers.put("subject", "Mail Sent from AWS SES Outbound adapter");
- headers.put("toEmailId", "abc@anothermail.com");
-
- Message msg =
- MessageBuilder.withPayload("A Simple Mail Message sent from " +
- "Amazon SES Outbound adapter from Spring integration")
- .copyHeaders(headers)
- .build();
- channel.send(msg);
-
- The above piece off code is pretty simple.
- * We add four headers to the message for the *to email id*, *from email id*, *subject* and a *flag* to indicate whether the content is an html content or plain text content.
- * Of these headers the *from email id* and *subject* are mandatory. We can specify one or more of *to*, *cc* or *bcc* email addresses.
- * The message needs to have a payload of string which is either a plain
- text or html content. The content will be rendered a html only if the
- *htmlFormat *header is set appropriately.
- * The value of the *htmlFormat* header can be Boolean *true*, or *y*,*yes*
- or *true* as String. For String the value is case insensitive. Any other value will be considered as *false*.
- * The message is sent over the channel to which is the input channel of
- the outbound channel adapter.
- * See *o.s.i.aws.ses.AmazonSESMailHeaders* for all the possible header values supported.
-
-* **Raw Mail Message**
-
- Use raw mail when you need more flexibility to send mails, like setting mime types and email headers. As long as the content complies with the standard email format standard you can use this means for sending the mail to your recipients. In the below sample we use the spring's *o.s.mail.javamail.MimeMessageHelper* to construct the Mime message.
-
- Session session = Session.getDefaultInstance(new Properties());
- MimeMessageHelper helper = new MimeMessageHelper(new MimeMessage(session),true);
- helper.setTo("abc@somemail.com");
- helper.setFrom("xyz@anothermail.com");
- helper.setText("A Sample Embedded image");
- helper.addAttachment(file.getName(),new File(""));
- helper.setSubject("Name Pic");
- Message message =
- MessageBuilder.withPayload(helper.getMimeMessage()).build();
- channel.send(message);
-
- The messages over this channel are consumed by the outbound SES adapter and the mail is sent out using SES.
+There is no adapter for SES, since [Spring Cloud AWS][] provides implementations for
+`org.springframework.mail.MailSender` - `SimpleEmailServiceMailSender` and `SimpleEmailServiceJavaMailSender`, which
+can be injected to the ``.
+[Spring Cloud AWS]: https://github.com/spring-cloud/spring-cloud-aws
[AWS SDK for Java]: http://aws.amazon.com/sdkforjava/
[Amazon Web Services]: http://aws.amazon.com/
[http://aws.amazon.com/products/]: http://aws.amazon.com/products/
[http://aws.amazon.com/ses/]: http://aws.amazon.com/ses/
[http://aws.amazon.com/documentation/ses/]: http://aws.amazon.com/documentation/ses/
-[http://aws.amazon.com/free/]: http://aws.amazon.com/free/
\ No newline at end of file
+[http://aws.amazon.com/free/]: http://aws.amazon.com/free/
diff --git a/build.gradle b/build.gradle
index 0bb50b8..f95cfaa 100644
--- a/build.gradle
+++ b/build.gradle
@@ -28,23 +28,19 @@ configurations {
}
ext {
- apacheHttpclientVersion='4.3.4'
- apacheHttpCoreVersion='4.3.2'
- awsSdkVersion='1.8.7'
- commonsCodecVersion='1.9'
- commonsIoVersion='2.0.1'
- javaMailVersion='1.5.2'
- jacksonVersion='1.9.11'
- springIntegrationVersion = '4.0.3.RELEASE'
+ commonsIoVersion='2.4'
+ jacocoVersion = '0.7.1.201405082137'
+ springCloudAwsVersion = '1.0.0.RC2'
+ springIntegrationVersion = '4.1.2.RELEASE'
idPrefix = 'aws'
- linkHomepage = 'https://github.com/spring-projects/spring-integration-extensions'
+ linkHomepage = 'https://github.com/spring-projects/spring-integration-aws'
linkCi = 'https://build.spring.io/browse/INTEXT'
linkIssue = 'https://jira.spring.io/browse/INTEXT'
- linkScmUrl = 'https://github.com/spring-projects/spring-integration-extensions'
- linkScmConnection = 'https://github.com/spring-projects/spring-integration-extensions.git'
- linkScmDevConnection = 'git@github.com:spring-projects/spring-integration-extensions.git'
+ linkScmUrl = 'https://github.com/spring-projects/spring-integration-aws'
+ linkScmConnection = 'https://github.com/spring-projects/spring-integration-aws.git'
+ linkScmDevConnection = 'git@github.com:spring-projects/spring-integration-aws.git'
}
ext.javadocLinks = [
@@ -55,21 +51,12 @@ ext.javadocLinks = [
dependencies {
compile "org.springframework.integration:spring-integration-core:$springIntegrationVersion"
- compile "com.amazonaws:aws-java-sdk:$awsSdkVersion"
- compile "commons-codec:commons-codec:$commonsCodecVersion"
+ compile "org.springframework.cloud:spring-cloud-aws-messaging:$springCloudAwsVersion"
compile "commons-io:commons-io:$commonsIoVersion"
- compile "org.codehaus.jackson:jackson-core-asl:$jacksonVersion"
- compile "org.codehaus.jackson:jackson-mapper-asl:$jacksonVersion"
- compile "org.apache.httpcomponents:httpclient:$apacheHttpclientVersion"
- compile "org.apache.httpcomponents:httpcore:$apacheHttpCoreVersion"
-
- //Amazon SES Support
- compile ("org.springframework.integration:spring-integration-mail:$springIntegrationVersion", optional)
- compile ("javax.mail:javax.mail-api:$javaMailVersion", optional)
testCompile "org.springframework.integration:spring-integration-test:$springIntegrationVersion"
- jacoco group: "org.jacoco", name: "org.jacoco.agent", version: "0.7.1.201405082137", classifier: "runtime"
+ jacoco "org.jacoco:org.jacoco.agent:$jacocoVersion:runtime"
}
diff --git a/gradle.properties b/gradle.properties
index 5364470..bebfcbc 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1 +1 @@
-version=0.5.0.BUILD-SNAPSHOT
+version=1.0.0.BUILD-SNAPSHOT
diff --git a/publish-maven.gradle b/publish-maven.gradle
index b6dab25..91db539 100644
--- a/publish-maven.gradle
+++ b/publish-maven.gradle
@@ -31,7 +31,7 @@ def customizePom(pom, gradleProject) {
generatedPom.project {
name = gradleProject.description
description = gradleProject.description
- url = 'https://github.com/SpringSource/spring-integration-extensions'
+ url = 'https://github.com/spring-projects/spring-integration-aws'
organization {
name = 'SpringSource'
url = 'http://springsource.org'
@@ -44,9 +44,9 @@ def customizePom(pom, gradleProject) {
}
}
scm {
- url = 'https://github.com/SpringSource/spring-integration-extensions'
- connection = 'scm:git:git://github.com/SpringSource/spring-integration-extensions'
- developerConnection = 'scm:git:git://github.com/SpringSource/spring-integration-extensions'
+ url = 'https://github.com/spring-projects/spring-integration-aws'
+ connection = 'scm:git:git://github.com/spring-projects/spring-integration-aws'
+ developerConnection = 'scm:git:git://github.com/spring-projects/spring-integration-aws'
}
developers {
@@ -58,7 +58,12 @@ def customizePom(pom, gradleProject) {
developer {
id = 'ghillert'
name = 'Gunnar Hillert'
- email = 'ghillert@vmware.com'
+ email = 'ghillert@pivotal.io'
+ }
+ developer {
+ id = 'abilan'
+ name = 'Artem Bilan'
+ email = 'abilan@pivotal.io'
}
}
}
diff --git a/src/main/java/org/springframework/integration/aws/config/xml/AWSNamespaceHandler.java b/src/main/java/org/springframework/integration/aws/config/xml/AWSNamespaceHandler.java
index 7ce4ed6..8260558 100644
--- a/src/main/java/org/springframework/integration/aws/config/xml/AWSNamespaceHandler.java
+++ b/src/main/java/org/springframework/integration/aws/config/xml/AWSNamespaceHandler.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2013 the original author or authors.
+ * Copyright 2013-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,24 +17,19 @@ package org.springframework.integration.aws.config.xml;
import org.springframework.integration.aws.s3.config.xml.AmazonS3InboundChannelAdapterParser;
import org.springframework.integration.aws.s3.config.xml.AmazonS3OutboundChannelAdapterParser;
-import org.springframework.integration.aws.ses.config.xml.AmazonSESOutboundAdapterParser;
import org.springframework.integration.config.xml.AbstractIntegrationNamespaceHandler;
/**
* The namespace handler for "int-aws" namespace
*
* @author Amol Nayak
- *
* @since 0.5
- *
*/
-public class AWSNamespaceHandler extends
- AbstractIntegrationNamespaceHandler {
+public class AWSNamespaceHandler extends AbstractIntegrationNamespaceHandler {
public void init() {
- this.registerBeanDefinitionParser("ses-outbound-channel-adapter", new AmazonSESOutboundAdapterParser());
- this.registerBeanDefinitionParser("s3-outbound-channel-adapter",new AmazonS3OutboundChannelAdapterParser());
+ this.registerBeanDefinitionParser("s3-outbound-channel-adapter", new AmazonS3OutboundChannelAdapterParser());
this.registerBeanDefinitionParser("s3-inbound-channel-adapter", new AmazonS3InboundChannelAdapterParser());
}
diff --git a/src/main/java/org/springframework/integration/aws/ses/AmazonSESMessageHandler.java b/src/main/java/org/springframework/integration/aws/ses/AmazonSESMessageHandler.java
deleted file mode 100644
index 9465d31..0000000
--- a/src/main/java/org/springframework/integration/aws/ses/AmazonSESMessageHandler.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright 2002-2013 the original author or authors.
- *
- * 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.
- */
-package org.springframework.integration.aws.ses;
-
-import org.springframework.integration.aws.core.AWSCredentials;
-import org.springframework.integration.aws.ses.core.DefaultAmazonSESMailSender;
-import org.springframework.integration.mail.MailSendingMessageHandler;
-import org.springframework.mail.javamail.JavaMailSender;
-
-/**
- * The Message handler for the SES Mail. This will be used to send email
- * using Amazon SES
- *
- * @author Amol Nayak
- *
- * @since 0.5
- *
- */
-public class AmazonSESMessageHandler extends MailSendingMessageHandler {
-
- /**
- * The Default constructor that extends from the {@link MailSendingMessageHandler} and passes
- * it an instance of {@link DefaultAmazonSESMailSender}
- * @param credentials
- */
- public AmazonSESMessageHandler(AWSCredentials credentials) {
- super(new DefaultAmazonSESMailSender(credentials));
- }
-
- /**
- * The constructor that accepts the {@link JavaMailSender} instance, used for
- * unit tests only
- * @param mailSender
- */
- AmazonSESMessageHandler(JavaMailSender mailSender) {
- super(mailSender);
- }
-}
diff --git a/src/main/java/org/springframework/integration/aws/ses/config/xml/AmazonSESOutboundAdapterParser.java b/src/main/java/org/springframework/integration/aws/ses/config/xml/AmazonSESOutboundAdapterParser.java
deleted file mode 100644
index 44f28d6..0000000
--- a/src/main/java/org/springframework/integration/aws/ses/config/xml/AmazonSESOutboundAdapterParser.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright 2002-2014 the original author or authors.
- *
- * 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.
- */
-package org.springframework.integration.aws.ses.config.xml;
-
-
-import org.springframework.integration.aws.config.xml.AbstractAWSOutboundChannelAdapterParser;
-import org.springframework.integration.aws.ses.AmazonSESMessageHandler;
-import org.springframework.messaging.MessageHandler;
-
-/**
- * parse the <ses-outbound-channel-adapter/> of the "int-aws" namespace
- *
- * @author Amol Nayak
- * @author Rob Harrop
- *
- * @since 0.5
- *
- */
-public class AmazonSESOutboundAdapterParser extends
- AbstractAWSOutboundChannelAdapterParser {
-
-
- @Override
- public Class extends MessageHandler> getMessageHandlerImplementation() {
- return AmazonSESMessageHandler.class;
- }
-}
diff --git a/src/main/java/org/springframework/integration/aws/ses/core/AmazonSESMailSendException.java b/src/main/java/org/springframework/integration/aws/ses/core/AmazonSESMailSendException.java
deleted file mode 100644
index 92942b0..0000000
--- a/src/main/java/org/springframework/integration/aws/ses/core/AmazonSESMailSendException.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright 2002-2013 the original author or authors.
- *
- * 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.
- */
-package org.springframework.integration.aws.ses.core;
-
-import java.util.Map;
-
-import org.springframework.integration.aws.core.AWSOperationException;
-
-/**
- * This exception will be thrown upon failure in sending a mail from Amazon SES
- *
- * @author Amol Nayak
- *
- * @since 0.5
- *
- */
-public class AmazonSESMailSendException extends AWSOperationException {
-
-
- /**
- *
- */
- private static final long serialVersionUID = -3035267174544370619L;
-
- private final Map