This is an automated email from the ASF dual-hosted git repository.
exceptionfactory pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git
The following commit(s) were added to refs/heads/main by this push:
new bd2276260e NIFI-12051 Upgraded Groovy from 3.0.19 to 4.0.15
bd2276260e is described below
commit bd2276260ea0b1ef7a6c0b227f8be098b6bfb50b
Author: Joseph Witt <[email protected]>
AuthorDate: Thu Sep 14 15:37:42 2023 -0500
NIFI-12051 Upgraded Groovy from 3.0.19 to 4.0.15
- Adjusted Groovy Maven coordinates to org.apache.groovy
- Adjusted build configuration and tests for Groovy 4
This closes #7692
Signed-off-by: David Handermann <[email protected]>
---
.../nifi-flowfile-repo-serialization/pom.xml | 2 +-
.../nifi/processors/graph/ExecuteGraphQueryIT.java | 65 ----------------------
.../graph/ExecuteGraphQueryRecordTest.java | 33 -----------
.../src/test/resources/testComplexFlowFile.json | 9 ---
.../nifi-graph-test-clients/pom.xml | 5 --
.../nifi-other-graph-services/pom.xml | 20 -------
nifi-nar-bundles/nifi-graph-bundle/pom.xml | 24 --------
.../nifi-groovyx-bundle/nifi-groovyx-nar/pom.xml | 10 +---
.../nifi-groovyx-processors/pom.xml | 6 +-
nifi-nar-bundles/nifi-groovyx-bundle/pom.xml | 9 +--
.../nifi-hive-bundle/nifi-hive-test-utils/pom.xml | 4 +-
.../nifi-hive-bundle/nifi-hive3-processors/pom.xml | 10 ++--
.../nifi-iceberg-processors/pom.xml | 2 +-
.../nifi-mongodb-processors/pom.xml | 8 ---
.../nifi-scripting-nar/pom.xml | 10 +---
.../nifi-scripting-processors/pom.xml | 16 +++---
.../resources/groovy/test_record_reader_xml.groovy | 2 +-
nifi-nar-bundles/nifi-scripting-bundle/pom.xml | 8 +--
.../nifi-standard-processors/pom.xml | 12 ----
.../processors/standard/TestEncryptContent.java | 17 ------
nifi-toolkit/nifi-toolkit-encrypt-config/pom.xml | 11 ++--
.../NiFiRegistryAuthorizersXmlEncryptor.groovy | 2 +-
...iFiRegistryIdentityProvidersXmlEncryptor.groovy | 2 +-
.../properties/ConfigEncryptionToolTest.groovy | 28 +++++-----
nifi-toolkit/pom.xml | 14 +----
pom.xml | 21 +++----
26 files changed, 64 insertions(+), 286 deletions(-)
diff --git
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-flowfile-repo-serialization/pom.xml
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-flowfile-repo-serialization/pom.xml
index 9c1496f2b4..3f7e8450b4 100644
---
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-flowfile-repo-serialization/pom.xml
+++
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-flowfile-repo-serialization/pom.xml
@@ -71,7 +71,7 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.codehaus.groovy</groupId>
+ <groupId>org.apache.groovy</groupId>
<artifactId>groovy-dateutil</artifactId>
<version>${nifi.groovy.version}</version>
<scope>test</scope>
diff --git
a/nifi-nar-bundles/nifi-graph-bundle/nifi-graph-processors/src/test/java/org/apache/nifi/processors/graph/ExecuteGraphQueryIT.java
b/nifi-nar-bundles/nifi-graph-bundle/nifi-graph-processors/src/test/java/org/apache/nifi/processors/graph/ExecuteGraphQueryIT.java
deleted file mode 100644
index 2557cca0ee..0000000000
---
a/nifi-nar-bundles/nifi-graph-bundle/nifi-graph-processors/src/test/java/org/apache/nifi/processors/graph/ExecuteGraphQueryIT.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.nifi.processors.graph;
-
-import com.fasterxml.jackson.databind.ObjectMapper;
-import org.apache.nifi.graph.InMemoryJanusGraphClientService;
-import org.apache.nifi.util.MockFlowFile;
-import org.apache.nifi.util.TestRunner;
-import org.apache.nifi.util.TestRunners;
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-
-import java.util.List;
-import java.util.Map;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-public class ExecuteGraphQueryIT {
- TestRunner runner;
- public static final String QUERY = "0.upto(9) {\n" +
-
"g.addV(\"test\").property(\"uuid\", UUID.randomUUID().toString()).next()\n" +
- "}\n" +
-
"g.V().hasLabel(\"test\").count().next()";
-
- @BeforeEach
- public void setUp() throws Exception {
- InMemoryJanusGraphClientService service = new
InMemoryJanusGraphClientService();
- runner = TestRunners.newTestRunner(ExecuteGraphQuery.class);
- runner.addControllerService("clientService", service);
- runner.enableControllerService(service);
- runner.setProperty(AbstractGraphExecutor.CLIENT_SERVICE,
"clientService");
- runner.setProperty(AbstractGraphExecutor.QUERY, QUERY);
- }
-
- @Test
- public void test() throws Exception {
- runner.run();
- runner.assertTransferCount(ExecuteGraphQuery.REL_FAILURE, 0);
- runner.assertTransferCount(ExecuteGraphQuery.REL_ORIGINAL, 0);
- runner.assertTransferCount(ExecuteGraphQuery.REL_SUCCESS, 1);
-
- List<MockFlowFile> flowFileList =
runner.getFlowFilesForRelationship(ExecuteGraphQuery.REL_SUCCESS);
- MockFlowFile ff = flowFileList.get(0);
- byte[] raw = runner.getContentAsByteArray(ff);
- String str = new String(raw);
- List<Map<String, Object>> result = new ObjectMapper().readValue(str,
List.class);
- assertEquals(1, result.size());
- assertEquals(10, result.get(0).get("result"));
- }
-}
diff --git
a/nifi-nar-bundles/nifi-graph-bundle/nifi-graph-processors/src/test/java/org/apache/nifi/processors/graph/ExecuteGraphQueryRecordTest.java
b/nifi-nar-bundles/nifi-graph-bundle/nifi-graph-processors/src/test/java/org/apache/nifi/processors/graph/ExecuteGraphQueryRecordTest.java
index f8a99e3570..225a5d6e99 100644
---
a/nifi-nar-bundles/nifi-graph-bundle/nifi-graph-processors/src/test/java/org/apache/nifi/processors/graph/ExecuteGraphQueryRecordTest.java
+++
b/nifi-nar-bundles/nifi-graph-bundle/nifi-graph-processors/src/test/java/org/apache/nifi/processors/graph/ExecuteGraphQueryRecordTest.java
@@ -115,39 +115,6 @@ public class ExecuteGraphQueryRecordTest {
assertTrue(contentEqualsWindowsSafe(relGraph,
"/testFlowFileList.json"));
}
- @Test
- public void testComplexFlowFile() throws Exception {
- setupGraphClient(false);
- List<Map<String,Object>> test = new ArrayList<>();
- Map<String, Object> tempMap = new HashMap<>();
- tempMap.put("tMap", "123");
- tempMap.put("L", new ArrayList<Integer>(){
- {
- add(1);
- add(2);
- add(3);
- }
- });
- test.add(tempMap);
-
- byte[] json = JsonOutput.toJson(test).getBytes();
- String submissionScript = "Map<String, Object> vertexHashes = new
HashMap()\n" +
- "vertexHashes.put('1234', tMap)\n" +
- "[ 'L': L, 'result': vertexHashes ]";
- runner.setProperty(ExecuteGraphQueryRecord.SUBMISSION_SCRIPT,
submissionScript);
- runner.setProperty("tMap", "/tMap");
- runner.setProperty("L", "/L");
- runner.enqueue(json, enqueProperties);
-
- runner.run();
- runner.assertTransferCount(ExecuteGraphQueryRecord.GRAPH, 1);
- runner.assertTransferCount(ExecuteGraphQueryRecord.SUCCESS, 1);
- runner.assertTransferCount(ExecuteGraphQueryRecord.FAILURE, 0);
- MockFlowFile relGraph =
runner.getFlowFilesForRelationship(ExecuteGraphQueryRecord.GRAPH).get(0);
-
- assertTrue(contentEqualsWindowsSafe(relGraph,
"/testComplexFlowFile.json"));
- }
-
@Test
public void testAttributes() throws Exception {
setupGraphClient(false);
diff --git
a/nifi-nar-bundles/nifi-graph-bundle/nifi-graph-processors/src/test/resources/testComplexFlowFile.json
b/nifi-nar-bundles/nifi-graph-bundle/nifi-graph-processors/src/test/resources/testComplexFlowFile.json
deleted file mode 100644
index 19852fdf06..0000000000
---
a/nifi-nar-bundles/nifi-graph-bundle/nifi-graph-processors/src/test/resources/testComplexFlowFile.json
+++ /dev/null
@@ -1,9 +0,0 @@
-[ {
- "L" : [ 1, 2, 3 ]
-}, {
- "result" : {
- "1234" : {
- "1234" : "123"
- }
- }
-} ]
\ No newline at end of file
diff --git a/nifi-nar-bundles/nifi-graph-bundle/nifi-graph-test-clients/pom.xml
b/nifi-nar-bundles/nifi-graph-bundle/nifi-graph-test-clients/pom.xml
index e1c7cfa73c..3695e7e48d 100644
--- a/nifi-nar-bundles/nifi-graph-bundle/nifi-graph-test-clients/pom.xml
+++ b/nifi-nar-bundles/nifi-graph-bundle/nifi-graph-test-clients/pom.xml
@@ -48,11 +48,6 @@
<artifactId>gremlin-driver</artifactId>
<version>${gremlin.version}</version>
</dependency>
- <dependency>
- <groupId>org.apache.tinkerpop</groupId>
- <artifactId>gremlin-groovy</artifactId>
- <version>${gremlin.version}</version>
- </dependency>
<!-- Override Guava 29.0 from JanusGraph 0.6.3 -->
<dependency>
<groupId>com.google.guava</groupId>
diff --git
a/nifi-nar-bundles/nifi-graph-bundle/nifi-other-graph-services/pom.xml
b/nifi-nar-bundles/nifi-graph-bundle/nifi-other-graph-services/pom.xml
index d2d9c07c41..005b9b8919 100644
--- a/nifi-nar-bundles/nifi-graph-bundle/nifi-other-graph-services/pom.xml
+++ b/nifi-nar-bundles/nifi-graph-bundle/nifi-other-graph-services/pom.xml
@@ -74,26 +74,6 @@
<version>2.0.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
- <dependency>
- <groupId>org.codehaus.groovy</groupId>
- <artifactId>groovy</artifactId>
- <classifier>indy</classifier>
- </dependency>
- <dependency>
- <groupId>org.codehaus.groovy</groupId>
- <artifactId>groovy-json</artifactId>
- <classifier>indy</classifier>
- </dependency>
- <dependency>
- <groupId>org.codehaus.groovy</groupId>
- <artifactId>groovy-groovysh</artifactId>
- <classifier>indy</classifier>
- </dependency>
- <dependency>
- <groupId>org.codehaus.groovy</groupId>
- <artifactId>groovy-jsr223</artifactId>
- <classifier>indy</classifier>
- </dependency>
<dependency>
<groupId>org.apache.tinkerpop</groupId>
<artifactId>gremlin-core</artifactId>
diff --git a/nifi-nar-bundles/nifi-graph-bundle/pom.xml
b/nifi-nar-bundles/nifi-graph-bundle/pom.xml
index e1198bd3b7..24de5c0df2 100644
--- a/nifi-nar-bundles/nifi-graph-bundle/pom.xml
+++ b/nifi-nar-bundles/nifi-graph-bundle/pom.xml
@@ -44,30 +44,6 @@
<artifactId>nifi-graph-processors</artifactId>
<version>2.0.0-SNAPSHOT</version>
</dependency>
- <dependency>
- <groupId>org.codehaus.groovy</groupId>
- <artifactId>groovy</artifactId>
- <version>${nifi.groovy.version}</version>
- <classifier>indy</classifier>
- </dependency>
- <dependency>
- <groupId>org.codehaus.groovy</groupId>
- <artifactId>groovy-json</artifactId>
- <version>${nifi.groovy.version}</version>
- <classifier>indy</classifier>
- </dependency>
- <dependency>
- <groupId>org.codehaus.groovy</groupId>
- <artifactId>groovy-groovysh</artifactId>
- <version>${nifi.groovy.version}</version>
- <classifier>indy</classifier>
- </dependency>
- <dependency>
- <groupId>org.codehaus.groovy</groupId>
- <artifactId>groovy-jsr223</artifactId>
- <version>${nifi.groovy.version}</version>
- <classifier>indy</classifier>
- </dependency>
</dependencies>
</dependencyManagement>
</project>
diff --git a/nifi-nar-bundles/nifi-groovyx-bundle/nifi-groovyx-nar/pom.xml
b/nifi-nar-bundles/nifi-groovyx-bundle/nifi-groovyx-nar/pom.xml
index cb1ad1b40d..daaddd896f 100644
--- a/nifi-nar-bundles/nifi-groovyx-bundle/nifi-groovyx-nar/pom.xml
+++ b/nifi-nar-bundles/nifi-groovyx-bundle/nifi-groovyx-nar/pom.xml
@@ -44,23 +44,19 @@
<!-- Groovy dependencies to include in the NAR for processors to use
at runtime -->
<dependency>
- <groupId>org.codehaus.groovy</groupId>
+ <groupId>org.apache.groovy</groupId>
<artifactId>groovy-all</artifactId>
<type>pom</type>
<scope>runtime</scope>
<exclusions>
<exclusion>
- <groupId>org.codehaus.groovy</groupId>
+ <groupId>org.apache.groovy</groupId>
<artifactId>groovy-test</artifactId>
</exclusion>
<exclusion>
- <groupId>org.codehaus.groovy</groupId>
+ <groupId>org.apache.groovy</groupId>
<artifactId>groovy-test-junit5</artifactId>
</exclusion>
- <exclusion>
- <groupId>org.codehaus.groovy</groupId>
- <artifactId>groovy-testng</artifactId>
- </exclusion>
<exclusion>
<groupId>org.apache.ant</groupId>
<artifactId>ant-junit</artifactId>
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 603aa07a89..b7bc6699f3 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
@@ -42,20 +42,20 @@
<version>2.0.0-SNAPSHOT</version>
</dependency>
<dependency>
- <groupId>org.codehaus.groovy</groupId>
+ <groupId>org.apache.groovy</groupId>
<artifactId>groovy-json</artifactId>
<version>${nifi.groovy.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.codehaus.groovy</groupId>
+ <groupId>org.apache.groovy</groupId>
<artifactId>groovy-sql</artifactId>
<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>
+ <groupId>org.apache.groovy</groupId>
<artifactId>groovy-dateutil</artifactId>
<version>${nifi.groovy.version}</version>
</dependency>
diff --git a/nifi-nar-bundles/nifi-groovyx-bundle/pom.xml
b/nifi-nar-bundles/nifi-groovyx-bundle/pom.xml
index 135ce7e8a6..eb2b6da8b3 100644
--- a/nifi-nar-bundles/nifi-groovyx-bundle/pom.xml
+++ b/nifi-nar-bundles/nifi-groovyx-bundle/pom.xml
@@ -29,11 +29,6 @@
<module>nifi-groovyx-processors</module>
<module>nifi-groovyx-nar</module>
</modules>
-
- <properties>
- <groovyx.groovy.version>${nifi.groovy.version}</groovyx.groovy.version>
- </properties>
-
<dependencyManagement>
<dependencies>
<dependency>
@@ -42,9 +37,9 @@
<version>2.0.0-SNAPSHOT</version>
</dependency>
<dependency>
- <groupId>org.codehaus.groovy</groupId>
+ <groupId>org.apache.groovy</groupId>
<artifactId>groovy-all</artifactId>
- <version>${groovyx.groovy.version}</version>
+ <version>${nifi.groovy.version}</version>
<type>pom</type>
<scope>provided</scope>
</dependency>
diff --git a/nifi-nar-bundles/nifi-hive-bundle/nifi-hive-test-utils/pom.xml
b/nifi-nar-bundles/nifi-hive-bundle/nifi-hive-test-utils/pom.xml
index 42d07d48db..a3d7014abc 100644
--- a/nifi-nar-bundles/nifi-hive-bundle/nifi-hive-test-utils/pom.xml
+++ b/nifi-nar-bundles/nifi-hive-bundle/nifi-hive-test-utils/pom.xml
@@ -172,7 +172,7 @@
<artifactId>guava</artifactId>
</exclusion>
<exclusion>
- <groupId>org.codehaus.groovy</groupId>
+ <groupId>org.apache.groovy</groupId>
<artifactId>groovy-all</artifactId>
</exclusion>
<exclusion>
@@ -217,7 +217,7 @@
<artifactId>woodstox-core</artifactId>
</exclusion>
<exclusion>
- <groupId>org.codehaus.groovy</groupId>
+ <groupId>org.apache.groovy</groupId>
<artifactId>groovy-all</artifactId>
</exclusion>
<exclusion>
diff --git a/nifi-nar-bundles/nifi-hive-bundle/nifi-hive3-processors/pom.xml
b/nifi-nar-bundles/nifi-hive-bundle/nifi-hive3-processors/pom.xml
index 822fafa035..1618c97ca3 100644
--- a/nifi-nar-bundles/nifi-hive-bundle/nifi-hive3-processors/pom.xml
+++ b/nifi-nar-bundles/nifi-hive-bundle/nifi-hive3-processors/pom.xml
@@ -180,6 +180,10 @@
<groupId>org.apache.ivy</groupId>
<artifactId>ivy</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>org.codehaus.groovy</groupId>
+ <artifactId>groovy-all</artifactId>
+ </exclusion>
</exclusions>
</dependency>
<dependency>
@@ -330,12 +334,6 @@
<artifactId>curator-recipes</artifactId>
<version>${curator.version}</version>
</dependency>
- <!-- Override groovy-all:2.4.11 from Hive -->
- <dependency>
- <groupId>org.codehaus.groovy</groupId>
- <artifactId>groovy-all</artifactId>
- <version>2.4.21</version>
- </dependency>
<!-- Override Jettison 1.5.3 from Hive -->
<dependency>
<groupId>org.codehaus.jettison</groupId>
diff --git
a/nifi-nar-bundles/nifi-iceberg-bundle/nifi-iceberg-processors/pom.xml
b/nifi-nar-bundles/nifi-iceberg-bundle/nifi-iceberg-processors/pom.xml
index c5c1d57ab3..522d9f1b79 100644
--- a/nifi-nar-bundles/nifi-iceberg-bundle/nifi-iceberg-processors/pom.xml
+++ b/nifi-nar-bundles/nifi-iceberg-bundle/nifi-iceberg-processors/pom.xml
@@ -132,7 +132,7 @@
<artifactId>bcprov-jdk15on</artifactId>
</exclusion>
<exclusion>
- <groupId>org.codehaus.groovy</groupId>
+ <groupId>org.apache.groovy</groupId>
<artifactId>groovy-all</artifactId>
</exclusion>
<exclusion>
diff --git
a/nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/pom.xml
b/nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/pom.xml
index 2fc1ace584..460d4ba013 100644
--- a/nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/pom.xml
+++ b/nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/pom.xml
@@ -107,18 +107,10 @@
<version>2.0.0-SNAPSHOT</version>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.codehaus.groovy</groupId>
- <artifactId>groovy-json</artifactId>
- <version>${nifi.groovy.version}</version>
- <scope>test</scope>
- </dependency>
-
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>junit-jupiter</artifactId>
</dependency>
-
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>mongodb</artifactId>
diff --git a/nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-nar/pom.xml
b/nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-nar/pom.xml
index 6716a14a7a..3ba4c6e0ab 100644
--- a/nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-nar/pom.xml
+++ b/nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-nar/pom.xml
@@ -60,23 +60,19 @@
<!-- Groovy dependencies to include in the NAR for processors to use
at runtime -->
<dependency>
- <groupId>org.codehaus.groovy</groupId>
+ <groupId>org.apache.groovy</groupId>
<artifactId>groovy-all</artifactId>
<type>pom</type>
<scope>runtime</scope>
<exclusions>
<exclusion>
- <groupId>org.codehaus.groovy</groupId>
+ <groupId>org.apache.groovy</groupId>
<artifactId>groovy-test</artifactId>
</exclusion>
<exclusion>
- <groupId>org.codehaus.groovy</groupId>
+ <groupId>org.apache.groovy</groupId>
<artifactId>groovy-test-junit5</artifactId>
</exclusion>
- <exclusion>
- <groupId>org.codehaus.groovy</groupId>
- <artifactId>groovy-testng</artifactId>
- </exclusion>
<exclusion>
<groupId>org.apache.ant</groupId>
<artifactId>ant-junit</artifactId>
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 1bc34d00e5..760f1d4a91 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
@@ -120,28 +120,28 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.codehaus.groovy</groupId>
+ <groupId>org.apache.groovy</groupId>
<artifactId>groovy-json</artifactId>
- <version>${scripting.groovy.version}</version>
+ <version>${nifi.groovy.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.codehaus.groovy</groupId>
+ <groupId>org.apache.groovy</groupId>
<artifactId>groovy-jsr223</artifactId>
- <version>${scripting.groovy.version}</version>
+ <version>${nifi.groovy.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.codehaus.groovy</groupId>
+ <groupId>org.apache.groovy</groupId>
<artifactId>groovy-xml</artifactId>
- <version>${scripting.groovy.version}</version>
+ <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>
+ <groupId>org.apache.groovy</groupId>
<artifactId>groovy-dateutil</artifactId>
- <version>${scripting.groovy.version}</version>
+ <version>${nifi.groovy.version}</version>
</dependency>
</dependencies>
<build>
diff --git
a/nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-processors/src/test/resources/groovy/test_record_reader_xml.groovy
b/nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-processors/src/test/resources/groovy/test_record_reader_xml.groovy
index db2c03b079..f5e9cbb82f 100644
---
a/nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-processors/src/test/resources/groovy/test_record_reader_xml.groovy
+++
b/nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-processors/src/test/resources/groovy/test_record_reader_xml.groovy
@@ -38,7 +38,7 @@ class GroovyXmlRecordReader implements RecordReader {
GroovyXmlRecordReader(final String recordTag, final RecordSchema schema,
final InputStream inputStream) {
recordSchema = schema
- def xml = new XmlSlurper().parse(inputStream)
+ def xml = new groovy.xml.XmlSlurper().parse(inputStream)
// Change the XML fields to a MapRecord for each incoming record
recordIterator = xml[recordTag].collect {r ->
// Create a map of field names to values, using the field names
from the schema as keys into the XML object
diff --git a/nifi-nar-bundles/nifi-scripting-bundle/pom.xml
b/nifi-nar-bundles/nifi-scripting-bundle/pom.xml
index 3db3997af0..95f7109a69 100644
--- a/nifi-nar-bundles/nifi-scripting-bundle/pom.xml
+++ b/nifi-nar-bundles/nifi-scripting-bundle/pom.xml
@@ -30,10 +30,6 @@
<module>nifi-scripting-nar</module>
</modules>
- <properties>
- <scripting.groovy.version>3.0.19</scripting.groovy.version>
- </properties>
-
<dependencyManagement>
<dependencies>
<dependency>
@@ -78,9 +74,9 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.codehaus.groovy</groupId>
+ <groupId>org.apache.groovy</groupId>
<artifactId>groovy-all</artifactId>
- <version>${scripting.groovy.version}</version>
+ <version>${nifi.groovy.version}</version>
<type>pom</type>
<scope>provided</scope>
</dependency>
diff --git
a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/pom.xml
b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/pom.xml
index 61be7c0c57..51857ddcc9 100644
--- a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/pom.xml
+++ b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/pom.xml
@@ -478,18 +478,6 @@
<version>2.0.0-SNAPSHOT</version>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.codehaus.groovy</groupId>
- <artifactId>groovy-json</artifactId>
- <version>${nifi.groovy.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.codehaus.groovy</groupId>
- <artifactId>groovy-servlet</artifactId>
- <version>${nifi.groovy.version}</version>
- <scope>test</scope>
- </dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
diff --git
a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEncryptContent.java
b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEncryptContent.java
index 6ec4cda785..b5620cf286 100644
---
a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEncryptContent.java
+++
b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEncryptContent.java
@@ -16,8 +16,6 @@
*/
package org.apache.nifi.processors.standard;
-import groovy.time.TimeCategory;
-import groovy.time.TimeDuration;
import org.apache.commons.codec.DecoderException;
import org.apache.commons.codec.binary.Hex;
import org.apache.nifi.components.ValidationResult;
@@ -47,10 +45,8 @@ import java.nio.charset.StandardCharsets;
import java.nio.file.Paths;
import java.security.Security;
import java.text.ParseException;
-import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Collection;
-import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
@@ -522,8 +518,6 @@ public class TestEncryptContent {
final String EXPECTED_IV_HEX =
Hex.encodeHexString(Arrays.copyOfRange(flowfileContentBytes, ivDelimiterStart -
16, ivDelimiterStart));
// Assert the timestamp attribute was written and is accurate
- final TimeDuration diff = calculateTimestampDifference(new Date(),
flowFile.getAttribute("encryptcontent.timestamp"));
- assertTrue(diff.toMilliseconds() < 1_000);
assertEquals(encryptionMethod.name(),
flowFile.getAttribute("encryptcontent.algorithm"));
assertEquals(kdf.name(), flowFile.getAttribute("encryptcontent.kdf"));
assertEquals("encrypted",
flowFile.getAttribute("encryptcontent.action"));
@@ -566,11 +560,6 @@ public class TestEncryptContent {
int ivDelimiterStart =
CipherUtility.findSequence(flowfileContentBytes,
RandomIVPBECipherProvider.IV_DELIMITER);
assertEquals(16, ivDelimiterStart);
- final TimeDuration diff = calculateTimestampDifference(new Date(),
flowFile.getAttribute("encryptcontent.timestamp"));
-
- // Assert the timestamp attribute was written and is accurate
- assertTrue(diff.toMilliseconds() < 1_000);
-
final String EXPECTED_IV_HEX =
Hex.encodeHexString(Arrays.copyOfRange(flowfileContentBytes, 0,
ivDelimiterStart));
final int EXPECTED_CIPHER_TEXT_LENGTH =
CipherUtility.calculateCipherTextLength(PLAINTEXT.length(), 0);
assertEquals(encryptionMethod.name(),
flowFile.getAttribute("encryptcontent.algorithm"));
@@ -771,10 +760,4 @@ public class TestEncryptContent {
return Hex.encodeHexString(rawSaltBytes);
}
- private static TimeDuration calculateTimestampDifference(Date date, String
timestamp) throws ParseException {
- SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd
HH:mm:ss.SSS Z");
- Date parsedTimestamp = formatter.parse(timestamp);
-
- return TimeCategory.minus(date, parsedTimestamp);
- }
}
diff --git a/nifi-toolkit/nifi-toolkit-encrypt-config/pom.xml
b/nifi-toolkit/nifi-toolkit-encrypt-config/pom.xml
index 3518eac80b..e150bb5ca4 100644
--- a/nifi-toolkit/nifi-toolkit-encrypt-config/pom.xml
+++ b/nifi-toolkit/nifi-toolkit-encrypt-config/pom.xml
@@ -139,26 +139,27 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.codehaus.groovy</groupId>
+ <groupId>org.apache.groovy</groupId>
<artifactId>groovy-test</artifactId>
</dependency>
<dependency>
- <groupId>org.codehaus.groovy</groupId>
+ <groupId>org.apache.groovy</groupId>
<artifactId>groovy-all</artifactId>
+ <version>${nifi.groovy.version}</version>
<type>pom</type>
<exclusions>
<exclusion>
- <groupId>org.codehaus.groovy</groupId>
+ <groupId>org.apache.groovy</groupId>
<artifactId>groovy-groovysh</artifactId>
</exclusion>
<exclusion>
- <groupId>org.codehaus.groovy</groupId>
+ <groupId>org.apache.groovy</groupId>
<artifactId>groovy-ant</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
- <groupId>org.codehaus.groovy</groupId>
+ <groupId>org.apache.groovy</groupId>
<artifactId>groovy-cli-commons</artifactId>
<version>${nifi.groovy.version}</version>
</dependency>
diff --git
a/nifi-toolkit/nifi-toolkit-encrypt-config/src/main/groovy/org/apache/nifi/toolkit/encryptconfig/util/NiFiRegistryAuthorizersXmlEncryptor.groovy
b/nifi-toolkit/nifi-toolkit-encrypt-config/src/main/groovy/org/apache/nifi/toolkit/encryptconfig/util/NiFiRegistryAuthorizersXmlEncryptor.groovy
index b474e4e236..b07f7b23f0 100644
---
a/nifi-toolkit/nifi-toolkit-encrypt-config/src/main/groovy/org/apache/nifi/toolkit/encryptconfig/util/NiFiRegistryAuthorizersXmlEncryptor.groovy
+++
b/nifi-toolkit/nifi-toolkit-encrypt-config/src/main/groovy/org/apache/nifi/toolkit/encryptconfig/util/NiFiRegistryAuthorizersXmlEncryptor.groovy
@@ -85,7 +85,7 @@ class NiFiRegistryAuthorizersXmlEncryptor extends
XmlEncryptor {
// Find & replace the userGroupProvider element of the updated content
in the original contents
try {
- def parsedXml = new XmlSlurper().parseText(updatedXmlContent)
+ def parsedXml = new
groovy.xml.XmlSlurper().parseText(updatedXmlContent)
def provider = parsedXml.userGroupProvider.find { it.'class' as
String == LDAP_USER_GROUP_PROVIDER_CLASS }
if (provider) {
def serializedProvider = new XmlUtil().serialize(provider)
diff --git
a/nifi-toolkit/nifi-toolkit-encrypt-config/src/main/groovy/org/apache/nifi/toolkit/encryptconfig/util/NiFiRegistryIdentityProvidersXmlEncryptor.groovy
b/nifi-toolkit/nifi-toolkit-encrypt-config/src/main/groovy/org/apache/nifi/toolkit/encryptconfig/util/NiFiRegistryIdentityProvidersXmlEncryptor.groovy
index e37788c579..dab9bf9dd7 100644
---
a/nifi-toolkit/nifi-toolkit-encrypt-config/src/main/groovy/org/apache/nifi/toolkit/encryptconfig/util/NiFiRegistryIdentityProvidersXmlEncryptor.groovy
+++
b/nifi-toolkit/nifi-toolkit-encrypt-config/src/main/groovy/org/apache/nifi/toolkit/encryptconfig/util/NiFiRegistryIdentityProvidersXmlEncryptor.groovy
@@ -84,7 +84,7 @@ class NiFiRegistryIdentityProvidersXmlEncryptor extends
XmlEncryptor {
// Find & replace the provider element of the updated content in the
original contents
try {
- def parsedXml = new XmlSlurper().parseText(updatedXmlContent)
+ def parsedXml = new
groovy.xml.XmlSlurper().parseText(updatedXmlContent)
def provider = parsedXml.provider.find { it.'class' as String ==
LDAP_PROVIDER_CLASS }
if (provider) {
def serializedProvider = new XmlUtil().serialize(provider)
diff --git
a/nifi-toolkit/nifi-toolkit-encrypt-config/src/test/groovy/org/apache/nifi/properties/ConfigEncryptionToolTest.groovy
b/nifi-toolkit/nifi-toolkit-encrypt-config/src/test/groovy/org/apache/nifi/properties/ConfigEncryptionToolTest.groovy
index 45a44bb201..8153517fc8 100644
---
a/nifi-toolkit/nifi-toolkit-encrypt-config/src/test/groovy/org/apache/nifi/properties/ConfigEncryptionToolTest.groovy
+++
b/nifi-toolkit/nifi-toolkit-encrypt-config/src/test/groovy/org/apache/nifi/properties/ConfigEncryptionToolTest.groovy
@@ -2080,8 +2080,8 @@ class ConfigEncryptionToolTest {
logger.info("Updated XML content: ${updatedXmlContent}")
// Check that the output values for sensitive properties are
not the same as the original (i.e. it was encrypted)
- def originalParsedXml = new
XmlSlurper().parseText(originalXmlContent)
- def updatedParsedXml = new
XmlSlurper().parseText(updatedXmlContent)
+ def originalParsedXml = new
groovy.xml.XmlSlurper().parseText(originalXmlContent)
+ def updatedParsedXml = new
groovy.xml.XmlSlurper().parseText(updatedXmlContent)
assert originalParsedXml != updatedParsedXml
assert originalParsedXml.'**'.findAll { it.@encryption } !=
updatedParsedXml.'**'.findAll {
it.@encryption
@@ -2164,8 +2164,8 @@ class ConfigEncryptionToolTest {
logger.info("Updated XML content: ${updatedXmlContent}")
// Check that the output values for sensitive properties are
not the same as the original (i.e. it was encrypted)
- def originalParsedXml = new
XmlSlurper().parseText(originalXmlContent)
- def updatedParsedXml = new
XmlSlurper().parseText(updatedXmlContent)
+ def originalParsedXml = new
groovy.xml.XmlSlurper().parseText(originalXmlContent)
+ def updatedParsedXml = new
groovy.xml.XmlSlurper().parseText(updatedXmlContent)
assert originalParsedXml != updatedParsedXml
def encryptedValues = updatedParsedXml.provider.find {
@@ -2908,8 +2908,8 @@ class ConfigEncryptionToolTest {
logger.info("Updated XML content: ${updatedXmlContent}")
// Check that the output values for sensitive properties are
not the same as the original (i.e. it was encrypted)
- def originalParsedXml = new
XmlSlurper().parseText(originalXmlContent)
- def updatedParsedXml = new
XmlSlurper().parseText(updatedXmlContent)
+ def originalParsedXml = new
groovy.xml.XmlSlurper().parseText(originalXmlContent)
+ def updatedParsedXml = new
groovy.xml.XmlSlurper().parseText(updatedXmlContent)
assert originalParsedXml != updatedParsedXml
assert originalParsedXml.'**'.findAll { it.@encryption } !=
updatedParsedXml.'**'.findAll {
it.@encryption
@@ -2992,8 +2992,8 @@ class ConfigEncryptionToolTest {
logger.info("Updated XML content: ${updatedXmlContent}")
// Check that the output values for sensitive properties are
not the same as the original (i.e. it was encrypted)
- def originalParsedXml = new
XmlSlurper().parseText(originalXmlContent)
- def updatedParsedXml = new
XmlSlurper().parseText(updatedXmlContent)
+ def originalParsedXml = new
groovy.xml.XmlSlurper().parseText(originalXmlContent)
+ def updatedParsedXml = new
groovy.xml.XmlSlurper().parseText(updatedXmlContent)
assert originalParsedXml != updatedParsedXml
def encryptedValues = updatedParsedXml.userGroupProvider.find {
@@ -3070,8 +3070,8 @@ class ConfigEncryptionToolTest {
logger.info("Updated XML content: ${updatedXmlContent}")
// Check that the output values for sensitive properties are
not the same as the original (i.e. it was encrypted)
- def originalParsedXml = new
XmlSlurper().parseText(originalXmlContent)
- def updatedParsedXml = new
XmlSlurper().parseText(updatedXmlContent)
+ def originalParsedXml = new
groovy.xml.XmlSlurper().parseText(originalXmlContent)
+ def updatedParsedXml = new
groovy.xml.XmlSlurper().parseText(updatedXmlContent)
assert originalParsedXml != updatedParsedXml
assert originalParsedXml.'**'.findAll { it.@encryption } !=
updatedParsedXml.'**'.findAll {
it.@encryption
@@ -3200,8 +3200,8 @@ class ConfigEncryptionToolTest {
final String updatedLipXmlContent = outputLIPFile.text
logger.info("Updated LIP XML content: ${updatedLipXmlContent}")
// Check that the output values for sensitive properties are
not the same as the original (i.e. it was encrypted)
- def originalLipParsedXml = new
XmlSlurper().parseText(originalLipXmlContent)
- def updatedLipParsedXml = new
XmlSlurper().parseText(updatedLipXmlContent)
+ def originalLipParsedXml = new
groovy.xml.XmlSlurper().parseText(originalLipXmlContent)
+ def updatedLipParsedXml = new
groovy.xml.XmlSlurper().parseText(updatedLipXmlContent)
assert originalLipParsedXml != updatedLipParsedXml
assert originalLipParsedXml.'**'.findAll { it.@encryption } !=
updatedLipParsedXml.'**'.findAll {
it.@encryption
@@ -3224,8 +3224,8 @@ class ConfigEncryptionToolTest {
final String updatedAuthorizersXmlContent =
outputAuthorizersFile.text
logger.info("Updated Authorizers XML content:
${updatedAuthorizersXmlContent}")
// Check that the output values for sensitive properties are
not the same as the original (i.e. it was encrypted)
- def originalAuthorizersParsedXml = new
XmlSlurper().parseText(originalAuthorizersXmlContent)
- def updatedAuthorizersParsedXml = new
XmlSlurper().parseText(updatedAuthorizersXmlContent)
+ def originalAuthorizersParsedXml = new
groovy.xml.XmlSlurper().parseText(originalAuthorizersXmlContent)
+ def updatedAuthorizersParsedXml = new
groovy.xml.XmlSlurper().parseText(updatedAuthorizersXmlContent)
assert originalAuthorizersParsedXml !=
updatedAuthorizersParsedXml
assert originalAuthorizersParsedXml.'**'.findAll {
it.@encryption
diff --git a/nifi-toolkit/pom.xml b/nifi-toolkit/pom.xml
index a4d4c9b3cc..825122b995 100644
--- a/nifi-toolkit/pom.xml
+++ b/nifi-toolkit/pom.xml
@@ -30,15 +30,11 @@
<module>nifi-toolkit-cli</module>
<module>nifi-toolkit-api</module>
</modules>
- <properties>
- <toolkit.groovy.version>3.0.19</toolkit.groovy.version>
- </properties>
<dependencyManagement>
<dependencies>
<dependency>
- <groupId>org.codehaus.groovy</groupId>
+ <groupId>org.apache.groovy</groupId>
<artifactId>groovy-all</artifactId>
- <version>${toolkit.groovy.version}</version>
<type>pom</type>
<scope>compile</scope>
<exclusions>
@@ -47,17 +43,13 @@
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
<exclusion>
- <groupId>org.codehaus.groovy</groupId>
+ <groupId>org.apache.groovy</groupId>
<artifactId>groovy-test</artifactId>
</exclusion>
<exclusion>
- <groupId>org.codehaus.groovy</groupId>
+ <groupId>org.apache.groovy</groupId>
<artifactId>groovy-test-junit5</artifactId>
</exclusion>
- <exclusion>
- <groupId>org.codehaus.groovy</groupId>
- <artifactId>groovy-testng</artifactId>
- </exclusion>
<exclusion>
<groupId>org.apache.ant</groupId>
<artifactId>ant-junit</artifactId>
diff --git a/pom.xml b/pom.xml
index b9c3e96336..4a12c56456 100644
--- a/pom.xml
+++ b/pom.xml
@@ -130,9 +130,9 @@
<javax.annotation-api.version>1.3.2</javax.annotation-api.version>
<jakarta.xml.bind-api.version>2.3.3</jakarta.xml.bind-api.version>
<json.smart.version>2.4.11</json.smart.version>
- <nifi.groovy.version>3.0.19</nifi.groovy.version>
+ <nifi.groovy.version>4.0.15</nifi.groovy.version>
<groovy.eclipse.compiler.version>3.9.0</groovy.eclipse.compiler.version>
- <groovy.eclipse.batch.version>3.0.9-03</groovy.eclipse.batch.version>
+ <groovy.eclipse.batch.version>4.0.15-03</groovy.eclipse.batch.version>
<surefire.version>3.1.2</surefire.version>
<hadoop.version>3.3.6</hadoop.version>
<ozone.version>1.2.1</ozone.version>
@@ -336,24 +336,20 @@
<version>${mockito.version}</version>
</dependency>
<dependency>
- <groupId>org.codehaus.groovy</groupId>
+ <groupId>org.apache.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>${nifi.groovy.version}</version>
<type>pom</type>
<scope>test</scope>
<exclusions>
<exclusion>
- <groupId>org.codehaus.groovy</groupId>
+ <groupId>org.apache.groovy</groupId>
<artifactId>groovy-test</artifactId>
</exclusion>
<exclusion>
- <groupId>org.codehaus.groovy</groupId>
+ <groupId>org.apache.groovy</groupId>
<artifactId>groovy-test-junit5</artifactId>
</exclusion>
- <exclusion>
- <groupId>org.codehaus.groovy</groupId>
- <artifactId>groovy-testng</artifactId>
- </exclusion>
<exclusion>
<groupId>org.apache.ant</groupId>
<artifactId>ant-junit</artifactId>
@@ -361,7 +357,7 @@
</exclusions>
</dependency>
<dependency>
- <groupId>org.codehaus.groovy</groupId>
+ <groupId>org.apache.groovy</groupId>
<artifactId>groovy-test</artifactId>
<version>${nifi.groovy.version}</version>
<scope>test</scope>
@@ -933,8 +929,9 @@
</execution>
</executions>
<configuration>
- <source>${maven.compiler.source}</source>
- <target>${maven.compiler.target}</target>
+ <source>${maven.compiler.release}</source>
+ <target>${maven.compiler.release}</target>
+ <release>${maven.compiler.release}</release>
</configuration>
<dependencies>
<dependency>