This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch CAMEL-13678
in repository https://gitbox.apache.org/repos/asf/camel.git

commit cd24c6f60e4bc3f09f40e942522cb318fadd5c26
Author: Claus Ibsen <claus.ib...@gmail.com>
AuthorDate: Mon Jul 8 09:57:22 2019 +0200

    CAMEL-13678: Move attachments out of camel-core into camel-attachments.
---
 apache-camel/pom.xml                                           |  5 +++++
 apache-camel/src/main/descriptors/common-bin.xml               |  1 +
 .../java/org/apache/camel/component/cxf/DefaultCxfBinding.java |  2 +-
 parent/pom.xml                                                 | 10 +++++-----
 .../spring-boot-dm/camel-spring-boot-dependencies/pom.xml      |  5 +++++
 5 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/apache-camel/pom.xml b/apache-camel/pom.xml
index 09bb095..c31cebe 100644
--- a/apache-camel/pom.xml
+++ b/apache-camel/pom.xml
@@ -174,6 +174,11 @@
     </dependency>
     <dependency>
       <groupId>org.apache.camel</groupId>
+      <artifactId>camel-attachments</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.camel</groupId>
       <artifactId>camel-avro</artifactId>
       <version>${project.version}</version>
     </dependency>
diff --git a/apache-camel/src/main/descriptors/common-bin.xml 
b/apache-camel/src/main/descriptors/common-bin.xml
index 3618211..632e829 100644
--- a/apache-camel/src/main/descriptors/common-bin.xml
+++ b/apache-camel/src/main/descriptors/common-bin.xml
@@ -55,6 +55,7 @@
         <include>org.apache.camel:camel-atmosphere-websocket</include>
         <include>org.apache.camel:camel-atom</include>
         <include>org.apache.camel:camel-atomix</include>
+        <include>org.apache.camel:camel-attachments</include>
         <include>org.apache.camel:camel-avro</include>
         <include>org.apache.camel:camel-aws-cw</include>
         <include>org.apache.camel:camel-aws-ddb</include>
diff --git 
a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/DefaultCxfBinding.java
 
b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/DefaultCxfBinding.java
index 2c1e632..9430b55 100644
--- 
a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/DefaultCxfBinding.java
+++ 
b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/DefaultCxfBinding.java
@@ -413,7 +413,7 @@ public class DefaultCxfBinding implements CxfBinding, 
HeaderFilterStrategyAware
         // propagate attachments
         Set<Attachment> attachments = null;
         boolean isXop = 
Boolean.valueOf(camelExchange.getProperty(Message.MTOM_ENABLED, String.class));
-        if (camelExchange.getOut(AttachmentMessage.class).hasAttachments()) {
+        if (camelExchange.hasOut() && 
camelExchange.getOut(AttachmentMessage.class).hasAttachments()) {
             for (Map.Entry<String, org.apache.camel.attachment.Attachment> 
entry : 
camelExchange.getOut(AttachmentMessage.class).getAttachmentObjects().entrySet())
 {
                 if (attachments == null) {
                     attachments = new HashSet<>();
diff --git a/parent/pom.xml b/parent/pom.xml
index b44633c..0316376 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -919,11 +919,6 @@
       </dependency>
       <dependency>
         <groupId>org.apache.camel</groupId>
-        <artifactId>camel-attachments</artifactId>
-        <version>${project.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.camel</groupId>
         <artifactId>camel-atmos</artifactId>
         <version>${project.version}</version>
       </dependency>
@@ -944,6 +939,11 @@
       </dependency>
       <dependency>
         <groupId>org.apache.camel</groupId>
+        <artifactId>camel-attachments</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.camel</groupId>
         <artifactId>camel-avro</artifactId>
         <version>${project.version}</version>
       </dependency>
diff --git 
a/platforms/spring-boot/spring-boot-dm/camel-spring-boot-dependencies/pom.xml 
b/platforms/spring-boot/spring-boot-dm/camel-spring-boot-dependencies/pom.xml
index f83bc95..2cd631f 100644
--- 
a/platforms/spring-boot/spring-boot-dm/camel-spring-boot-dependencies/pom.xml
+++ 
b/platforms/spring-boot/spring-boot-dm/camel-spring-boot-dependencies/pom.xml
@@ -393,6 +393,11 @@
       </dependency>
       <dependency>
         <groupId>org.apache.camel</groupId>
+        <artifactId>camel-attachments</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.camel</groupId>
         <artifactId>camel-avro</artifactId>
         <version>${project.version}</version>
       </dependency>

Reply via email to