You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by jo...@apache.org on 2020/01/30 15:19:29 UTC

[nifi] branch support/nifi-1.11.x updated: NIFI-7069: Add groovy-dateutil module to scripting bundles

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

joewitt pushed a commit to branch support/nifi-1.11.x
in repository https://gitbox.apache.org/repos/asf/nifi.git


The following commit(s) were added to refs/heads/support/nifi-1.11.x by this push:
     new c255156  NIFI-7069: Add groovy-dateutil module to scripting bundles
c255156 is described below

commit c255156f39a9bef6c54601295d3ec9856ecca759
Author: Matthew Burgess <ma...@apache.org>
AuthorDate: Mon Jan 27 15:14:42 2020 -0500

    NIFI-7069: Add groovy-dateutil module to scripting bundles
    
    Signed-off-by: Pierre Villard <pi...@gmail.com>
    
    This closes #4021.
---
 .../nifi-groovyx-nar/src/main/resources/META-INF/NOTICE   | 15 +++++++++++++++
 .../nifi-groovyx-bundle/nifi-groovyx-processors/pom.xml   |  6 ++++++
 .../src/test/resources/groovy/test_onTrigger.groovy       |  3 +++
 .../nifi-scripting-nar/src/main/resources/META-INF/NOTICE | 15 +++++++++++++++
 .../nifi-scripting-processors/pom.xml                     |  8 +++++++-
 .../src/test/resources/groovy/test_reader.groovy          |  3 +++
 6 files changed, 49 insertions(+), 1 deletion(-)

diff --git a/nifi-nar-bundles/nifi-groovyx-bundle/nifi-groovyx-nar/src/main/resources/META-INF/NOTICE b/nifi-nar-bundles/nifi-groovyx-bundle/nifi-groovyx-nar/src/main/resources/META-INF/NOTICE
index 5ea8698..805dee5 100644
--- a/nifi-nar-bundles/nifi-groovyx-bundle/nifi-groovyx-nar/src/main/resources/META-INF/NOTICE
+++ b/nifi-nar-bundles/nifi-groovyx-bundle/nifi-groovyx-nar/src/main/resources/META-INF/NOTICE
@@ -47,6 +47,21 @@ The following binary components are provided under the Apache Software License v
          Licensed under the Creative Commons Attribution Licence v2.5
          http://creativecommons.org/licenses/by/2.5/
 
