lburgazzoli closed pull request #256: Update runtime dependencies
URL: https://github.com/apache/camel-k/pull/256
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/runtime/catalog-builder/pom.xml b/runtime/catalog-builder/pom.xml
index 6cc13cd6..46d57070 100644
--- a/runtime/catalog-builder/pom.xml
+++ b/runtime/catalog-builder/pom.xml
@@ -58,7 +58,13 @@
         <dependencies>
           <dependency>
             <groupId>org.codehaus.groovy</groupId>
-            <artifactId>groovy-all</artifactId>
+            <artifactId>groovy</artifactId>
+            <version>${groovy.version}</version>
+            <scope>runtime</scope>
+          </dependency>
+          <dependency>
+            <groupId>org.codehaus.groovy</groupId>
+            <artifactId>groovy-json</artifactId>
             <version>${groovy.version}</version>
             <scope>runtime</scope>
           </dependency>
diff --git a/runtime/groovy/pom.xml b/runtime/groovy/pom.xml
index 53ad93d0..b1fa227b 100644
--- a/runtime/groovy/pom.xml
+++ b/runtime/groovy/pom.xml
@@ -41,15 +41,44 @@
             <exclusions>
                 <exclusion>
                     <groupId>org.codehaus.groovy</groupId>
-                    <artifactId>groovy-all</artifactId>
+                    <artifactId>groovy</artifactId>
                 </exclusion>
             </exclusions>
         </dependency>
         <dependency>
             <groupId>org.codehaus.groovy</groupId>
