mirror of
https://github.com/apache/nifi.git
synced 2025-03-03 07:59:15 +00:00
NIFI-7069: Add groovy-dateutil module to scripting bundles
Signed-off-by: Pierre Villard <pierre.villard.fr@gmail.com> This closes #4021.
This commit is contained in:
parent
37ef10e6fb
commit
04fae9cb5f
@ -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
|
||||
|
@ -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>
|
||||
|
@ -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)
|
||||
}
|
@ -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
|
||||
|
@ -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>
|
||||
|
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user