CAMEL-10222: Fixed several modules and starters

Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/046156ce
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/046156ce
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/046156ce

Branch: refs/heads/master
Commit: 046156cee90232d04db857cff49390dae833bf97
Parents: 0879134
Author: Nicola Ferraro <ni.ferr...@gmail.com>
Authored: Thu Sep 8 17:23:21 2016 +0200
Committer: Nicola Ferraro <ni.ferr...@gmail.com>
Committed: Tue Sep 20 00:39:49 2016 +0200

----------------------------------------------------------------------
 .../camel-cassandraql-starter/pom.xml           |    5 +
 components-starter/camel-jcr-starter/pom.xml    |    5 +
 components-starter/camel-jira-starter/pom.xml   |    4 +
 .../component/jetty9/JettyContentExchange9.java |   21 +-
 .../jetty/HttpProducerSendEmptyHeaderTest.java  |    2 +
 components/camel-jira/pom.xml                   |    3 +-
 parent/pom.xml                                  |    9 +
 .../camel-spring-boot-dependencies/pom.xml      | 1045 +++++++++---------
 .../camel-spring-boot-generator-bom/pom.xml     |   22 +-
 .../target-template-pom.xml                     |   21 +
 spring-boot-dm/pom.xml                          |   13 +-
 tests/camel-itest-spring-boot/pom.xml           |   92 +-
 .../itest/springboot/ITestApplication.java      |   17 -
 .../itest/springboot/ITestConfigBuilder.java    |    2 +-
 .../springboot/command/UnitTestCommand.java     |   13 +-
 .../StaticDummyFallbackConverter.java           |    4 +-
 .../itest/springboot/CamelCassandraqlTest.java  |    1 +
 .../itest/springboot/CamelHystrixTest.java      |    1 +
 .../camel/itest/springboot/CamelJetty9Test.java |    3 +-
 .../springboot/util/ArquillianPackager.java     |   61 +-
 .../springboot/util/DependencyResolver.java     |  116 --
 .../itest/springboot/util/JarExporter.java      |    2 +-
 .../util/LibraryVersionMismatchChecker.java     |  126 ---
 .../maven/bom-generator-maven-plugin/pom.xml    |   16 +
 .../maven/bom/generator/BomGeneratorMojo.java   |   85 +-
 .../maven/bom/generator/DependencyMatcher.java  |   16 +
 .../maven/bom/generator/DependencySet.java      |   16 +
 .../spring-boot-fix-dependencies.properties     |    4 +
 28 files changed, 750 insertions(+), 975 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/046156ce/components-starter/camel-cassandraql-starter/pom.xml
----------------------------------------------------------------------
diff --git a/components-starter/camel-cassandraql-starter/pom.xml 
b/components-starter/camel-cassandraql-starter/pom.xml
index 72469df..b88e089 100644
--- a/components-starter/camel-cassandraql-starter/pom.xml
+++ b/components-starter/camel-cassandraql-starter/pom.xml
@@ -38,6 +38,11 @@
             <artifactId>camel-cassandraql</artifactId>
         </dependency>
         <dependency>
+            <groupId>com.google.guava</groupId>
+            <artifactId>guava</artifactId>
+            <version>${cassandra-driver-guava-version}</version>
+        </dependency>
+        <dependency>
             <groupId>org.apache.camel</groupId>
             <artifactId>camel-core-starter</artifactId>
         </dependency>

http://git-wip-us.apache.org/repos/asf/camel/blob/046156ce/components-starter/camel-jcr-starter/pom.xml
----------------------------------------------------------------------
diff --git a/components-starter/camel-jcr-starter/pom.xml 
b/components-starter/camel-jcr-starter/pom.xml
index 678b438..ca7c4f7 100644
--- a/components-starter/camel-jcr-starter/pom.xml
+++ b/components-starter/camel-jcr-starter/pom.xml
@@ -45,6 +45,11 @@
             <groupId>org.apache.camel</groupId>
             <artifactId>camel-spring-boot-starter</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.apache.lucene</groupId>
+            <artifactId>lucene-core</artifactId>
+            <version>${lucene3-version}</version>
+        </dependency>
     </dependencies>
 </project>
 

http://git-wip-us.apache.org/repos/asf/camel/blob/046156ce/components-starter/camel-jira-starter/pom.xml
----------------------------------------------------------------------
diff --git a/components-starter/camel-jira-starter/pom.xml 
b/components-starter/camel-jira-starter/pom.xml
index 7eaa7d5..62b07f8 100644
--- a/components-starter/camel-jira-starter/pom.xml
+++ b/components-starter/camel-jira-starter/pom.xml
@@ -38,6 +38,10 @@
             <artifactId>camel-jira</artifactId>
         </dependency>
         <dependency>
+            <groupId>com.atlassian.jira</groupId>
+            <artifactId>jira-rest-java-client</artifactId>
+        </dependency>
+        <dependency>
             <groupId>org.apache.camel</groupId>
             <artifactId>camel-core-starter</artifactId>
         </dependency>

http://git-wip-us.apache.org/repos/asf/camel/blob/046156ce/components/camel-jetty9/src/main/java/org/apache/camel/component/jetty9/JettyContentExchange9.java
----------------------------------------------------------------------
diff --git 
a/components/camel-jetty9/src/main/java/org/apache/camel/component/jetty9/JettyContentExchange9.java
 