-            <artifactId>groovy-all</artifactId>
+            <artifactId>groovy</artifactId>
+            <version>${groovy.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.codehaus.groovy</groupId>
+            <artifactId>groovy-json</artifactId>
+            <version>${groovy.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.codehaus.groovy</groupId>
+            <artifactId>groovy-xml</artifactId>
+            <version>${groovy.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.codehaus.groovy</groupId>
+            <artifactId>groovy-nio</artifactId>
+            <version>${groovy.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.codehaus.groovy</groupId>
+            <artifactId>groovy-macro</artifactId>
+            <version>${groovy.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.codehaus.groovy</groupId>
+            <artifactId>groovy-templates</artifactId>
+            <version>${groovy.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.codehaus.groovy</groupId>
+            <artifactId>groovy-sql</artifactId>
             <version>${groovy.version}</version>
-            <classifier>indy</classifier>
         </dependency>
 
         <!-- ****************************** -->
@@ -58,6 +87,14 @@
         <!--                                -->
         <!-- ****************************** -->
 
+
+        <dependency>
+            <groupId>org.codehaus.groovy</groupId>
+            <artifactId>groovy-test</artifactId>
+            <version>${groovy.version}</version>
+            <scope>test</scope>
+        </dependency>
+
         <dependency>
             <groupId>org.spockframework</groupId>
             <artifactId>spock-core</artifactId>
@@ -71,19 +108,6 @@
             </exclusions>
         </dependency>
 
-        <dependency>
-            <groupId>org.junit.jupiter</groupId>
-            <artifactId>junit-jupiter-api</artifactId>
-            <version>${junit-jupiter.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.junit.jupiter</groupId>
-            <artifactId>junit-jupiter-engine</artifactId>
-            <version>${junit-jupiter.version}</version>
-            <scope>test</scope>
-        </dependency>
-
         <dependency>
             <groupId>org.assertj</groupId>
             <artifactId>assertj-core</artifactId>
diff --git 
a/runtime/groovy/src/test/groovy/org/apache/camel/k/groovy/dsl/IntegrationTest.groovy
 
b/runtime/groovy/src/test/groovy/org/apache/camel/k/groovy/dsl/IntegrationTest.groovy
index 32904f16..3dbd629f 100644
--- 
a/runtime/groovy/src/test/groovy/org/apache/camel/k/groovy/dsl/IntegrationTest.groovy
+++ 
b/runtime/groovy/src/test/groovy/org/apache/camel/k/groovy/dsl/IntegrationTest.groovy
@@ -32,7 +32,7 @@ class IntegrationTest extends Specification {
         when:
         def runtime = new Runtime()
         runtime.setDuration(5)
-        runtime.load(['classpath:routes-with-rest.groovy'])
+        runtime.load(['classpath:routes-with-rest.groovy'] as String[])
         runtime.addMainListener(new MainListenerSupport() {
             @Override
             void afterStart(MainSupport main) {
@@ -55,7 +55,7 @@ class IntegrationTest extends Specification {
         when:
         def runtime = new Runtime()
         runtime.setDuration(5)
-        runtime.load(['classpath:routes-with-bindings.groovy'])
+        runtime.load(['classpath:routes-with-bindings.groovy'] as String[])
         runtime.addMainListener(new MainListenerSupport() {
             @Override
             void afterStart(MainSupport main) {
@@ -82,7 +82,7 @@ class IntegrationTest extends Specification {
         when:
         def runtime = new Runtime()
         runtime.setDuration(5)
-        runtime.load(['classpath:routes-with-component-configuration.groovy'])
+        runtime.load(['classpath:routes-with-component-configuration.groovy'] 
as String[])
         runtime.addMainListener(new MainListenerSupport() {
             @Override
             void afterStart(MainSupport main) {
diff --git 
a/runtime/jvm/src/test/java/org/apache/camel/k/jvm/RoutesLoadersTest.java 
b/runtime/jvm/src/test/java/org/apache/camel/k/jvm/RoutesLoadersTest.java
index 069520a4..92ec897d 100644
--- a/runtime/jvm/src/test/java/org/apache/camel/k/jvm/RoutesLoadersTest.java
+++ b/runtime/jvm/src/test/java/org/apache/camel/k/jvm/RoutesLoadersTest.java
@@ -16,16 +16,17 @@
  */
 package org.apache.camel.k.jvm;
 
-import java.util.List;
+import static org.assertj.core.api.Assertions.assertThat;
+import static 
org.assertj.core.api.AssertionsForClassTypes.assertThatExceptionOfType;
 
+import java.util.List;
 import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.model.ProcessDefinition;
 import org.apache.camel.model.RouteDefinition;
+import org.apache.camel.model.SetBodyDefinition;
 import org.apache.camel.model.ToDefinition;
 import org.junit.jupiter.api.Test;
 
-import static org.assertj.core.api.Assertions.assertThat;
-import static 
org.assertj.core.api.AssertionsForClassTypes.assertThatExceptionOfType;
-
 public class RoutesLoadersTest {
 
     @Test
@@ -62,6 +63,27 @@ public void testLoadJava() throws Exception {
         
assertThat(routes.get(0).getOutputs().get(0)).isInstanceOf(ToDefinition.class);
     }
 
+
+    @Test
+    public void testLoadJavaWithNestedClass() throws Exception {
+        String resource = "classpath:MyRoutesWithNestedClass.java";
+        RoutesLoader loader = RoutesLoaders.loaderFor(resource, null);
+        RouteBuilder builder = loader.load(new SimpleRuntimeRegistry(), 
resource);
+
+        assertThat(loader).isInstanceOf(RoutesLoaders.JavaSource.class);
+        assertThat(builder).isNotNull();
+
+        builder.configure();
+
+        List<RouteDefinition> routes = 
builder.getRouteCollection().getRoutes();
+        assertThat(routes).hasSize(1);
+        
assertThat(routes.get(0).getInputs().get(0).getEndpointUri()).isEqualTo("timer:tick");
+        
assertThat(routes.get(0).getOutputs().get(0)).isInstanceOf(SetBodyDefinition.class);
+        
assertThat(routes.get(0).getOutputs().get(1)).isInstanceOf(ProcessDefinition.class);
+        
assertThat(routes.get(0).getOutputs().get(2)).isInstanceOf(ToDefinition.class);
+    }
+
+
     @Test
     public void testLoadJavaScript() throws Exception {
         String resource = "classpath:routes.js";
diff --git a/runtime/jvm/src/test/resources/MyRoutesWithNestedClass.java 
b/runtime/jvm/src/test/resources/MyRoutesWithNestedClass.java
new file mode 100644
index 00000000..7f8482b1
--- /dev/null
+++ b/runtime/jvm/src/test/resources/MyRoutesWithNestedClass.java
@@ -0,0 +1,23 @@
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.camel.builder.RouteBuilder;
+
+public class MyRoutesWithNestedClass extends RouteBuilder {
+    @Override
+    public void configure() throws Exception {
+        Processor toUpper = new Processor() {
+            @Override
+            public void process(Exchange exchange) throws Exception {
+                String body = exchange.getIn().getBody(String.class);
+                body = body.toUpperCase();
+
+                exchange.getOut().setBody(body);
+            }
+        };
+
+        from("timer:tick")
+            .setBody().constant("test")
+            .process(toUpper)
+            .to("log:info");
+    }
+}
\ No newline at end of file
diff --git a/runtime/pom.xml b/runtime/pom.xml
index 36c4730d..41a230ae 100644
--- a/runtime/pom.xml
+++ b/runtime/pom.xml
@@ -36,17 +36,17 @@
         <camel.version>2.23.0</camel.version>
         <junit.version>4.12</junit.version>
         <junit-jupiter.version>5.3.2</junit-jupiter.version>
-        <joor.version>0.9.9</joor.version>
+        <joor.version>0.9.10</joor.version>
         <commons-io.version>2.6</commons-io.version>
         <commons-lang.version>3.8.1</commons-lang.version>
         <commons-collections4.version>4.2</commons-collections4.version>
         <assertj.version>3.11.1</assertj.version>
         <log4j2.version>2.11.1</log4j2.version>
         <slf4j.version>1.7.25</slf4j.version>
-        <groovy.version>2.4.15</groovy.version>
+        <groovy.version>2.5.4</groovy.version>
         <kotlin.version>1.3.10</kotlin.version>
         <snakeyaml.version>1.23</snakeyaml.version>
-        <spock.version>1.0-groovy-2.4</spock.version>
+        <spock.version>1.2-groovy-2.5</spock.version>
         <jackson.version>2.9.7</jackson.version>
         <spring-boot.version>2.1.0.RELEASE</spring-boot.version>
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to