From 1156f4cbc57c2bac5654d6b475ddfd486cb66050 Mon Sep 17 00:00:00 2001 From: exceptionfactory Date: Thu, 9 Feb 2023 22:41:49 -0600 Subject: [PATCH] NIFI-11165 This closes #6944. Removed optional jigsaw build profiles - Removed jigsaw build profiles - Removed Java 11 directories from assemblies Signed-off-by: Joe Witt --- minifi/minifi-assembly/pom.xml | 18 -- .../assembly/dependencies-windows-service.xml | 24 --- .../src/main/assembly/dependencies.xml | 24 --- .../service/MiNiFiExecCommandProvider.java | 21 --- minifi/minifi-c2/minifi-c2-assembly/pom.xml | 18 -- .../src/main/assembly/dependencies.xml | 18 -- nifi-assembly/pom.xml | 17 -- nifi-assembly/src/main/assembly/common.xml | 18 -- .../src/main/assembly/dependencies.xml | 9 +- nifi-assembly/src/main/assembly/ranger.xml | 6 - .../org/apache/nifi/bootstrap/RunNiFi.java | 28 --- .../nifi/bootstrap/RunStatelessNiFi.java | 15 -- nifi-commons/nifi-site-to-site-client/pom.xml | 33 +--- nifi-commons/nifi-utils/pom.xml | 24 +-- .../nifi-kafka-connector-assembly/pom.xml | 19 --- .../src/main/assembly/dependencies.xml | 23 --- .../src/main/assembly/dependencies.xml | 23 --- .../nifi-kafka-connector/pom.xml | 18 -- .../nifi-extension-manifest-model/pom.xml | 20 +-- .../nifi-extension-manifest-parser/pom.xml | 25 +-- .../nifi-database-utils/pom.xml | 24 +-- .../org/apache/nifi/util/db/JdbcCommon.java | 12 +- .../nifi-prometheus-utils/pom.xml | 20 --- .../nifi-framework/nifi-authorizer/pom.xml | 71 ++------ .../nifi-framework/nifi-client-dto/pom.xml | 34 +--- .../nifi-file-authorizer/pom.xml | 160 ++++-------------- .../nifi-framework-cluster-protocol/pom.xml | 29 +--- .../nifi-framework-cluster/pom.xml | 24 +-- .../nifi-framework-core-api/pom.xml | 24 +-- .../nifi-framework-core/pom.xml | 28 +-- .../nifi-web/nifi-web-api/pom.xml | 28 +-- .../nifi-web/nifi-web-security/pom.xml | 65 +------ .../nifi-grpc-processors/pom.xml | 21 +-- .../nifi-hdfs-processors/pom.xml | 29 +--- .../nifi-kafka-1-0-processors/pom.xml | 20 --- .../kafka/pubsub/ConsumerLease.java | 4 +- .../kafka/pubsub/PublishKafka_1_0.java | 9 +- .../nifi-kafka-2-0-processors/pom.xml | 18 -- .../kafka/pubsub/ConsumerLease.java | 4 +- .../kafka/pubsub/PublishKafka_2_0.java | 9 +- .../nifi-kafka-2-6-processors/pom.xml | 18 -- .../kafka/pubsub/ConsumerLease.java | 4 +- .../kafka/pubsub/PublishKafka_2_6.java | 9 +- .../nifi-yandex-processors/pom.xml | 29 +--- .../nifi-jolt-transform-json-ui/pom.xml | 37 ++-- .../nifi-standard-processors/pom.xml | 49 +----- .../nifi-hbase_1_1_2-client-service/pom.xml | 47 +---- .../nifi-hbase_2-client-service/pom.xml | 47 +---- .../src/test/assembly/dependencies.xml | 14 -- .../nifi-update-attribute-model/pom.xml | 28 +-- .../nifi-update-attribute-ui/pom.xml | 28 +-- nifi-registry/nifi-registry-assembly/pom.xml | 10 -- .../src/main/assembly/dependencies.xml | 21 --- .../registry/bootstrap/RunNiFiRegistry.java | 27 --- .../nifi-registry-bundle-utils/pom.xml | 26 +-- .../nifi-registry-data-model/pom.xml | 20 +-- .../nifi-registry-framework/pom.xml | 28 +-- .../nifi-registry-web-api/pom.xml | 64 +------ nifi-registry/pom.xml | 45 ----- .../nifi-stateless-assembly/pom.xml | 18 -- .../src/main/assembly/common.xml | 18 -- .../src/main/assembly/dependencies.xml | 9 +- .../bootstrap/StatelessBootstrap.java | 9 - .../StandardStatelessDataflowFactory.java | 65 +------ .../nifi-stateless-system-test-suite/pom.xml | 18 -- .../src/test/assembly/dependencies.xml | 21 --- .../nifi-system-test-suite/pom.xml | 18 -- .../src/test/assembly/dependencies.xml | 24 --- nifi-toolkit/nifi-toolkit-admin/pom.xml | 29 +--- nifi-toolkit/nifi-toolkit-api/pom.xml | 20 +-- nifi-toolkit/nifi-toolkit-assembly/pom.xml | 18 -- .../src/main/assembly/dependencies.xml | 31 ---- .../src/main/resources/bin/cli.bat | 19 +-- .../src/main/resources/bin/cli.sh | 28 --- nifi-toolkit/pom.xml | 50 ------ pom.xml | 105 ++++-------- 76 files changed, 300 insertions(+), 1785 deletions(-) diff --git a/minifi/minifi-assembly/pom.xml b/minifi/minifi-assembly/pom.xml index 57f3cf6a42..a886557446 100644 --- a/minifi/minifi-assembly/pom.xml +++ b/minifi/minifi-assembly/pom.xml @@ -262,24 +262,6 @@ limitations under the License. com.fasterxml.jackson.core jackson-databind - - - - - jakarta.xml.bind - jakarta.xml.bind-api - ${jakarta.xml.bind-api.version} - - - org.glassfish.jaxb - jaxb-runtime - ${jaxb.runtime.version} - - - javax.annotation - javax.annotation-api - ${javax.annotation-api.version} - diff --git a/minifi/minifi-assembly/src/main/assembly/dependencies-windows-service.xml b/minifi/minifi-assembly/src/main/assembly/dependencies-windows-service.xml index 754fdb49d4..b3b7de4f24 100644 --- a/minifi/minifi-assembly/src/main/assembly/dependencies-windows-service.xml +++ b/minifi/minifi-assembly/src/main/assembly/dependencies-windows-service.xml @@ -38,12 +38,6 @@ *:minifi-resources *:swagger-annotations - - - - org.glassfish.jaxb:jaxb-runtime - jakarta.xml.bind:jakarta.xml.bind-api - javax.annotation:javax.annotation-api @@ -67,24 +61,6 @@ - - - - runtime - false - lib/java11 - 0770 - 0664 - true - - org.glassfish.jaxb:jaxb-runtime - jakarta.xml.bind:jakarta.xml.bind-api - javax.annotation:javax.annotation-api - com.sun.activation:jakarta.activation - jakarta.activation:jakarta.activation-api - - - runtime diff --git a/minifi/minifi-assembly/src/main/assembly/dependencies.xml b/minifi/minifi-assembly/src/main/assembly/dependencies.xml index 342b520ab3..3b42b47d9e 100644 --- a/minifi/minifi-assembly/src/main/assembly/dependencies.xml +++ b/minifi/minifi-assembly/src/main/assembly/dependencies.xml @@ -38,12 +38,6 @@ *:minifi-resources *:swagger-annotations - - - - org.glassfish.jaxb:jaxb-runtime - jakarta.xml.bind:jakarta.xml.bind-api - javax.annotation:javax.annotation-api @@ -68,24 +62,6 @@ - - - - runtime - false - lib/java11 - 0770 - 0664 - true - - org.glassfish.jaxb:jaxb-runtime - jakarta.xml.bind:jakarta.xml.bind-api - javax.annotation:javax.annotation-api - com.sun.activation:jakarta.activation - jakarta.activation:jakarta.activation-api - - - runtime diff --git a/minifi/minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/service/MiNiFiExecCommandProvider.java b/minifi/minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/service/MiNiFiExecCommandProvider.java index a28deb9497..1dd14686b1 100644 --- a/minifi/minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/service/MiNiFiExecCommandProvider.java +++ b/minifi/minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/service/MiNiFiExecCommandProvider.java @@ -26,7 +26,6 @@ import java.util.List; import java.util.Map.Entry; import java.util.Optional; import java.util.Properties; -import org.apache.nifi.bootstrap.util.RuntimeVersionProvider; public class MiNiFiExecCommandProvider { @@ -129,7 +128,6 @@ public class MiNiFiExecCommandProvider { for (File file : libFiles) { cpFiles.add(file.getAbsolutePath()); } - cpFiles.addAll(getJava11Files(libDir)); StringBuilder classPathBuilder = new StringBuilder(); for (int i = 0; i < cpFiles.size(); i++) { @@ -143,25 +141,6 @@ public class MiNiFiExecCommandProvider { return classPathBuilder.toString(); } - private List getJava11Files(File libDir) { - List java11Files = new ArrayList(); - final int javaMajorVersion = RuntimeVersionProvider.getMajorVersion(); - if (javaMajorVersion >= 11) { - /* If running on Java 11 or greater, add the JAXB/activation/annotation libs to the classpath. - * - * TODO: Once the minimum Java version requirement of NiFi is 11, this processing should be removed. - * JAXB/activation/annotation will be added as an actual dependency via pom.xml. - */ - File libJava11Dir = getFile("java11", libDir); - if (libJava11Dir.exists()) { - for (File file : libJava11Dir.listFiles((dir, filename) -> filename.toLowerCase().endsWith(".jar"))) { - java11Files.add(file.getAbsolutePath()); - } - } - } - return java11Files; - } - private List getJavaAdditionalArgs(Properties props) { List javaAdditionalArgs = new ArrayList<>(); for (Entry entry : props.entrySet()) { diff --git a/minifi/minifi-c2/minifi-c2-assembly/pom.xml b/minifi/minifi-c2/minifi-c2-assembly/pom.xml index 859ea6481c..0fcd576976 100644 --- a/minifi/minifi-c2/minifi-c2-assembly/pom.xml +++ b/minifi/minifi-c2/minifi-c2-assembly/pom.xml @@ -185,24 +185,6 @@ limitations under the License. ${project.version} war - - - - - jakarta.xml.bind - jakarta.xml.bind-api - ${jakarta.xml.bind-api.version} - - - org.glassfish.jaxb - jaxb-runtime - ${jaxb.runtime.version} - - - javax.annotation - javax.annotation-api - ${javax.annotation-api.version} - diff --git a/minifi/minifi-c2/minifi-c2-assembly/src/main/assembly/dependencies.xml b/minifi/minifi-c2/minifi-c2-assembly/src/main/assembly/dependencies.xml index bbfcf4c180..026200c66a 100644 --- a/minifi/minifi-c2/minifi-c2-assembly/src/main/assembly/dependencies.xml +++ b/minifi/minifi-c2/minifi-c2-assembly/src/main/assembly/dependencies.xml @@ -45,24 +45,6 @@ *:war - - - - - runtime - false - lib/java11 - 0770 - 0664 - true - - org.glassfish.jaxb:jaxb-runtime - jakarta.xml.bind:jakarta.xml.bind-api - javax.annotation:javax.annotation-api - com.sun.activation:jakarta.activation - jakarta.activation:jakarta.activation-api - - diff --git a/nifi-assembly/pom.xml b/nifi-assembly/pom.xml index 30d9980089..62fb34c2c8 100644 --- a/nifi-assembly/pom.xml +++ b/nifi-assembly/pom.xml @@ -960,23 +960,6 @@ language governing permissions and limitations under the License. --> 2.0.0-SNAPSHOT nar - - - - jakarta.xml.bind - jakarta.xml.bind-api - ${jakarta.xml.bind-api.version} - - - org.glassfish.jaxb - jaxb-runtime - ${jaxb.runtime.version} - - - javax.annotation - javax.annotation-api - ${javax.annotation-api.version} - org.aspectj diff --git a/nifi-assembly/src/main/assembly/common.xml b/nifi-assembly/src/main/assembly/common.xml index b193ed9afb..f7b60c8845 100644 --- a/nifi-assembly/src/main/assembly/common.xml +++ b/nifi-assembly/src/main/assembly/common.xml @@ -34,24 +34,6 @@ - - - - runtime - false - lib/java11 - 0770 - 0664 - true - - org.glassfish.jaxb:jaxb-runtime - jakarta.xml.bind:jakarta.xml.bind-api - javax.annotation:javax.annotation-api - com.sun.activation:jakarta.activation - jakarta.activation:jakarta.activation-api - - - diff --git a/nifi-assembly/src/main/assembly/dependencies.xml b/nifi-assembly/src/main/assembly/dependencies.xml index 5389854684..a4c2ee9e76 100644 --- a/nifi-assembly/src/main/assembly/dependencies.xml +++ b/nifi-assembly/src/main/assembly/dependencies.xml @@ -38,14 +38,7 @@ *:nifi-property-protection-factory *:nifi-resources *:nifi-docs - - - - org.glassfish.jaxb:jaxb-runtime - jakarta.xml.bind:jakarta.xml.bind-api - javax.annotation:javax.annotation-api - - + org.aspectj:aspectjweaver diff --git a/nifi-assembly/src/main/assembly/ranger.xml b/nifi-assembly/src/main/assembly/ranger.xml index 2c911b7723..376dcab7f7 100644 --- a/nifi-assembly/src/main/assembly/ranger.xml +++ b/nifi-assembly/src/main/assembly/ranger.xml @@ -44,12 +44,6 @@ *:nifi-resources *:nifi-docs org.apache.nifi:nifi-ranger-resources:jar - - - - org.glassfish.jaxb:jaxb-runtime - jakarta.xml.bind:jakarta.xml.bind-api - javax.annotation:javax.annotation-api diff --git a/nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/RunNiFi.java b/nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/RunNiFi.java index d2b23b388e..0fa2b56ee2 100644 --- a/nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/RunNiFi.java +++ b/nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/RunNiFi.java @@ -20,10 +20,7 @@ import org.apache.commons.lang3.StringUtils; import org.apache.nifi.bootstrap.notification.NotificationType; import org.apache.nifi.bootstrap.util.DumpFileValidator; import org.apache.nifi.bootstrap.util.OSUtils; -import org.apache.nifi.bootstrap.util.RuntimeVersionProvider; import org.apache.nifi.bootstrap.util.SecureNiFiConfigUtil; -import org.apache.nifi.deprecation.log.DeprecationLogger; -import org.apache.nifi.deprecation.log.DeprecationLoggerFactory; import org.apache.nifi.util.file.FileUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -62,7 +59,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Map.Entry; -import java.util.Objects; import java.util.Properties; import java.util.Set; import java.util.concurrent.ExecutorService; @@ -150,7 +146,6 @@ public class RunNiFi { private final Logger cmdLogger = LoggerFactory.getLogger("org.apache.nifi.bootstrap.Command"); // used for logging all info. These by default will be written to the log file private final Logger defaultLogger = LoggerFactory.getLogger(RunNiFi.class); - private final DeprecationLogger deprecationLogger = DeprecationLoggerFactory.getLogger(RunNiFi.class); private final ExecutorService loggingExecutor; private volatile Set> loggingFutures = new HashSet<>(2); @@ -1206,25 +1201,6 @@ public class RunNiFi { String runtimeJavaVersion = System.getProperty("java.version"); defaultLogger.info("Runtime Java version: {}", runtimeJavaVersion); - final int javaMajorVersion = RuntimeVersionProvider.getMajorVersion(); - if (javaMajorVersion >= 11) { - /* If running on Java 11 or greater, add the JAXB/activation/annotation libs to the classpath. - * - * TODO: Once the minimum Java version requirement of NiFi is 11, this processing should be removed. - * JAXB/activation/annotation will be added as an actual dependency via pom.xml. - */ - final String libJava11Filename = replaceNull(props.get("lib.dir"), "./lib").trim() + "/java11"; - File libJava11Dir = getFile(libJava11Filename, workingDir); - if (libJava11Dir.exists()) { - for (final File file : Objects.requireNonNull(libJava11Dir.listFiles((dir, filename) -> filename.toLowerCase().endsWith(".jar")))) { - cpFiles.add(file.getAbsolutePath()); - } - } - } - - if (RuntimeVersionProvider.isMajorVersionDeprecated(javaMajorVersion)) { - deprecationLogger.warn("Support for Java {} is deprecated. Java {} is the minimum recommended version", javaMajorVersion, RuntimeVersionProvider.getMinimumMajorVersion()); - } final StringBuilder classPathBuilder = new StringBuilder(); for (int i = 0; i < cpFiles.size(); i++) { @@ -1281,10 +1257,6 @@ public class RunNiFi { cmd.add("-Dnifi.bootstrap.listen.port=" + listenPort); cmd.add("-Dapp=NiFi"); cmd.add("-Dorg.apache.nifi.bootstrap.config.log.dir=" + nifiLogDir); - if (javaMajorVersion == 9 || javaMajorVersion == 10) { - // running on Java 9 or 10, internal module java.xml.bind module must be made available - cmd.add("--add-modules=java.xml.bind"); - } cmd.add("org.apache.nifi.NiFi"); if (isSensitiveKeyPresent(props)) { Path sensitiveKeyFile = createSensitiveKeyFile(confDir); diff --git a/nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/RunStatelessNiFi.java b/nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/RunStatelessNiFi.java index 2cab456407..36e9fd4b93 100644 --- a/nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/RunStatelessNiFi.java +++ b/nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/RunStatelessNiFi.java @@ -45,21 +45,6 @@ public class RunStatelessNiFi { throw new RuntimeException("Could not find lib directory at " + libDir.getAbsolutePath()); } - String runtimeJavaVersion = System.getProperty("java.version"); - if (Integer.parseInt(runtimeJavaVersion.substring(0, runtimeJavaVersion.indexOf('.'))) >= 11) { - /* If running on Java 11 or greater, add the JAXB/activation/annotation libs to the classpath. - * - * TODO: Once the minimum Java version requirement of NiFi is 11, this processing should be removed. - * JAXB/activation/annotation will be added as an actual dependency via pom.xml. - */ - final File libJava11Dir = new File(nifi_home + "/lib/java11"); - if (libJava11Dir.exists()) { - for (final File file : Objects.requireNonNull(libJava11Dir.listFiles((dir, filename) -> filename.toLowerCase().endsWith(".jar")))) { - cpURLs.add(file.toURI().toURL()); - } - } - } - final URLClassLoader rootClassLoader = new URLClassLoader(cpURLs.toArray(new URL[0])); Thread.currentThread().setContextClassLoader(rootClassLoader); diff --git a/nifi-commons/nifi-site-to-site-client/pom.xml b/nifi-commons/nifi-site-to-site-client/pom.xml index 278d2d7ffd..4b70a883d2 100644 --- a/nifi-commons/nifi-site-to-site-client/pom.xml +++ b/nifi-commons/nifi-site-to-site-client/pom.xml @@ -131,30 +131,13 @@ validation-api 2.0.1.Final + + jakarta.xml.bind + jakarta.xml.bind-api + + + org.glassfish.jaxb + jaxb-runtime + - - - - jigsaw - - (1.8,) - - - org.apache.httpcomponents.client5 - httpclient5 - 5.0-beta4 - - - - jakarta.xml.bind - jakarta.xml.bind-api - - - org.glassfish.jaxb - jaxb-runtime - - - - diff --git a/nifi-commons/nifi-utils/pom.xml b/nifi-commons/nifi-utils/pom.xml index bf72477be7..963cfb3463 100644 --- a/nifi-commons/nifi-utils/pom.xml +++ b/nifi-commons/nifi-utils/pom.xml @@ -39,25 +39,9 @@ nifi-api 2.0.0-SNAPSHOT + + jakarta.xml.bind + jakarta.xml.bind-api + - - - - jigsaw - - (1.8,) - - - - jakarta.xml.bind - jakarta.xml.bind-api - - - org.glassfish.jaxb - jaxb-runtime - - - - diff --git a/nifi-external/nifi-kafka-connect/nifi-kafka-connector-assembly/pom.xml b/nifi-external/nifi-kafka-connect/nifi-kafka-connector-assembly/pom.xml index 35f8a6b042..331ab92435 100644 --- a/nifi-external/nifi-kafka-connect/nifi-kafka-connector-assembly/pom.xml +++ b/nifi-external/nifi-kafka-connect/nifi-kafka-connector-assembly/pom.xml @@ -117,27 +117,8 @@ 2.0.0-SNAPSHOT nar - - - - - jakarta.xml.bind - jakarta.xml.bind-api - ${jakarta.xml.bind-api.version} - - - org.glassfish.jaxb - jaxb-runtime - ${jaxb.runtime.version} - - - javax.annotation - javax.annotation-api - 1.3.2 - - diff --git a/nifi-external/nifi-kafka-connect/nifi-kafka-connector-assembly/src/main/assembly/dependencies.xml b/nifi-external/nifi-kafka-connect/nifi-kafka-connector-assembly/src/main/assembly/dependencies.xml index 62e0696ef0..61ea42fb95 100644 --- a/nifi-external/nifi-kafka-connect/nifi-kafka-connector-assembly/src/main/assembly/dependencies.xml +++ b/nifi-external/nifi-kafka-connect/nifi-kafka-connector-assembly/src/main/assembly/dependencies.xml @@ -27,29 +27,6 @@ 0770 0664 true - - - - org.glassfish.jaxb:jaxb-runtime - jakarta.xml.bind:jakarta.xml.bind-api - javax.annotation:javax.annotation-api - - - - - - - runtime - false - ./java11 - 0770 - 0664 - true - - org.glassfish.jaxb:jaxb-runtime - jakarta.xml.bind:jakarta.xml.bind-api - javax.annotation:javax.annotation-api - diff --git a/nifi-external/nifi-kafka-connect/nifi-kafka-connector-tests/src/main/assembly/dependencies.xml b/nifi-external/nifi-kafka-connect/nifi-kafka-connector-tests/src/main/assembly/dependencies.xml index a57753ff1e..25f9683db2 100644 --- a/nifi-external/nifi-kafka-connect/nifi-kafka-connector-tests/src/main/assembly/dependencies.xml +++ b/nifi-external/nifi-kafka-connect/nifi-kafka-connector-tests/src/main/assembly/dependencies.xml @@ -27,29 +27,6 @@ 0770 0664 true - - - - org.glassfish.jaxb:jaxb-runtime - jakarta.xml.bind:jakarta.xml.bind-api - javax.annotation:javax.annotation-api - - - - - - - runtime - false - ./java11 - 0770 - 0664 - true - - org.glassfish.jaxb:jaxb-runtime - jakarta.xml.bind:jakarta.xml.bind-api - javax.annotation:javax.annotation-api - diff --git a/nifi-external/nifi-kafka-connect/nifi-kafka-connector/pom.xml b/nifi-external/nifi-kafka-connect/nifi-kafka-connector/pom.xml index 28ce1b9133..99bc9f02d7 100644 --- a/nifi-external/nifi-kafka-connect/nifi-kafka-connector/pom.xml +++ b/nifi-external/nifi-kafka-connect/nifi-kafka-connector/pom.xml @@ -105,23 +105,5 @@ 2.0.0-SNAPSHOT nar - - - - - jakarta.xml.bind - jakarta.xml.bind-api - ${jakarta.xml.bind-api.version} - - - org.glassfish.jaxb - jaxb-runtime - ${jaxb.runtime.version} - - - javax.annotation - javax.annotation-api - 1.3.2 - \ No newline at end of file diff --git a/nifi-manifest/nifi-extension-manifest-model/pom.xml b/nifi-manifest/nifi-extension-manifest-model/pom.xml index 408ed43bdb..706d9ab686 100644 --- a/nifi-manifest/nifi-extension-manifest-model/pom.xml +++ b/nifi-manifest/nifi-extension-manifest-model/pom.xml @@ -33,21 +33,9 @@ validation-api 2.0.1.Final + + jakarta.xml.bind + jakarta.xml.bind-api + - - - - - jigsaw - - (1.8,) - - - - jakarta.xml.bind - jakarta.xml.bind-api - - - - diff --git a/nifi-manifest/nifi-extension-manifest-parser/pom.xml b/nifi-manifest/nifi-extension-manifest-parser/pom.xml index cced82ad62..1a4d922bf3 100644 --- a/nifi-manifest/nifi-extension-manifest-parser/pom.xml +++ b/nifi-manifest/nifi-extension-manifest-parser/pom.xml @@ -29,22 +29,13 @@ nifi-extension-manifest-model 2.0.0-SNAPSHOT + + jakarta.xml.bind + jakarta.xml.bind-api + + + org.glassfish.jaxb + jaxb-runtime + - - - - - jigsaw - - (1.8,) - - - - org.glassfish.jaxb - jaxb-runtime - test - - - - diff --git a/nifi-nar-bundles/nifi-extension-utils/nifi-database-utils/pom.xml b/nifi-nar-bundles/nifi-extension-utils/nifi-database-utils/pom.xml index c824b3ad73..10657b9fa5 100644 --- a/nifi-nar-bundles/nifi-extension-utils/nifi-database-utils/pom.xml +++ b/nifi-nar-bundles/nifi-extension-utils/nifi-database-utils/pom.xml @@ -54,6 +54,10 @@ org.apache.commons commons-lang3 + + commons-codec + commons-codec + org.apache.avro avro @@ -106,24 +110,4 @@ - - - - jigsaw - - (1.8,) - - - - jakarta.xml.bind - jakarta.xml.bind-api - - - org.glassfish.jaxb - jaxb-runtime - - - - diff --git a/nifi-nar-bundles/nifi-extension-utils/nifi-database-utils/src/main/java/org/apache/nifi/util/db/JdbcCommon.java b/nifi-nar-bundles/nifi-extension-utils/nifi-database-utils/src/main/java/org/apache/nifi/util/db/JdbcCommon.java index ad7471a54c..9914efcaf2 100644 --- a/nifi-nar-bundles/nifi-extension-utils/nifi-database-utils/src/main/java/org/apache/nifi/util/db/JdbcCommon.java +++ b/nifi-nar-bundles/nifi-extension-utils/nifi-database-utils/src/main/java/org/apache/nifi/util/db/JdbcCommon.java @@ -30,12 +30,13 @@ import org.apache.avro.generic.GenericData; import org.apache.avro.generic.GenericDatumWriter; import org.apache.avro.generic.GenericRecord; import org.apache.avro.io.DatumWriter; +import org.apache.commons.codec.DecoderException; +import org.apache.commons.codec.binary.Hex; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.exception.ExceptionUtils; import org.apache.nifi.avro.AvroTypeUtil; import org.apache.nifi.serialization.record.util.DataTypeUtils; -import javax.xml.bind.DatatypeConverter; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; @@ -66,6 +67,7 @@ import java.time.LocalDateTime; import java.time.LocalTime; import java.time.ZoneId; import java.time.format.DateTimeFormatter; +import java.util.Base64; import java.util.Date; import java.util.Map; import java.util.function.Function; @@ -833,10 +835,14 @@ public class JdbcCommon { bValue = parameterValue.getBytes("ASCII"); break; case "hex": - bValue = DatatypeConverter.parseHexBinary(parameterValue); + try { + bValue = Hex.decodeHex(parameterValue); + } catch (final DecoderException e) { + throw new RuntimeException("Hexadecimal decoding failed", e); + } break; case "base64": - bValue = DatatypeConverter.parseBase64Binary(parameterValue); + bValue = Base64.getDecoder().decode(parameterValue); break; default: throw new ParseException("Unable to parse binary data using the formatter `" + valueFormat + "`.",0); diff --git a/nifi-nar-bundles/nifi-extension-utils/nifi-prometheus-utils/pom.xml b/nifi-nar-bundles/nifi-extension-utils/nifi-prometheus-utils/pom.xml index 074cd50414..5044e01419 100644 --- a/nifi-nar-bundles/nifi-extension-utils/nifi-prometheus-utils/pom.xml +++ b/nifi-nar-bundles/nifi-extension-utils/nifi-prometheus-utils/pom.xml @@ -72,24 +72,4 @@ ${prometheus.version} - - - - jigsaw - - (1.8,) - - - - jakarta.xml.bind - jakarta.xml.bind-api - - - org.glassfish.jaxb - jaxb-runtime - - - - diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-authorizer/pom.xml b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-authorizer/pom.xml index 0d780a7ced..31a6862902 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-authorizer/pom.xml +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-authorizer/pom.xml @@ -34,16 +34,17 @@ - org.codehaus.mojo - jaxb2-maven-plugin + org.jvnet.jaxb2.maven2 + maven-jaxb2-plugin current - xjc + generate - org.apache.nifi.authorization.generated + org.apache.nifi.authorization.generated + src/main/xsd @@ -57,60 +58,6 @@ - - - - - jigsaw - - (1.8,) - - - - - org.codehaus.mojo - jaxb2-maven-plugin - - - current - - true - - - - - - org.jvnet.jaxb2.maven2 - maven-jaxb2-plugin - - - current - - generate - - - org.apache.nifi.authorization.generated - src/main/xsd - - - - - - - - - jakarta.xml.bind - jakarta.xml.bind-api - - - org.glassfish.jaxb - jaxb-runtime - - - - - org.apache.nifi @@ -156,6 +103,14 @@ org.apache.nifi nifi-property-protection-loader + + jakarta.xml.bind + jakarta.xml.bind-api + + + org.glassfish.jaxb + jaxb-runtime + diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/pom.xml b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/pom.xml index fecee191fe..17924c6089 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/pom.xml +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/pom.xml @@ -26,35 +26,19 @@ io.swagger swagger-annotations - - org.apache.nifi - nifi-api - 2.0.0-SNAPSHOT - + + org.apache.nifi + nifi-api + 2.0.0-SNAPSHOT + org.apache.nifi c2-protocol-component-api 2.0.0-SNAPSHOT + + jakarta.xml.bind + jakarta.xml.bind-api + - - - - jigsaw - - (1.8,) - - - - jakarta.xml.bind - jakarta.xml.bind-api - - - org.glassfish.jaxb - jaxb-runtime - - - - diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-file-authorizer/pom.xml b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-file-authorizer/pom.xml index a09052b14c..bfe1947261 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-file-authorizer/pom.xml +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-file-authorizer/pom.xml @@ -32,161 +32,59 @@ - org.codehaus.mojo - jaxb2-maven-plugin + org.jvnet.jaxb2.maven2 + maven-jaxb2-plugin authorizations - xjc + generate - - src/main/xsd/authorizations.xsd - - org.apache.nifi.authorization.file.generated + org.apache.nifi.authorization.file.generated + src/main/xsd + + authorizations.xsd + tenants - xjc + generate - - src/main/xsd/tenants.xsd - - org.apache.nifi.authorization.file.tenants.generated - false + org.apache.nifi.authorization.file.tenants.generated + src/main/xsd + + tenants.xsd + + false + true users - xjc + generate - - src/main/xsd/legacy-users.xsd - - org.apache.nifi.user.generated - false + org.apache.nifi.user.generated + src/main/xsd + + legacy-users.xsd + + false + true - ${project.build.directory}/generated-sources/jaxb - - - - org.apache.maven.plugins - maven-checkstyle-plugin - - **/authorization/file/generated/*.java,**/authorization/file/tenants/generated/*.java,**/user/generated/*.java + ${project.build.directory}/generated-sources/jaxb - - - - jigsaw - - (1.8,) - - - - - org.codehaus.mojo - jaxb2-maven-plugin - - - authorizations - - true - - - - tenants - - true - - - - users - - true - - - - - - org.jvnet.jaxb2.maven2 - maven-jaxb2-plugin - - - authorizations - - generate - - - org.apache.nifi.authorization.file.generated - src/main/xsd - - authorizations.xsd - - - - - tenants - - generate - - - org.apache.nifi.authorization.file.tenants.generated - src/main/xsd - - tenants.xsd - - false - true - - - - users - - generate - - - org.apache.nifi.user.generated - src/main/xsd - - legacy-users.xsd - - false - true - - - - - ${project.build.directory}/generated-sources/jaxb - - - - - - - jakarta.xml.bind - jakarta.xml.bind-api - - - org.glassfish.jaxb - jaxb-runtime - - - - org.apache.nifi @@ -225,6 +123,14 @@ org.apache.nifi nifi-framework-core + + jakarta.xml.bind + jakarta.xml.bind-api + + + org.glassfish.jaxb + jaxb-runtime + commons-codec commons-codec diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster-protocol/pom.xml b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster-protocol/pom.xml index 4955358401..550bd3b8b4 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster-protocol/pom.xml +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster-protocol/pom.xml @@ -57,6 +57,15 @@ nifi-xml-processing 2.0.0-SNAPSHOT + + jakarta.xml.bind + jakarta.xml.bind-api + + + org.glassfish.jaxb + jaxb-runtime + test + @@ -76,24 +85,4 @@ jackson-module-jaxb-annotations - - - - jigsaw - - (1.8,) - - - - jakarta.xml.bind - jakarta.xml.bind-api - - - org.glassfish.jaxb - jaxb-runtime - - - - diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/pom.xml b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/pom.xml index ef1f4117f0..ff344fbfc9 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/pom.xml +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/pom.xml @@ -122,6 +122,10 @@ com.fasterxml.jackson.module jackson-module-jaxb-annotations + + jakarta.xml.bind + jakarta.xml.bind-api + com.squareup.okhttp3 okhttp @@ -179,24 +183,4 @@ - - - - jigsaw - - (1.8,) - - - - jakarta.xml.bind - jakarta.xml.bind-api - - - org.glassfish.jaxb - jaxb-runtime - - - - diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/pom.xml b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/pom.xml index 7810366c0b..c90bbfc687 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/pom.xml +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/pom.xml @@ -65,25 +65,9 @@ language governing permissions and limitations under the License. --> org.apache.nifi nifi-framework-authorization + + jakarta.xml.bind + jakarta.xml.bind-api + - - - - jigsaw - - (1.8,) - - - - jakarta.xml.bind - jakarta.xml.bind-api - - - org.glassfish.jaxb - jaxb-runtime - - - - diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/pom.xml b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/pom.xml index 302944fb01..6495e49b87 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/pom.xml +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/pom.xml @@ -214,6 +214,14 @@ com.fasterxml.jackson.core jackson-core + + jakarta.xml.bind + jakarta.xml.bind-api + + + org.glassfish.jaxb + jaxb-runtime + org.apache.curator curator-test @@ -293,24 +301,4 @@ - - - - jigsaw - - (1.8,) - - - - jakarta.xml.bind - jakarta.xml.bind-api - - - org.glassfish.jaxb - jaxb-runtime - - - - diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/pom.xml b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/pom.xml index da3dbf311a..95100028eb 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/pom.xml +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/pom.xml @@ -126,27 +126,15 @@ - - - - jigsaw - - (1.8,) - - - - jakarta.xml.bind - jakarta.xml.bind-api - - - org.glassfish.jaxb - jaxb-runtime - - - - + + jakarta.xml.bind + jakarta.xml.bind-api + + + org.glassfish.jaxb + jaxb-runtime + - jigsaw - - (1.8,) - - - - - org.codehaus.mojo - jaxb2-maven-plugin - - - current - - true - - - - - - org.jvnet.jaxb2.maven2 - maven-jaxb2-plugin - - - current - - generate - - - org.apache.nifi.authentication.generated - src/main/xsd - - - - - - - - - jakarta.xml.bind - jakarta.xml.bind-api - - - org.glassfish.jaxb - jaxb-runtime - - - - org.apache.nifi @@ -200,6 +149,10 @@ org.springframework spring-context-support + + jakarta.xml.bind + jakarta.xml.bind-api + javax.servlet javax.servlet-api diff --git a/nifi-nar-bundles/nifi-grpc-bundle/nifi-grpc-processors/pom.xml b/nifi-nar-bundles/nifi-grpc-bundle/nifi-grpc-processors/pom.xml index f84b2a8d59..2d428e1035 100644 --- a/nifi-nar-bundles/nifi-grpc-bundle/nifi-grpc-processors/pom.xml +++ b/nifi-nar-bundles/nifi-grpc-bundle/nifi-grpc-processors/pom.xml @@ -63,6 +63,10 @@ language governing permissions and limitations under the License. --> grpc-stub ${grpc.version} + + javax.annotation + javax.annotation-api + org.apache.nifi nifi-mock @@ -139,21 +143,4 @@ language governing permissions and limitations under the License. --> - - - - - jigsaw - - (1.8,) - - - - javax.annotation - javax.annotation-api - - - - diff --git a/nifi-nar-bundles/nifi-hadoop-bundle/nifi-hdfs-processors/pom.xml b/nifi-nar-bundles/nifi-hadoop-bundle/nifi-hdfs-processors/pom.xml index c6b38a2c84..fb428430ab 100644 --- a/nifi-nar-bundles/nifi-hadoop-bundle/nifi-hdfs-processors/pom.xml +++ b/nifi-nar-bundles/nifi-hadoop-bundle/nifi-hdfs-processors/pom.xml @@ -153,6 +153,14 @@ 2.0.0-SNAPSHOT compile + + jakarta.xml.bind + jakarta.xml.bind-api + + + org.glassfish.jaxb + jaxb-runtime + @@ -175,25 +183,4 @@ - - - - - jigsaw - - (1.8,) - - - - jakarta.xml.bind - jakarta.xml.bind-api - - - org.glassfish.jaxb - jaxb-runtime - - - - diff --git a/nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-1-0-processors/pom.xml b/nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-1-0-processors/pom.xml index 5e6c8a3132..2b9514f1fe 100644 --- a/nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-1-0-processors/pom.xml +++ b/nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-1-0-processors/pom.xml @@ -128,24 +128,4 @@ compile - - - - jigsaw - - (1.8,) - - - - jakarta.xml.bind - jakarta.xml.bind-api - - - org.glassfish.jaxb - jaxb-runtime - - - - diff --git a/nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-1-0-processors/src/main/java/org/apache/nifi/processors/kafka/pubsub/ConsumerLease.java b/nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-1-0-processors/src/main/java/org/apache/nifi/processors/kafka/pubsub/ConsumerLease.java index 6279b6ea49..8e1d25cb7c 100644 --- a/nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-1-0-processors/src/main/java/org/apache/nifi/processors/kafka/pubsub/ConsumerLease.java +++ b/nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-1-0-processors/src/main/java/org/apache/nifi/processors/kafka/pubsub/ConsumerLease.java @@ -16,6 +16,7 @@ */ package org.apache.nifi.processors.kafka.pubsub; +import org.apache.commons.codec.binary.Hex; import org.apache.kafka.clients.consumer.Consumer; import org.apache.kafka.clients.consumer.ConsumerRebalanceListener; import org.apache.kafka.clients.consumer.ConsumerRecord; @@ -43,7 +44,6 @@ import org.apache.nifi.serialization.WriteResult; import org.apache.nifi.serialization.record.Record; import org.apache.nifi.serialization.record.RecordSchema; -import javax.xml.bind.DatatypeConverter; import java.io.ByteArrayInputStream; import java.io.Closeable; import java.io.IOException; @@ -347,7 +347,7 @@ public abstract class ConsumerLease implements Closeable, ConsumerRebalanceListe } if (KeyEncoding.HEX.getValue().equals(encoding)) { - return DatatypeConverter.printHexBinary(key); + return Hex.encodeHexString(key); } else if (KeyEncoding.UTF8.getValue().equals(encoding)) { return new String(key, StandardCharsets.UTF_8); } else { diff --git a/nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-1-0-processors/src/main/java/org/apache/nifi/processors/kafka/pubsub/PublishKafka_1_0.java b/nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-1-0-processors/src/main/java/org/apache/nifi/processors/kafka/pubsub/PublishKafka_1_0.java index 6de516be7d..50a7e3f4f1 100644 --- a/nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-1-0-processors/src/main/java/org/apache/nifi/processors/kafka/pubsub/PublishKafka_1_0.java +++ b/nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-1-0-processors/src/main/java/org/apache/nifi/processors/kafka/pubsub/PublishKafka_1_0.java @@ -17,6 +17,8 @@ package org.apache.nifi.processors.kafka.pubsub; +import org.apache.commons.codec.DecoderException; +import org.apache.commons.codec.binary.Hex; import org.apache.kafka.clients.producer.ProducerConfig; import org.apache.kafka.common.serialization.ByteArraySerializer; import org.apache.nifi.annotation.behavior.DynamicProperty; @@ -49,7 +51,6 @@ import org.apache.nifi.processor.exception.ProcessException; import org.apache.nifi.processor.util.FlowFileFilters; import org.apache.nifi.processor.util.StandardValidators; -import javax.xml.bind.DatatypeConverter; import java.io.BufferedInputStream; import java.io.InputStream; import java.nio.charset.Charset; @@ -498,7 +499,11 @@ public class PublishKafka_1_0 extends AbstractProcessor implements KafkaPublishC return uninterpretedKey.getBytes(StandardCharsets.UTF_8); } - return DatatypeConverter.parseHexBinary(uninterpretedKey); + try { + return Hex.decodeHex(uninterpretedKey); + } catch (final DecoderException e) { + throw new RuntimeException("Hexadecimal decoding failed", e); + } } private Integer getPartition(final ProcessContext context, final FlowFile flowFile) { diff --git a/nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-2-0-processors/pom.xml b/nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-2-0-processors/pom.xml index 7f0bb6be21..8f09119ffd 100644 --- a/nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-2-0-processors/pom.xml +++ b/nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-2-0-processors/pom.xml @@ -117,24 +117,6 @@ - - - jigsaw - - (1.8,) - - - - jakarta.xml.bind - jakarta.xml.bind-api - - - org.glassfish.jaxb - jaxb-runtime - - - include-kafka-aws diff --git a/nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-2-0-processors/src/main/java/org/apache/nifi/processors/kafka/pubsub/ConsumerLease.java b/nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-2-0-processors/src/main/java/org/apache/nifi/processors/kafka/pubsub/ConsumerLease.java index e7f6459990..85c1e694d9 100644 --- a/nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-2-0-processors/src/main/java/org/apache/nifi/processors/kafka/pubsub/ConsumerLease.java +++ b/nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-2-0-processors/src/main/java/org/apache/nifi/processors/kafka/pubsub/ConsumerLease.java @@ -16,6 +16,7 @@ */ package org.apache.nifi.processors.kafka.pubsub; +import org.apache.commons.codec.binary.Hex; import org.apache.kafka.clients.consumer.Consumer; import org.apache.kafka.clients.consumer.ConsumerRebalanceListener; import org.apache.kafka.clients.consumer.ConsumerRecord; @@ -43,7 +44,6 @@ import org.apache.nifi.serialization.WriteResult; import org.apache.nifi.serialization.record.Record; import org.apache.nifi.serialization.record.RecordSchema; -import javax.xml.bind.DatatypeConverter; import java.io.ByteArrayInputStream; import java.io.Closeable; import java.io.IOException; @@ -359,7 +359,7 @@ public abstract class ConsumerLease implements Closeable, ConsumerRebalanceListe } if (KeyEncoding.HEX.getValue().equals(encoding)) { - return DatatypeConverter.printHexBinary(key); + return Hex.encodeHexString(key); } else if (KeyEncoding.UTF8.getValue().equals(encoding)) { return new String(key, StandardCharsets.UTF_8); } else { diff --git a/nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-2-0-processors/src/main/java/org/apache/nifi/processors/kafka/pubsub/PublishKafka_2_0.java b/nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-2-0-processors/src/main/java/org/apache/nifi/processors/kafka/pubsub/PublishKafka_2_0.java index 2c6bfe8b45..1a1dd95a32 100644 --- a/nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-2-0-processors/src/main/java/org/apache/nifi/processors/kafka/pubsub/PublishKafka_2_0.java +++ b/nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-2-0-processors/src/main/java/org/apache/nifi/processors/kafka/pubsub/PublishKafka_2_0.java @@ -17,6 +17,8 @@ package org.apache.nifi.processors.kafka.pubsub; +import org.apache.commons.codec.DecoderException; +import org.apache.commons.codec.binary.Hex; import org.apache.kafka.clients.producer.ProducerConfig; import org.apache.kafka.common.errors.AuthorizationException; import org.apache.kafka.common.errors.OutOfOrderSequenceException; @@ -53,7 +55,6 @@ import org.apache.nifi.processor.exception.ProcessException; import org.apache.nifi.processor.util.FlowFileFilters; import org.apache.nifi.processor.util.StandardValidators; -import javax.xml.bind.DatatypeConverter; import java.io.BufferedInputStream; import java.io.InputStream; import java.nio.charset.Charset; @@ -527,7 +528,11 @@ public class PublishKafka_2_0 extends AbstractProcessor implements KafkaPublishC return uninterpretedKey.getBytes(StandardCharsets.UTF_8); } - return DatatypeConverter.parseHexBinary(uninterpretedKey); + try { + return Hex.decodeHex(uninterpretedKey); + } catch (final DecoderException e) { + throw new RuntimeException("Hexadecimal decoding failed", e); + } } private Integer getPartition(final ProcessContext context, final FlowFile flowFile) { diff --git a/nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-2-6-processors/pom.xml b/nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-2-6-processors/pom.xml index 1b46c1677b..341c2e8588 100644 --- a/nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-2-6-processors/pom.xml +++ b/nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-2-6-processors/pom.xml @@ -129,24 +129,6 @@ - - - jigsaw - - (1.8,) - - - - jakarta.xml.bind - jakarta.xml.bind-api - - - org.glassfish.jaxb - jaxb-runtime - - - include-kafka-aws diff --git a/nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-2-6-processors/src/main/java/org/apache/nifi/processors/kafka/pubsub/ConsumerLease.java b/nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-2-6-processors/src/main/java/org/apache/nifi/processors/kafka/pubsub/ConsumerLease.java index 7c21cff0bb..644ca07048 100644 --- a/nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-2-6-processors/src/main/java/org/apache/nifi/processors/kafka/pubsub/ConsumerLease.java +++ b/nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-2-6-processors/src/main/java/org/apache/nifi/processors/kafka/pubsub/ConsumerLease.java @@ -16,6 +16,7 @@ */ package org.apache.nifi.processors.kafka.pubsub; +import org.apache.commons.codec.binary.Hex; import org.apache.commons.lang3.ArrayUtils; import org.apache.kafka.clients.consumer.Consumer; import org.apache.kafka.clients.consumer.ConsumerRebalanceListener; @@ -52,7 +53,6 @@ import org.apache.nifi.serialization.record.RecordFieldType; import org.apache.nifi.serialization.record.RecordSchema; import org.apache.nifi.util.Tuple; -import javax.xml.bind.DatatypeConverter; import java.io.ByteArrayInputStream; import java.io.Closeable; import java.io.IOException; @@ -422,7 +422,7 @@ public abstract class ConsumerLease implements Closeable, ConsumerRebalanceListe } if (KeyEncoding.HEX.getValue().equals(encoding)) { - return DatatypeConverter.printHexBinary(key); + return Hex.encodeHexString(key); } else if (KeyEncoding.UTF8.getValue().equals(encoding)) { return new String(key, StandardCharsets.UTF_8); } else { diff --git a/nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-2-6-processors/src/main/java/org/apache/nifi/processors/kafka/pubsub/PublishKafka_2_6.java b/nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-2-6-processors/src/main/java/org/apache/nifi/processors/kafka/pubsub/PublishKafka_2_6.java index 2a08b1efb5..fb7e92c725 100644 --- a/nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-2-6-processors/src/main/java/org/apache/nifi/processors/kafka/pubsub/PublishKafka_2_6.java +++ b/nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-2-6-processors/src/main/java/org/apache/nifi/processors/kafka/pubsub/PublishKafka_2_6.java @@ -17,6 +17,8 @@ package org.apache.nifi.processors.kafka.pubsub; +import org.apache.commons.codec.DecoderException; +import org.apache.commons.codec.binary.Hex; import org.apache.kafka.clients.producer.ProducerConfig; import org.apache.kafka.common.errors.AuthorizationException; import org.apache.kafka.common.errors.OutOfOrderSequenceException; @@ -54,7 +56,6 @@ import org.apache.nifi.processor.VerifiableProcessor; import org.apache.nifi.processor.exception.ProcessException; import org.apache.nifi.processor.util.StandardValidators; -import javax.xml.bind.DatatypeConverter; import java.io.BufferedInputStream; import java.io.InputStream; import java.nio.charset.Charset; @@ -541,7 +542,11 @@ public class PublishKafka_2_6 extends AbstractProcessor implements KafkaPublishC return uninterpretedKey.getBytes(StandardCharsets.UTF_8); } - return DatatypeConverter.parseHexBinary(uninterpretedKey); + try { + return Hex.decodeHex(uninterpretedKey); + } catch (final DecoderException e) { + throw new RuntimeException("Hexadecimal decoding failed", e); + } } private Integer getPartition(final ProcessContext context, final FlowFile flowFile) { diff --git a/nifi-nar-bundles/nifi-language-translation-bundle/nifi-yandex-processors/pom.xml b/nifi-nar-bundles/nifi-language-translation-bundle/nifi-yandex-processors/pom.xml index 603323c571..fa4ece1e12 100644 --- a/nifi-nar-bundles/nifi-language-translation-bundle/nifi-yandex-processors/pom.xml +++ b/nifi-nar-bundles/nifi-language-translation-bundle/nifi-yandex-processors/pom.xml @@ -52,7 +52,14 @@ org.glassfish.jersey.inject jersey-hk2 - + + jakarta.xml.bind + jakarta.xml.bind-api + + + org.glassfish.jaxb + jaxb-runtime + org.apache.nifi nifi-mock @@ -60,24 +67,4 @@ test - - - - jigsaw - - (1.8,) - - - - jakarta.xml.bind - jakarta.xml.bind-api - - - org.glassfish.jaxb - jaxb-runtime - - - - diff --git a/nifi-nar-bundles/nifi-standard-bundle/nifi-jolt-transform-json-ui/pom.xml b/nifi-nar-bundles/nifi-standard-bundle/nifi-jolt-transform-json-ui/pom.xml index ff2fff4cec..5974e88fad 100644 --- a/nifi-nar-bundles/nifi-standard-bundle/nifi-jolt-transform-json-ui/pom.xml +++ b/nifi-nar-bundles/nifi-standard-bundle/nifi-jolt-transform-json-ui/pom.xml @@ -115,6 +115,18 @@ language governing permissions and limitations under the License. --> com.fasterxml.jackson.core jackson-annotations + + jakarta.xml.bind + jakarta.xml.bind-api + + + org.glassfish.jaxb + jaxb-runtime + + + com.sun.activation + javax.activation + org.glassfish.jersey.test-framework.providers jersey-test-framework-provider-inmemory @@ -228,29 +240,4 @@ language governing permissions and limitations under the License. --> - - - - jigsaw - - (1.8,) - - - - jakarta.xml.bind - jakarta.xml.bind-api - - - org.glassfish.jaxb - jaxb-runtime - - - com.sun.activation - javax.activation - 1.2.0 - - - - 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 84d6ad1217..b6a751eabf 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 @@ -462,6 +462,14 @@ org.apache.nifi nifi-oauth2-provider-api + + jakarta.xml.bind + jakarta.xml.bind-api + + + org.glassfish.jaxb + jaxb-runtime + org.apache.sshd sshd-core @@ -747,45 +755,4 @@ - - - - expensive-heap-tests - - - heap - expensive - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - -Xmx3072M - - - - - - - - jigsaw - - (1.8,) - - - - jakarta.xml.bind - jakarta.xml.bind-api - - - org.glassfish.jaxb - jaxb-runtime - - - - diff --git a/nifi-nar-bundles/nifi-standard-services/nifi-hbase_1_1_2-client-service-bundle/nifi-hbase_1_1_2-client-service/pom.xml b/nifi-nar-bundles/nifi-standard-services/nifi-hbase_1_1_2-client-service-bundle/nifi-hbase_1_1_2-client-service/pom.xml index 0e61fc7c3f..0a2cc97e57 100644 --- a/nifi-nar-bundles/nifi-standard-services/nifi-hbase_1_1_2-client-service-bundle/nifi-hbase_1_1_2-client-service/pom.xml +++ b/nifi-nar-bundles/nifi-standard-services/nifi-hbase_1_1_2-client-service-bundle/nifi-hbase_1_1_2-client-service/pom.xml @@ -102,6 +102,10 @@ commons-logging commons-logging + + jdk.tools + jdk.tools + @@ -135,47 +139,4 @@ test - - - - - jigsaw - - (1.8,) - - - - org.apache.hbase - hbase-client - ${hbase.version} - - - - org.slf4j - slf4j-log4j12 - - - log4j - log4j - - - com.google.code.findbugs - jsr305 - - - jdk.tools - jdk.tools - - - commons-logging - commons-logging - - - - - - diff --git a/nifi-nar-bundles/nifi-standard-services/nifi-hbase_2-client-service-bundle/nifi-hbase_2-client-service/pom.xml b/nifi-nar-bundles/nifi-standard-services/nifi-hbase_2-client-service-bundle/nifi-hbase_2-client-service/pom.xml index 64285c58a1..52db2bbd10 100644 --- a/nifi-nar-bundles/nifi-standard-services/nifi-hbase_2-client-service-bundle/nifi-hbase_2-client-service/pom.xml +++ b/nifi-nar-bundles/nifi-standard-services/nifi-hbase_2-client-service-bundle/nifi-hbase_2-client-service/pom.xml @@ -99,6 +99,10 @@ commons-logging commons-logging + + jdk.tools + jdk.tools + @@ -130,47 +134,4 @@ test - - - - - jigsaw - - (1.8,) - - - - org.apache.hbase - hbase-client - ${hbase.version} - - - - org.slf4j - slf4j-log4j12 - - - log4j - log4j - - - com.google.code.findbugs - jsr305 - - - jdk.tools - jdk.tools - - - commons-logging - commons-logging - - - - - - diff --git a/nifi-nar-bundles/nifi-stateless-processor-bundle/nifi-stateless-processor-tests/src/test/assembly/dependencies.xml b/nifi-nar-bundles/nifi-stateless-processor-bundle/nifi-stateless-processor-tests/src/test/assembly/dependencies.xml index 3ac2511926..1d9b2624d8 100644 --- a/nifi-nar-bundles/nifi-stateless-processor-bundle/nifi-stateless-processor-tests/src/test/assembly/dependencies.xml +++ b/nifi-nar-bundles/nifi-stateless-processor-bundle/nifi-stateless-processor-tests/src/test/assembly/dependencies.xml @@ -43,20 +43,6 @@ *:slf4j-api - - - - - runtime - false - ./java11 - 0770 - 0664 - true - - jakarta.xml.bind:jakarta.xml.bind-api - - diff --git a/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-model/pom.xml b/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-model/pom.xml index 20dcd6503f..2b6a86d664 100644 --- a/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-model/pom.xml +++ b/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-model/pom.xml @@ -28,25 +28,13 @@ nifi-xml-processing 2.0.0-SNAPSHOT + + jakarta.xml.bind + jakarta.xml.bind-api + + + org.glassfish.jaxb + jaxb-runtime + - - - - jigsaw - - (1.8,) - - - - jakarta.xml.bind - jakarta.xml.bind-api - - - org.glassfish.jaxb - jaxb-runtime - - - - diff --git a/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-ui/pom.xml b/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-ui/pom.xml index 0885467285..a2f8c15b42 100644 --- a/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-ui/pom.xml +++ b/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-ui/pom.xml @@ -46,26 +46,6 @@ - - - - jigsaw - - (1.8,) - - - - jakarta.xml.bind - jakarta.xml.bind-api - - - org.glassfish.jaxb - jaxb-runtime - - - - org.apache.nifi @@ -98,6 +78,14 @@ nifi-expression-language 2.0.0-SNAPSHOT + + jakarta.xml.bind + jakarta.xml.bind-api + + + org.glassfish.jaxb + jaxb-runtime + javax.servlet javax.servlet-api diff --git a/nifi-registry/nifi-registry-assembly/pom.xml b/nifi-registry/nifi-registry-assembly/pom.xml index 3c862a0a27..f382f8db6b 100644 --- a/nifi-registry/nifi-registry-assembly/pom.xml +++ b/nifi-registry/nifi-registry-assembly/pom.xml @@ -149,16 +149,6 @@ runtime zip - - - - jakarta.xml.bind - jakarta.xml.bind-api - - - org.glassfish.jaxb - jaxb-runtime - org.apache.nifi.registry diff --git a/nifi-registry/nifi-registry-assembly/src/main/assembly/dependencies.xml b/nifi-registry/nifi-registry-assembly/src/main/assembly/dependencies.xml index 53198dd4b1..05e4c5f838 100644 --- a/nifi-registry/nifi-registry-assembly/src/main/assembly/dependencies.xml +++ b/nifi-registry/nifi-registry-assembly/src/main/assembly/dependencies.xml @@ -68,22 +68,6 @@ - - - - runtime - false - lib/java11 - 0770 - 0664 - true - - jakarta.xml.bind:jakarta.xml.bind-api - org.glassfish.jaxb:jaxb-runtime - jakarta.activation:jakarta.activation-api - - - runtime @@ -100,11 +84,6 @@ *:nifi-registry-ranger-assembly *:nifi-registry-aws-assembly *:nifi-registry-properties-loader - - - - jakarta.xml.bind:jakarta.xml.bind-api - org.glassfish.jaxb:jaxb-runtime diff --git a/nifi-registry/nifi-registry-core/nifi-registry-bootstrap/src/main/java/org/apache/nifi/registry/bootstrap/RunNiFiRegistry.java b/nifi-registry/nifi-registry-core/nifi-registry-bootstrap/src/main/java/org/apache/nifi/registry/bootstrap/RunNiFiRegistry.java index b473516e8b..545ad6f375 100644 --- a/nifi-registry/nifi-registry-core/nifi-registry-bootstrap/src/main/java/org/apache/nifi/registry/bootstrap/RunNiFiRegistry.java +++ b/nifi-registry/nifi-registry-core/nifi-registry-bootstrap/src/main/java/org/apache/nifi/registry/bootstrap/RunNiFiRegistry.java @@ -18,7 +18,6 @@ package org.apache.nifi.registry.bootstrap; import org.apache.commons.lang3.StringUtils; import org.apache.nifi.bootstrap.util.OSUtils; -import org.apache.nifi.bootstrap.util.RuntimeVersionProvider; import org.apache.nifi.deprecation.log.DeprecationLogger; import org.apache.nifi.deprecation.log.DeprecationLoggerFactory; import org.apache.nifi.registry.util.FileUtils; @@ -51,7 +50,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Map.Entry; -import java.util.Objects; import java.util.Properties; import java.util.Set; import java.util.concurrent.ExecutorService; @@ -924,25 +922,6 @@ public class RunNiFiRegistry { cpFiles.add(file.getAbsolutePath()); } - final String runtimeJavaVersion = System.getProperty("java.version"); - defaultLogger.info("Runtime Java version: {}", runtimeJavaVersion); - final int javaMajorVersion = RuntimeVersionProvider.getMajorVersion(); - if (javaMajorVersion >= 11) { - // If running on Java 11 or greater, add lib/java11 to the classpath. - // TODO: Once the minimum Java version requirement of NiFi Registry is 11, this processing should be removed. - final String libJava11Filename = replaceNull(props.get("lib.dir"), "./lib").trim() + "/java11"; - final File libJava11Dir = getFile(libJava11Filename, workingDir); - if (libJava11Dir.exists()) { - for (final File file : Objects.requireNonNull(libJava11Dir.listFiles((dir, filename) -> filename.toLowerCase().endsWith(".jar")))) { - cpFiles.add(file.getAbsolutePath()); - } - } - } - - if (RuntimeVersionProvider.isMajorVersionDeprecated(javaMajorVersion)) { - deprecationLogger.warn("Support for Java {} is deprecated. Java {} is the minimum recommended version", javaMajorVersion, RuntimeVersionProvider.getMinimumMajorVersion()); - } - final StringBuilder classPathBuilder = new StringBuilder(); for (int i = 0; i < cpFiles.size(); i++) { final String filename = cpFiles.get(i); @@ -985,12 +964,6 @@ public class RunNiFiRegistry { cmd.add("-Dapp=NiFiRegistry"); cmd.add("-Dorg.apache.nifi.registry.bootstrap.config.log.dir=" + nifiRegistryLogDir); - if (runtimeJavaVersion.startsWith("9") || runtimeJavaVersion.startsWith("10")) { - // running on Java 9+, java.xml.bind module must be made available - // running on Java 9 or 10, internal module java.xml.bind module must be made available - cmd.add("--add-modules=java.xml.bind"); - } - cmd.add("org.apache.nifi.registry.NiFiRegistry"); builder.command(cmd); diff --git a/nifi-registry/nifi-registry-core/nifi-registry-bundle-utils/pom.xml b/nifi-registry/nifi-registry-core/nifi-registry-bundle-utils/pom.xml index 9a265268de..b8f14b9762 100644 --- a/nifi-registry/nifi-registry-core/nifi-registry-bundle-utils/pom.xml +++ b/nifi-registry/nifi-registry-core/nifi-registry-bundle-utils/pom.xml @@ -31,26 +31,10 @@ nifi-extension-manifest-parser 2.0.0-SNAPSHOT + + org.glassfish.jaxb + jaxb-runtime + test + - - - - - jigsaw - - (1.8,) - - - - jakarta.xml.bind - jakarta.xml.bind-api - - - org.glassfish.jaxb - jaxb-runtime - test - - - - diff --git a/nifi-registry/nifi-registry-core/nifi-registry-data-model/pom.xml b/nifi-registry/nifi-registry-core/nifi-registry-data-model/pom.xml index f632bf10b7..f0f45ab883 100644 --- a/nifi-registry/nifi-registry-core/nifi-registry-data-model/pom.xml +++ b/nifi-registry/nifi-registry-core/nifi-registry-data-model/pom.xml @@ -33,6 +33,10 @@ javax.ws.rs javax.ws.rs-api + + jakarta.xml.bind + jakarta.xml.bind-api + org.apache.nifi nifi-api @@ -49,20 +53,4 @@ 2.0.0-SNAPSHOT - - - - - jigsaw - - (1.8,) - - - - jakarta.xml.bind - jakarta.xml.bind-api - - - - diff --git a/nifi-registry/nifi-registry-core/nifi-registry-framework/pom.xml b/nifi-registry/nifi-registry-core/nifi-registry-framework/pom.xml index c917b556fb..8d4cd2326e 100644 --- a/nifi-registry/nifi-registry-core/nifi-registry-framework/pom.xml +++ b/nifi-registry/nifi-registry-core/nifi-registry-framework/pom.xml @@ -451,25 +451,13 @@ nifi-property-protection-api 2.0.0-SNAPSHOT + + jakarta.xml.bind + jakarta.xml.bind-api + + + org.glassfish.jaxb + jaxb-runtime + - - - - - jigsaw - - (1.8,) - - - - jakarta.xml.bind - jakarta.xml.bind-api - - - org.glassfish.jaxb - jaxb-runtime - - - - diff --git a/nifi-registry/nifi-registry-core/nifi-registry-web-api/pom.xml b/nifi-registry/nifi-registry-core/nifi-registry-web-api/pom.xml index aced80b2d0..5cc33dbd4b 100644 --- a/nifi-registry/nifi-registry-core/nifi-registry-web-api/pom.xml +++ b/nifi-registry/nifi-registry-core/nifi-registry-web-api/pom.xml @@ -223,62 +223,6 @@ - - - no-swagger-ui - - - - - com.googlecode.maven-download-plugin - download-maven-plugin - 1.2.1 - - - download-swagger-ui - none - - - - - org.apache.maven.plugins - maven-antrun-plugin - 1.8 - - - bundle-swagger-ui - none - - - - - - - - - jigsaw - - (1.8,) - - - - - jakarta.xml.bind - jakarta.xml.bind-api - provided - - - org.glassfish.jaxb - jaxb-runtime - provided - - - - - org.springframework.boot @@ -396,6 +340,14 @@ javax.servlet-api provided + + jakarta.xml.bind + jakarta.xml.bind-api + + + org.glassfish.jaxb + jaxb-runtime + io.swagger swagger-annotations diff --git a/nifi-registry/pom.xml b/nifi-registry/pom.xml index 346a1d3ca0..4103e5c53d 100644 --- a/nifi-registry/pom.xml +++ b/nifi-registry/pom.xml @@ -106,17 +106,6 @@ ${jetty.version} compile - - - jakarta.xml.bind - jakarta.xml.bind-api - ${jaxb.version} - - - org.glassfish.jaxb - jaxb-runtime - ${jaxb.version} - org.apache.nifi.registry @@ -478,39 +467,5 @@ - - - disable-doclint - - true - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - - none - - - - - - - - - jigsaw - - (1.8,) - - - 11 - 11 - - diff --git a/nifi-stateless/nifi-stateless-assembly/pom.xml b/nifi-stateless/nifi-stateless-assembly/pom.xml index 0eadf7c1ec..c49d8d18df 100644 --- a/nifi-stateless/nifi-stateless-assembly/pom.xml +++ b/nifi-stateless/nifi-stateless-assembly/pom.xml @@ -125,24 +125,6 @@ nar - - - - jakarta.xml.bind - jakarta.xml.bind-api - ${jakarta.xml.bind-api.version} - - - org.glassfish.jaxb - jaxb-runtime - ${jaxb.runtime.version} - - - javax.annotation - javax.annotation-api - 1.3.2 - - org.aspectj diff --git a/nifi-stateless/nifi-stateless-assembly/src/main/assembly/common.xml b/nifi-stateless/nifi-stateless-assembly/src/main/assembly/common.xml index ad9aeb85ee..b02d9acc62 100644 --- a/nifi-stateless/nifi-stateless-assembly/src/main/assembly/common.xml +++ b/nifi-stateless/nifi-stateless-assembly/src/main/assembly/common.xml @@ -30,24 +30,6 @@ - - - - runtime - false - lib/java11 - 0770 - 0664 - true - - org.glassfish.jaxb:jaxb-runtime - jakarta.xml.bind:jakarta.xml.bind-api - javax.annotation:javax.annotation-api - com.sun.activation:jakarta.activation - jakarta.activation:jakarta.activation-api - - - runtime diff --git a/nifi-stateless/nifi-stateless-assembly/src/main/assembly/dependencies.xml b/nifi-stateless/nifi-stateless-assembly/src/main/assembly/dependencies.xml index 9d742c2df7..99ca6fddd4 100644 --- a/nifi-stateless/nifi-stateless-assembly/src/main/assembly/dependencies.xml +++ b/nifi-stateless/nifi-stateless-assembly/src/main/assembly/dependencies.xml @@ -33,14 +33,7 @@ true *:nifi-stateless-resources - - - - org.glassfish.jaxb:jaxb-runtime - jakarta.xml.bind:jakarta.xml.bind-api - javax.annotation:javax.annotation-api - - + org.aspectj:aspectjweaver diff --git a/nifi-stateless/nifi-stateless-bootstrap/src/main/java/org/apache/nifi/stateless/bootstrap/StatelessBootstrap.java b/nifi-stateless/nifi-stateless-bootstrap/src/main/java/org/apache/nifi/stateless/bootstrap/StatelessBootstrap.java index a5351e0bfb..12c2f9d74a 100644 --- a/nifi-stateless/nifi-stateless-bootstrap/src/main/java/org/apache/nifi/stateless/bootstrap/StatelessBootstrap.java +++ b/nifi-stateless/nifi-stateless-bootstrap/src/main/java/org/apache/nifi/stateless/bootstrap/StatelessBootstrap.java @@ -166,15 +166,6 @@ public class StatelessBootstrap { findClassNamesInDirectory(narDirectory, narDirectory, classesAllowed, filesAllowed); - final File java11Directory = new File(narDirectory, "java11"); - final File[] java11DirectoryFiles = java11Directory.listFiles(); - if (java11DirectoryFiles != null) { - for (final File file : java11DirectoryFiles) { - findClassNamesInJar(file, classesAllowed); - filesAllowed.add(file.getName()); - } - } - final Set javaHomeFiles = findJavaHomeFiles(); final Set javaHomeFilenames = new HashSet<>(); for (final File file : javaHomeFiles) { diff --git a/nifi-stateless/nifi-stateless-bundle/nifi-stateless-engine/src/main/java/org/apache/nifi/stateless/flow/StandardStatelessDataflowFactory.java b/nifi-stateless/nifi-stateless-bundle/nifi-stateless-engine/src/main/java/org/apache/nifi/stateless/flow/StandardStatelessDataflowFactory.java index 697c033168..124af2d99e 100644 --- a/nifi-stateless/nifi-stateless-bundle/nifi-stateless-engine/src/main/java/org/apache/nifi/stateless/flow/StandardStatelessDataflowFactory.java +++ b/nifi-stateless/nifi-stateless-bundle/nifi-stateless-engine/src/main/java/org/apache/nifi/stateless/flow/StandardStatelessDataflowFactory.java @@ -79,8 +79,6 @@ import org.slf4j.LoggerFactory; import javax.net.ssl.SSLContext; import java.io.File; import java.io.IOException; -import java.net.URL; -import java.net.URLClassLoader; import java.util.ArrayList; import java.util.Collections; import java.util.List; @@ -111,8 +109,12 @@ public class StandardStatelessDataflowFactory implements StatelessDataflowFactor final NarClassLoaders narClassLoaders = new NarClassLoaders(); final File extensionsWorkingDir = new File(narExpansionDirectory, "extensions"); - final ClassLoader systemClassLoader = createSystemClassLoader(engineConfiguration.getNarDirectory(), extensionRootClassLoader); - final ExtensionDiscoveringManager extensionManager = ExtensionDiscovery.discover(extensionsWorkingDir, systemClassLoader, narClassLoaders, engineConfiguration.isLogExtensionDiscovery()); + final ExtensionDiscoveringManager extensionManager = ExtensionDiscovery.discover( + extensionsWorkingDir, + extensionRootClassLoader, + narClassLoaders, + engineConfiguration.isLogExtensionDiscovery() + ); flowFileEventRepo = new RingBufferEventRepository(5); @@ -299,59 +301,4 @@ public class StandardStatelessDataflowFactory implements StatelessDataflowFactor private boolean isValidExtensionClientType(final String type) { return "nexus".equalsIgnoreCase(type.trim()); } - - private ClassLoader createSystemClassLoader(final File narDirectory, final ClassLoader extensionRootClassLoader) throws StatelessConfigurationException { - final int javaMajorVersion = getJavaMajorVersion(); - if (javaMajorVersion >= 11) { - // If running on Java 11 or greater, add the JAXB/activation/annotation libs to the classpath. - // TODO: Once the minimum Java version requirement of NiFi is 11, this processing should be removed. - // JAXB/activation/annotation will be added as an actual dependency via pom.xml. - return createJava11OrLaterSystemClassLoader(javaMajorVersion, narDirectory, extensionRootClassLoader); - } - - return extensionRootClassLoader; - } - - private ClassLoader createJava11OrLaterSystemClassLoader(final int javaMajorVersion, final File narDirectory, final ClassLoader parentClassLoader) throws StatelessConfigurationException { - final List java11JarFileUrls = new ArrayList<>(); - - final File java11Dir = new File(narDirectory, "java11"); - if (!java11Dir.exists()) { - throw new StatelessConfigurationException("Could not create System-level ClassLoader because Java version is " + javaMajorVersion + " but could not find the requisite Java 11 libraries " + - "at " + java11Dir.getAbsolutePath()); - } - - final File[] java11JarFiles = java11Dir.listFiles(filename -> filename.getName().toLowerCase().endsWith(".jar")); - if (java11JarFiles == null || java11JarFiles.length == 0) { - throw new StatelessConfigurationException("Could not create System-level ClassLoader because Java version is " + javaMajorVersion + " but could not find the requisite Java 11 libraries " + - "at " + java11Dir.getAbsolutePath()); - } - - try { - for (final File file : java11JarFiles) { - java11JarFileUrls.add(file.toURI().toURL()); - } - } catch (final Exception e) { - throw new StatelessConfigurationException("Could not create System-level ClassLoader", e); - } - - final ClassLoader classLoader = new URLClassLoader(java11JarFileUrls.toArray(new URL[0]), parentClassLoader); - return classLoader; - } - - private int getJavaMajorVersion() { - final String javaVersion = System.getProperty("java.version"); - logger.debug("Java Version is {}", javaVersion); - - if (javaVersion.startsWith("1.")) { - return Integer.parseInt(javaVersion.substring(2, 3)); - } - - final int dotIndex = javaVersion.indexOf("."); - if (dotIndex < 0) { - return Integer.parseInt(javaVersion); - } - - return Integer.parseInt(javaVersion.substring(0, dotIndex)); - } } diff --git a/nifi-system-tests/nifi-stateless-system-test-suite/pom.xml b/nifi-system-tests/nifi-stateless-system-test-suite/pom.xml index 734aa82876..717bd615d4 100644 --- a/nifi-system-tests/nifi-stateless-system-test-suite/pom.xml +++ b/nifi-system-tests/nifi-stateless-system-test-suite/pom.xml @@ -48,24 +48,6 @@ 2.0.0-SNAPSHOT - - - - jakarta.xml.bind - jakarta.xml.bind-api - ${jakarta.xml.bind-api.version} - - - org.glassfish.jaxb - jaxb-runtime - ${jaxb.runtime.version} - - - javax.annotation - javax.annotation-api - 1.3.2 - - org.apache.nifi diff --git a/nifi-system-tests/nifi-stateless-system-test-suite/src/test/assembly/dependencies.xml b/nifi-system-tests/nifi-stateless-system-test-suite/src/test/assembly/dependencies.xml index 51fa7b012e..281da53626 100644 --- a/nifi-system-tests/nifi-stateless-system-test-suite/src/test/assembly/dependencies.xml +++ b/nifi-system-tests/nifi-stateless-system-test-suite/src/test/assembly/dependencies.xml @@ -31,29 +31,8 @@ *:jackson-core *:jackson-databind - - - org.glassfish.jaxb:jaxb-runtime - jakarta.xml.bind:jakarta.xml.bind-api - javax.annotation:javax.annotation-api - - - - - runtime - false - nars/java11 - 0770 - 0664 - true - - org.glassfish.jaxb:jaxb-runtime - jakarta.xml.bind:jakarta.xml.bind-api - javax.annotation:javax.annotation-api - - diff --git a/nifi-system-tests/nifi-system-test-suite/pom.xml b/nifi-system-tests/nifi-system-test-suite/pom.xml index 310f29900f..53d63a91eb 100644 --- a/nifi-system-tests/nifi-system-test-suite/pom.xml +++ b/nifi-system-tests/nifi-system-test-suite/pom.xml @@ -241,23 +241,5 @@ assembly zip - - - - - jakarta.xml.bind - jakarta.xml.bind-api - ${jakarta.xml.bind-api.version} - - - org.glassfish.jaxb - jaxb-runtime - ${jaxb.runtime.version} - - - javax.annotation - javax.annotation-api - 1.3.2 - \ No newline at end of file diff --git a/nifi-system-tests/nifi-system-test-suite/src/test/assembly/dependencies.xml b/nifi-system-tests/nifi-system-test-suite/src/test/assembly/dependencies.xml index 7ffab9b3e2..ff4c164250 100644 --- a/nifi-system-tests/nifi-system-test-suite/src/test/assembly/dependencies.xml +++ b/nifi-system-tests/nifi-system-test-suite/src/test/assembly/dependencies.xml @@ -38,24 +38,6 @@ - - - - runtime - false - lib/java11 - 0770 - 0664 - true - - org.glassfish.jaxb:jaxb-runtime - jakarta.xml.bind:jakarta.xml.bind-api - javax.annotation:javax.annotation-api - com.sun.activation:jakarta.activation - jakarta.activation:jakarta.activation-api - - - runtime @@ -78,12 +60,6 @@ *:nifi-security-utils-api *:nifi-xml-processing *:nifi-nar-provider-assembly - - - - org.glassfish.jaxb:jaxb-runtime - jakarta.xml.bind:jakarta.xml.bind-api - javax.annotation:javax.annotation-api diff --git a/nifi-toolkit/nifi-toolkit-admin/pom.xml b/nifi-toolkit/nifi-toolkit-admin/pom.xml index fad04d8bc0..d5d8ea3440 100644 --- a/nifi-toolkit/nifi-toolkit-admin/pom.xml +++ b/nifi-toolkit/nifi-toolkit-admin/pom.xml @@ -136,6 +136,14 @@ language governing permissions and limitations under the License. --> commons-compress 1.21 + + jakarta.xml.bind + jakarta.xml.bind-api + + + org.glassfish.jaxb + jaxb-runtime + com.github.stefanbirkner @@ -229,25 +237,4 @@ language governing permissions and limitations under the License. --> - - - - - jigsaw - - (1.8,) - - - - jakarta.xml.bind - jakarta.xml.bind-api - - - org.glassfish.jaxb - jaxb-runtime - - - - diff --git a/nifi-toolkit/nifi-toolkit-api/pom.xml b/nifi-toolkit/nifi-toolkit-api/pom.xml index 9213197476..1994eed5d2 100644 --- a/nifi-toolkit/nifi-toolkit-api/pom.xml +++ b/nifi-toolkit/nifi-toolkit-api/pom.xml @@ -58,6 +58,10 @@ language governing permissions and limitations under the License. --> com.fasterxml.jackson.datatype jackson-datatype-jsr310 + + javax.annotation + javax.annotation-api + - - - - jigsaw - - (1.8,) - - - - javax.annotation - javax.annotation-api - - - - diff --git a/nifi-toolkit/nifi-toolkit-assembly/pom.xml b/nifi-toolkit/nifi-toolkit-assembly/pom.xml index 243235e71c..8b858102dc 100644 --- a/nifi-toolkit/nifi-toolkit-assembly/pom.xml +++ b/nifi-toolkit/nifi-toolkit-assembly/pom.xml @@ -113,24 +113,6 @@ language governing permissions and limitations under the License. --> javax.servlet-api compile - - - - - jakarta.xml.bind - jakarta.xml.bind-api - ${jakarta.xml.bind-api.version} - - - org.glassfish.jaxb - jaxb-runtime - ${jaxb.runtime.version} - - - javax.annotation - javax.annotation-api - 1.3.2 - diff --git a/nifi-toolkit/nifi-toolkit-assembly/src/main/assembly/dependencies.xml b/nifi-toolkit/nifi-toolkit-assembly/src/main/assembly/dependencies.xml index f9fa10ea64..d07665f82b 100644 --- a/nifi-toolkit/nifi-toolkit-assembly/src/main/assembly/dependencies.xml +++ b/nifi-toolkit/nifi-toolkit-assembly/src/main/assembly/dependencies.xml @@ -32,28 +32,6 @@ false 0770 0660 - - - - org.glassfish.jaxb:jaxb-runtime - jakarta.xml.bind:jakarta.xml.bind-api - - - - - - runtime - false - lib/java11 - 0770 - 0664 - true - - org.glassfish.jaxb:jaxb-runtime - jakarta.xml.bind:jakarta.xml.bind-api - com.sun.activation:jakarta.activation - jakarta.activation:jakarta.activation-api - @@ -69,15 +47,6 @@ conf/ 0600 - - - - - - - - - ${project.basedir}/src/main/resources/classpath classpath/ diff --git a/nifi-toolkit/nifi-toolkit-assembly/src/main/resources/bin/cli.bat b/nifi-toolkit/nifi-toolkit-assembly/src/main/resources/bin/cli.bat index f342a197aa..f30081ce90 100644 --- a/nifi-toolkit/nifi-toolkit-assembly/src/main/resources/bin/cli.bat +++ b/nifi-toolkit/nifi-toolkit-assembly/src/main/resources/bin/cli.bat @@ -42,24 +42,7 @@ for /f tokens^=2-5^ delims^=.-+_^" %%j in ('"%JAVA_EXE%" -fullversion 2^>^&1') d set "micro=%%l" set "build=%%m" ) -set compatibility_arg= -set compatibility_lib= -if %major% EQU 9 ( - set compatibility_arg=--add-modules=java.xml.bind - echo Detected Java 9 runtime version -) else if %major% EQU 10 ( - set compatibility_arg=--add-modules=java.xml.bind - echo Detected Java 10 runtime version -) else if %major% GEQ 11 ( - set compatibility_lib=%NIFI_TOOLKIT_HOME%\lib\java11\ - echo Detected java 11 or later runtime version: %major% -) -if not "%compatibility_arg%" == "" (set JAVA_OPTS=%JAVA_OPTS% %compatibility_arg%) -if not "%compatibility_lib%" == "" ( - set LIB_DIR="%LIB_DIR%*;%compatibility_lib%*" -) else ( - set LIB_DIR="%LIB_DIR%*" -) +set LIB_DIR="%LIB_DIR%*" rem remove surrounding quotes SET LIB_DIR=%LIB_DIR:"=% diff --git a/nifi-toolkit/nifi-toolkit-assembly/src/main/resources/bin/cli.sh b/nifi-toolkit/nifi-toolkit-assembly/src/main/resources/bin/cli.sh index 9a30dde84f..001d8e29a2 100644 --- a/nifi-toolkit/nifi-toolkit-assembly/src/main/resources/bin/cli.sh +++ b/nifi-toolkit/nifi-toolkit-assembly/src/main/resources/bin/cli.sh @@ -94,33 +94,6 @@ locateJava() { fi } -apply_java_compatibility() { - compatibility_arg="" - compatibility_lib="" - java_version="$("${JAVA}" -version 2>&1 | head -n 1 | awk -F '"' '{print $2}')" - - case "$java_version" in - 9*|10*) - compatibility_arg="--add-modules=java.xml.bind" - ;; - [1-9][1-9]*) - # java versions 11-99 - compatibility_lib="${NIFI_TOOLKIT_HOME}/lib/java11/*" - ;; - 1.*) - ;; - esac - - JAVA_OPTS="${JAVA_OPTS:--Xms128m -Xmx256m}" - if [ "x${compatibility_arg}" != "x" ]; then - JAVA_OPTS="${JAVA_OPTS} $compatibility_arg" - fi - - if [ "x${compatibility_lib}" != "x" ]; then - CLASSPATH="$CLASSPATH$classpath_separator$compatibility_lib" - fi -} - init() { # Determine if there is special OS handling we must perform detectOS @@ -144,7 +117,6 @@ run() { export JAVA_HOME="$JAVA_HOME" export NIFI_TOOLKIT_HOME="$NIFI_TOOLKIT_HOME" - apply_java_compatibility umask 0077 exec "${JAVA}" -cp "${CLASSPATH}" ${JAVA_OPTS} org.apache.nifi.toolkit.cli.CLIMain "$@" diff --git a/nifi-toolkit/pom.xml b/nifi-toolkit/pom.xml index 78793004ec..206d24b7a9 100644 --- a/nifi-toolkit/pom.xml +++ b/nifi-toolkit/pom.xml @@ -81,54 +81,4 @@ slf4j-simple - - - - jigsaw - - (1.8,) - - - 11 - 11 - - - - - - org.jvnet.jaxb2.maven2 - maven-jaxb2-plugin - 0.14.0 - - - - - - - - jakarta.xml.bind - jakarta.xml.bind-api - ${jakarta.xml.bind-api.version} - - - org.glassfish.jaxb - jaxb-runtime - ${jaxb.runtime.version} - - - com.sun.activation - javax.activation - 1.2.0 - - - javax.annotation - javax.annotation-api - 1.3.2 - - - - - diff --git a/pom.xml b/pom.xml index b709b66d64..f0fe6174a8 100644 --- a/pom.xml +++ b/pom.xml @@ -687,7 +687,26 @@ import pom - + + jakarta.xml.bind + jakarta.xml.bind-api + ${jakarta.xml.bind-api.version} + + + org.glassfish.jaxb + jaxb-runtime + ${jaxb.runtime.version} + + + com.sun.activation + javax.activation + 1.2.0 + + + javax.annotation + javax.annotation-api + 1.3.2 + org.jsoup jsoup @@ -815,6 +834,7 @@ true 1.8 -J-Xmx512m + none @@ -949,6 +969,14 @@ https://repository.apache.org/ + + org.jvnet.jaxb2.maven2 + maven-jaxb2-plugin + 0.14.0 + + true + + org.apache.maven.plugins maven-enforcer-plugin @@ -1107,81 +1135,6 @@ - - - disable-doclint - - [1.8,) - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - - -Xdoclint:none - - - - - - - - - jigsaw - - (1.8,) - - - 11 - 11 - - - - - - org.jvnet.jaxb2.maven2 - maven-jaxb2-plugin - 0.14.0 - - true - - - - - - - - - jakarta.xml.bind - jakarta.xml.bind-api - ${jakarta.xml.bind-api.version} - - - org.glassfish.jaxb - jaxb-runtime - ${jaxb.runtime.version} - - - com.sun.activation - javax.activation - 1.2.0 - - - javax.annotation - javax.annotation-api - 1.3.2 - - - -