b/components/camel-jetty9/src/main/java/org/apache/camel/component/jetty9/JettyContentExchange9.java
index f9966cc..f7cba4a 100644
--- 
a/components/camel-jetty9/src/main/java/org/apache/camel/component/jetty9/JettyContentExchange9.java
+++ 
b/components/camel-jetty9/src/main/java/org/apache/camel/component/jetty9/JettyContentExchange9.java
@@ -20,6 +20,7 @@ import java.io.Closeable;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.UnsupportedEncodingException;
+import java.lang.reflect.Method;
 import java.net.MalformedURLException;
 import java.util.Collection;
 import java.util.Map;
@@ -237,12 +238,30 @@ public class JettyContentExchange9 implements 
JettyContentExchange {
 
     private Map<String, Collection<String>> getFieldsAsMap(HttpFields fields) {
         final Map<String, Collection<String>> result = new 
TreeMap<>(String.CASE_INSENSITIVE_ORDER);
-        for (String name : fields.getFieldNamesCollection()) {
+        for (String name : getFieldNamesCollection(fields)) {
             result.put(name, fields.getValuesList(name));
         }
         return result;
     }
 
+    @SuppressWarnings("unchecked")
+    private Collection<String> getFieldNamesCollection(HttpFields fields) {
+        try {
+            return fields.getFieldNamesCollection();
+        } catch (NoSuchMethodError e) {
+            try {
+                // In newer versions of Jetty the return type has been changed 
to Set.
+                // This causes problems at byte-code level. Try recovering.
+                Method reflGetFieldNamesCollection = 
HttpFields.class.getMethod("getFieldNamesCollection");
+                Object result = reflGetFieldNamesCollection.invoke(fields);
+                return (Collection<String>) result;
+            } catch (Exception reflectionException) {
+                // Suppress, throwing the original exception
+                throw e;
+            }
+        }
+    }
+
     public Map<String, Collection<String>> getRequestHeaders() {
         return getFieldsAsMap(request.getHeaders());
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/046156ce/components/camel-jetty9/src/test/java/org/apache/camel/component/jetty/HttpProducerSendEmptyHeaderTest.java
----------------------------------------------------------------------
diff --git 
a/components/camel-jetty9/src/test/java/org/apache/camel/component/jetty/HttpProducerSendEmptyHeaderTest.java
 
b/components/camel-jetty9/src/test/java/org/apache/camel/component/jetty/HttpProducerSendEmptyHeaderTest.java
index 10b795c..b5cf0f4 100644
--- 
a/components/camel-jetty9/src/test/java/org/apache/camel/component/jetty/HttpProducerSendEmptyHeaderTest.java
+++ 
b/components/camel-jetty9/src/test/java/org/apache/camel/component/jetty/HttpProducerSendEmptyHeaderTest.java
@@ -18,11 +18,13 @@ package org.apache.camel.component.jetty;
 
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
+import org.junit.Ignore;
 import org.junit.Test;
 
 /**
  *
  */
+@Ignore("Jetty 9.3 treats an empty header as an empty string, like Jetty 8")
 public class HttpProducerSendEmptyHeaderTest extends BaseJettyTest {
 
     @Test

http://git-wip-us.apache.org/repos/asf/camel/blob/046156ce/components/camel-jira/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-jira/pom.xml b/components/camel-jira/pom.xml
index 1c18aaf..2ef25e5 100644
--- a/components/camel-jira/pom.xml
+++ b/components/camel-jira/pom.xml
@@ -36,13 +36,12 @@
     <dependency>
       <groupId>com.atlassian.jira</groupId>
       <artifactId>jira-rest-java-client</artifactId>
-      <version>1.2-m01</version>
       <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>com.atlassian.jira</groupId>
       <artifactId>jira-rest-java-client-api</artifactId>
-      <version>2.0.0-m30</version>
+      <version>${jira-rest-client-api-version}</version>
       <scope>test</scope>
     </dependency>
 

http://git-wip-us.apache.org/repos/asf/camel/blob/046156ce/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index 0293e91..36af0f1 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -331,6 +331,8 @@
     <jibx-version>1.2.6</jibx-version>
     <jing-bundle-version>20030619_5</jing-bundle-version>
     <jing-version>20030619</jing-version>
+    <jira-rest-client-version>1.2-m01</jira-rest-client-version>
+    <jira-rest-client-api-version>2.0.0-m30</jira-rest-client-api-version>
     <jmockit-version>1.5</jmockit-version>
     <jodatime-bundle-version>1.6.2</jodatime-bundle-version>
     <jodatime2-bundle-version>2.9.4</jodatime2-bundle-version>
@@ -3972,6 +3974,13 @@
         <artifactId>exec-maven-plugin</artifactId>
         <version>${exec-maven-plugin-version}</version>
       </dependency>
+
+      <!-- Optional Jira -->
+      <dependency>
+        <groupId>com.atlassian.jira</groupId>
+        <artifactId>jira-rest-java-client</artifactId>
+        <version>${jira-rest-client-version}</version>
+      </dependency>
  
       <!-- optional misc -->
       <dependency>

Reply via email to