+  (ASLv2) Groovy Dateutil
+    The following NOTICE information applies:
+      Groovy Language
+         Copyright 2003-2018 The respective authors and developers
+         Developers and Contributors are listed in the project POM file
+         and Gradle build file
+
+         This product includes software developed by
+         The Groovy community (http://groovy.codehaus.org/).
+
+         This product bundles icons from the famfamfam.com silk icons set
+         http://www.famfamfam.com/lab/icons/silk/
+         Licensed under the Creative Commons Attribution Licence v2.5
+         http://creativecommons.org/licenses/by/2.5/
+
   (ASLv2) Apache Ant
     The following NOTICE information applies:
         Copyright 1999-2018 The Apache Software Foundation
diff --git a/nifi-nar-bundles/nifi-groovyx-bundle/nifi-groovyx-processors/pom.xml b/nifi-nar-bundles/nifi-groovyx-bundle/nifi-groovyx-processors/pom.xml
index c42c0de..18f69ea 100644
--- a/nifi-nar-bundles/nifi-groovyx-bundle/nifi-groovyx-processors/pom.xml
+++ b/nifi-nar-bundles/nifi-groovyx-bundle/nifi-groovyx-processors/pom.xml
@@ -53,6 +53,12 @@
             <version>${nifi.groovy.version}</version>
             <scope>provided</scope>
         </dependency>
+        <!-- groovy-all does not include groovy-dateutil by default, so must explicitly include it here -->
+        <dependency>
+            <groupId>org.codehaus.groovy</groupId>
+            <artifactId>groovy-dateutil</artifactId>
+            <version>${nifi.groovy.version}</version>
+        </dependency>
         <dependency>
             <groupId>org.apache.ivy</groupId>
             <artifactId>ivy</artifactId>
diff --git a/nifi-nar-bundles/nifi-groovyx-bundle/nifi-groovyx-processors/src/test/resources/groovy/test_onTrigger.groovy b/nifi-nar-bundles/nifi-groovyx-bundle/nifi-groovyx-processors/src/test/resources/groovy/test_onTrigger.groovy
index e78307d..827f148 100644
--- a/nifi-nar-bundles/nifi-groovyx-bundle/nifi-groovyx-processors/src/test/resources/groovy/test_onTrigger.groovy
+++ b/nifi-nar-bundles/nifi-groovyx-bundle/nifi-groovyx-processors/src/test/resources/groovy/test_onTrigger.groovy
@@ -19,6 +19,9 @@ if (flowFile == null) {
     context?.yield();
 }
 else {
+    // Try to parse a date here, will fail after Groovy 2.5.0 if groovy-dateutil is not included
+    Date.parse('yyyyMMdd', '20190630')
+
     flowFile = session.putAttribute(flowFile, "from-content", "test content")
     session.transfer(flowFile, REL_SUCCESS)
 }
\ No newline at end of file
diff --git a/nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-nar/src/main/resources/META-INF/NOTICE b/nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-nar/src/main/resources/META-INF/NOTICE
index 4f3dc76..aa0c33c 100644
--- a/nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-nar/src/main/resources/META-INF/NOTICE
+++ b/nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-nar/src/main/resources/META-INF/NOTICE
@@ -47,6 +47,21 @@ The following binary components are provided under the Apache Software License v
          Licensed under the Creative Commons Attribution Licence v2.5
          http://creativecommons.org/licenses/by/2.5/
 
+  (ASLv2) Groovy Dateutil
+    The following NOTICE information applies:
+      Groovy Language
+         Copyright 2003-2018 The respective authors and developers
+         Developers and Contributors are listed in the project POM file
+         and Gradle build file
+
+         This product includes software developed by
+         The Groovy community (http://groovy.codehaus.org/).
+
+         This product bundles icons from the famfamfam.com silk icons set
+         http://www.famfamfam.com/lab/icons/silk/
+         Licensed under the Creative Commons Attribution Licence v2.5
+         http://creativecommons.org/licenses/by/2.5/
+
   (ASLv2) Apache Ant
       The following NOTICE information applies:
           Copyright 1999-2018 The Apache Software Foundation
diff --git a/nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-processors/pom.xml b/nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-processors/pom.xml
index 980147e..6e5c980 100644
--- a/nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-processors/pom.xml
+++ b/nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-processors/pom.xml
@@ -145,6 +145,12 @@
             <artifactId>groovy-xml</artifactId>
             <version>${scripting.groovy.version}</version>
             <scope>provided</scope>
-       </dependency>
+        </dependency>
+        <!-- groovy-all does not include groovy-dateutil by default, so must explicitly include it here -->
+        <dependency>
+            <groupId>org.codehaus.groovy</groupId>
+            <artifactId>groovy-dateutil</artifactId>
+            <version>${scripting.groovy.version}</version>
+        </dependency>
     </dependencies>
 </project>
diff --git a/nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-processors/src/test/resources/groovy/test_reader.groovy b/nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-processors/src/test/resources/groovy/test_reader.groovy
index 5d54701..df2cc84 100644
--- a/nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-processors/src/test/resources/groovy/test_reader.groovy
+++ b/nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-processors/src/test/resources/groovy/test_reader.groovy
@@ -40,6 +40,9 @@ class GroovyProcessor implements Processor {
     void onScheduled(ProcessContext context) {
         // Set the attribute value for use in onTrigger
         setAttributeFromThisInOnScheduled = 'test content'
+
+        // Try to parse a date here, will fail after Groovy 2.5.0 if groovy-dateutil is not included
+        Date.parse('yyyyMMdd', '20190630')
     }
 
     void onStopped(ProcessContext context) {