mirror of https://github.com/apache/nifi.git
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 <joewitt@apache.org>
This commit is contained in:
parent
7393ce294e
commit
1156f4cbc5
|
@ -262,24 +262,6 @@ limitations under the License.
|
|||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- dependencies for jaxb/activation/annotation for running MiNiFi on Java 11 -->
|
||||
<!-- TODO: remove these once minimum Java version is 11 -->
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
<version>${jakarta.xml.bind-api.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
<version>${jaxb.runtime.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.annotation</groupId>
|
||||
<artifactId>javax.annotation-api</artifactId>
|
||||
<version>${javax.annotation-api.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<properties>
|
||||
|
|
|
@ -38,12 +38,6 @@
|
|||
<exclude>*:minifi-resources</exclude>
|
||||
<!-- Filter items introduced via transitive dependencies that are provided in associated NARs -->
|
||||
<exclude>*:swagger-annotations</exclude>
|
||||
|
||||
<!-- exclude jaxb/activation/annotation libs from lib, they'll be included in the java11 subdir -->
|
||||
<!-- TODO: remove these once minimum Java version is 11 -->
|
||||
<exclude>org.glassfish.jaxb:jaxb-runtime</exclude>
|
||||
<exclude>jakarta.xml.bind:jakarta.xml.bind-api</exclude>
|
||||
<exclude>javax.annotation:javax.annotation-api</exclude>
|
||||
</excludes>
|
||||
</dependencySet>
|
||||
|
||||
|
@ -67,24 +61,6 @@
|
|||
</includes>
|
||||
</dependencySet>
|
||||
|
||||
<!-- Write out the bootstrap libs for java11 to its own dir -->
|
||||
<!-- TODO: remove this dependency set once minimum Java version is 11 -->
|
||||
<dependencySet>
|
||||
<scope>runtime</scope>
|
||||
<useProjectArtifact>false</useProjectArtifact>
|
||||
<outputDirectory>lib/java11</outputDirectory>
|
||||
<directoryMode>0770</directoryMode>
|
||||
<fileMode>0664</fileMode>
|
||||
<useTransitiveFiltering>true</useTransitiveFiltering>
|
||||
<includes>
|
||||
<include>org.glassfish.jaxb:jaxb-runtime</include>
|
||||
<include>jakarta.xml.bind:jakarta.xml.bind-api</include>
|
||||
<include>javax.annotation:javax.annotation-api</include>
|
||||
<include>com.sun.activation:jakarta.activation</include>
|
||||
<include>jakarta.activation:jakarta.activation-api</include>
|
||||
</includes>
|
||||
</dependencySet>
|
||||
|
||||
<!-- Write out the conf directory contents -->
|
||||
<dependencySet>
|
||||
<scope>runtime</scope>
|
||||
|
|
|
@ -38,12 +38,6 @@
|
|||
<exclude>*:minifi-resources</exclude>
|
||||
<!-- Filter items introduced via transitive dependencies that are provided in associated NARs -->
|
||||
<exclude>*:swagger-annotations</exclude>
|
||||
|
||||
<!-- exclude jaxb/activation/annotation libs from lib, they'll be included in the java11 subdir -->
|
||||
<!-- TODO: remove these once minimum Java version is 11 -->
|
||||
<exclude>org.glassfish.jaxb:jaxb-runtime</exclude>
|
||||
<exclude>jakarta.xml.bind:jakarta.xml.bind-api</exclude>
|
||||
<exclude>javax.annotation:javax.annotation-api</exclude>
|
||||
</excludes>
|
||||
</dependencySet>
|
||||
|
||||
|
@ -68,24 +62,6 @@
|
|||
</includes>
|
||||
</dependencySet>
|
||||
|
||||
<!-- Write out the bootstrap libs for java11 to its own dir -->
|
||||
<!-- TODO: remove this dependency set once minimum Java version is 11 -->
|
||||
<dependencySet>
|
||||
<scope>runtime</scope>
|
||||
<useProjectArtifact>false</useProjectArtifact>
|
||||
<outputDirectory>lib/java11</outputDirectory>
|
||||
<directoryMode>0770</directoryMode>
|
||||
<fileMode>0664</fileMode>
|
||||
<useTransitiveFiltering>true</useTransitiveFiltering>
|
||||
<includes>
|
||||
<include>org.glassfish.jaxb:jaxb-runtime</include>
|
||||
<include>jakarta.xml.bind:jakarta.xml.bind-api</include>
|
||||
<include>javax.annotation:javax.annotation-api</include>
|
||||
<include>com.sun.activation:jakarta.activation</include>
|
||||
<include>jakarta.activation:jakarta.activation-api</include>
|
||||
</includes>
|
||||
</dependencySet>
|
||||
|
||||
<!-- Write out the conf directory contents -->
|
||||
<dependencySet>
|
||||
<scope>runtime</scope>
|
||||
|
|
|
@ -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<String> getJava11Files(File libDir) {
|
||||
List<String> 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<String> getJavaAdditionalArgs(Properties props) {
|
||||
List<String> javaAdditionalArgs = new ArrayList<>();
|
||||
for (Entry<Object, Object> entry : props.entrySet()) {
|
||||
|
|
|
@ -185,24 +185,6 @@ limitations under the License.
|
|||
<version>${project.version}</version>
|
||||
<type>war</type>
|
||||
</dependency>
|
||||
|
||||
<!-- dependencies for jaxb/activation/annotation for running MiNiFi on Java 11 -->
|
||||
<!-- TODO: remove these once minimum Java version is 11 -->
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
<version>${jakarta.xml.bind-api.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
<version>${jaxb.runtime.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.annotation</groupId>
|
||||
<artifactId>javax.annotation-api</artifactId>
|
||||
<version>${javax.annotation-api.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<profiles>
|
||||
<profile>
|
||||
|
|
|
@ -45,24 +45,6 @@
|
|||
<include>*:war</include>
|
||||
</includes>
|
||||
</dependencySet>
|
||||
|
||||
<!-- Write out the bootstrap libs for java11 to its own dir -->
|
||||
<!-- TODO: remove this dependency set once minimum Java version is 11 -->
|
||||
<dependencySet>
|
||||
<scope>runtime</scope>
|
||||
<useProjectArtifact>false</useProjectArtifact>
|
||||
<outputDirectory>lib/java11</outputDirectory>
|
||||
<directoryMode>0770</directoryMode>
|
||||
<fileMode>0664</fileMode>
|
||||
<useTransitiveFiltering>true</useTransitiveFiltering>
|
||||
<includes>
|
||||
<include>org.glassfish.jaxb:jaxb-runtime</include>
|
||||
<include>jakarta.xml.bind:jakarta.xml.bind-api</include>
|
||||
<include>javax.annotation:javax.annotation-api</include>
|
||||
<include>com.sun.activation:jakarta.activation</include>
|
||||
<include>jakarta.activation:jakarta.activation-api</include>
|
||||
</includes>
|
||||
</dependencySet>
|
||||
</dependencySets>
|
||||
<fileSets>
|
||||
<fileSet>
|
||||
|
|
|
@ -960,23 +960,6 @@ language governing permissions and limitations under the License. -->
|
|||
<version>2.0.0-SNAPSHOT</version>
|
||||
<type>nar</type>
|
||||
</dependency>
|
||||
<!-- dependencies for jaxb/activation/annotation for running NiFi on Java 11 -->
|
||||
<!-- TODO: remove these once minimum Java version is 11 -->
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
<version>${jakarta.xml.bind-api.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
<version>${jaxb.runtime.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.annotation</groupId>
|
||||
<artifactId>javax.annotation-api</artifactId>
|
||||
<version>${javax.annotation-api.version}</version>
|
||||
</dependency>
|
||||
<!-- AspectJ library needed by the Java Agent used for native library loading (see bootstrap.conf) -->
|
||||
<dependency>
|
||||
<groupId>org.aspectj</groupId>
|
||||
|
|
|
@ -34,24 +34,6 @@
|
|||
</includes>
|
||||
</dependencySet>
|
||||
|
||||
<!-- Write out the bootstrap libs for java11 to its own dir -->
|
||||
<!-- TODO: remove this dependency set once minimum Java version is 11 -->
|
||||
<dependencySet>
|
||||
<scope>runtime</scope>
|
||||
<useProjectArtifact>false</useProjectArtifact>
|
||||
<outputDirectory>lib/java11</outputDirectory>
|
||||
<directoryMode>0770</directoryMode>
|
||||
<fileMode>0664</fileMode>
|
||||
<useTransitiveFiltering>true</useTransitiveFiltering>
|
||||
<includes>
|
||||
<include>org.glassfish.jaxb:jaxb-runtime</include>
|
||||
<include>jakarta.xml.bind:jakarta.xml.bind-api</include>
|
||||
<include>javax.annotation:javax.annotation-api</include>
|
||||
<include>com.sun.activation:jakarta.activation</include>
|
||||
<include>jakarta.activation:jakarta.activation-api</include>
|
||||
</includes>
|
||||
</dependencySet>
|
||||
|
||||
<!-- Write out the AspectJ library to its own dir -->
|
||||
<!-- The AspectJ library needed by the Java Agent used for native library loading. It does not need to be on the classpath (see bootstrap.conf) -->
|
||||
<dependencySet>
|
||||
|
|
|
@ -38,14 +38,7 @@
|
|||
<exclude>*:nifi-property-protection-factory</exclude>
|
||||
<exclude>*:nifi-resources</exclude>
|
||||
<exclude>*:nifi-docs</exclude>
|
||||
|
||||
<!-- exclude jaxb/activation/annotation libs from lib, they'll be included in the java11 subdir -->
|
||||
<!-- TODO: remove these once minimum Java version is 11 -->
|
||||
<exclude>org.glassfish.jaxb:jaxb-runtime</exclude>
|
||||
<exclude>jakarta.xml.bind:jakarta.xml.bind-api</exclude>
|
||||
<exclude>javax.annotation:javax.annotation-api</exclude>
|
||||
|
||||
<!-- exclude AspectJ library from lib, it'll be included in the aspectj subdir -->
|
||||
<!-- exclude AspectJ library from lib included in the aspectj subdir -->
|
||||
<exclude>org.aspectj:aspectjweaver</exclude>
|
||||
</excludes>
|
||||
</dependencySet>
|
||||
|
|
|
@ -44,12 +44,6 @@
|
|||
<exclude>*:nifi-resources</exclude>
|
||||
<exclude>*:nifi-docs</exclude>
|
||||
<exclude>org.apache.nifi:nifi-ranger-resources:jar</exclude>
|
||||
|
||||
<!-- exclude jaxb/activation/annotation libs from lib, they'll be included in the java11 subdir -->
|
||||
<!-- TODO: remove these once minimum Java version is 11 -->
|
||||
<exclude>org.glassfish.jaxb:jaxb-runtime</exclude>
|
||||
<exclude>jakarta.xml.bind:jakarta.xml.bind-api</exclude>
|
||||
<exclude>javax.annotation:javax.annotation-api</exclude>
|
||||
</excludes>
|
||||
</dependencySet>
|
||||
<!-- Write out dependencies for Ranger's credentialbuilder to ext/ranger/install/lib -->
|
||||
|
|
|
@ -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<Future<?>> 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);
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -131,30 +131,13 @@
|
|||
<artifactId>validation-api</artifactId>
|
||||
<version>2.0.1.Final</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<profiles>
|
||||
<profile>
|
||||
<!-- This profile, activating when compiling on Java versions above 1.8, provides configuration changes to
|
||||
allow NiFi to be compiled on those JDKs. -->
|
||||
<id>jigsaw</id>
|
||||
<activation>
|
||||
<jdk>(1.8,)</jdk>
|
||||
</activation>
|
||||
<properties>
|
||||
<httpclient.group>org.apache.httpcomponents.client5</httpclient.group>
|
||||
<httpclient.artifact>httpclient5</httpclient.artifact>
|
||||
<httpclient.version>5.0-beta4</httpclient.version>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
|
|
@ -39,25 +39,9 @@
|
|||
<artifactId>nifi-api</artifactId>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<profiles>
|
||||
<profile>
|
||||
<!-- This profile, activating when compiling on Java versions above 1.8, provides configuration changes to
|
||||
allow NiFi to be compiled on those JDKs. -->
|
||||
<id>jigsaw</id>
|
||||
<activation>
|
||||
<jdk>(1.8,)</jdk>
|
||||
</activation>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
|
|
@ -117,27 +117,8 @@
|
|||
<version>2.0.0-SNAPSHOT</version>
|
||||
<type>nar</type>
|
||||
</dependency>
|
||||
|
||||
<!-- dependencies for jaxb/activation/annotation for running NiFi on Java 11 -->
|
||||
<!-- TODO: remove these once minimum Java version is 11 -->
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
<version>${jakarta.xml.bind-api.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
<version>${jaxb.runtime.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.annotation</groupId>
|
||||
<artifactId>javax.annotation-api</artifactId>
|
||||
<version>1.3.2</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
|
|
|
@ -27,29 +27,6 @@
|
|||
<directoryMode>0770</directoryMode>
|
||||
<fileMode>0664</fileMode>
|
||||
<useTransitiveFiltering>true</useTransitiveFiltering>
|
||||
<excludes>
|
||||
<!-- exclude jaxb/activation/annotation libs from lib, they'll be included in the java11 subdir -->
|
||||
<!-- TODO: remove these once minimum Java version is 11 -->
|
||||
<exclude>org.glassfish.jaxb:jaxb-runtime</exclude>
|
||||
<exclude>jakarta.xml.bind:jakarta.xml.bind-api</exclude>
|
||||
<exclude>javax.annotation:javax.annotation-api</exclude>
|
||||
</excludes>
|
||||
</dependencySet>
|
||||
|
||||
<!-- Write out the bootstrap libs for java11 to its own dir -->
|
||||
<!-- TODO: remove this dependency set once minimum Java version is 11 -->
|
||||
<dependencySet>
|
||||
<scope>runtime</scope>
|
||||
<useProjectArtifact>false</useProjectArtifact>
|
||||
<outputDirectory>./java11</outputDirectory>
|
||||
<directoryMode>0770</directoryMode>
|
||||
<fileMode>0664</fileMode>
|
||||
<useTransitiveFiltering>true</useTransitiveFiltering>
|
||||
<includes>
|
||||
<include>org.glassfish.jaxb:jaxb-runtime</include>
|
||||
<include>jakarta.xml.bind:jakarta.xml.bind-api</include>
|
||||
<include>javax.annotation:javax.annotation-api</include>
|
||||
</includes>
|
||||
</dependencySet>
|
||||
</dependencySets>
|
||||
|
||||
|
|
|
@ -27,29 +27,6 @@
|
|||
<directoryMode>0770</directoryMode>
|
||||
<fileMode>0664</fileMode>
|
||||
<useTransitiveFiltering>true</useTransitiveFiltering>
|
||||
<excludes>
|
||||
<!-- exclude jaxb/activation/annotation libs from lib, they'll be included in the java11 subdir -->
|
||||
<!-- TODO: remove these once minimum Java version is 11 -->
|
||||
<exclude>org.glassfish.jaxb:jaxb-runtime</exclude>
|
||||
<exclude>jakarta.xml.bind:jakarta.xml.bind-api</exclude>
|
||||
<exclude>javax.annotation:javax.annotation-api</exclude>
|
||||
</excludes>
|
||||
</dependencySet>
|
||||
|
||||
<!-- Write out the bootstrap libs for java11 to its own dir -->
|
||||
<!-- TODO: remove this dependency set once minimum Java version is 11 -->
|
||||
<dependencySet>
|
||||
<scope>runtime</scope>
|
||||
<useProjectArtifact>false</useProjectArtifact>
|
||||
<outputDirectory>./java11</outputDirectory>
|
||||
<directoryMode>0770</directoryMode>
|
||||
<fileMode>0664</fileMode>
|
||||
<useTransitiveFiltering>true</useTransitiveFiltering>
|
||||
<includes>
|
||||
<include>org.glassfish.jaxb:jaxb-runtime</include>
|
||||
<include>jakarta.xml.bind:jakarta.xml.bind-api</include>
|
||||
<include>javax.annotation:javax.annotation-api</include>
|
||||
</includes>
|
||||
</dependencySet>
|
||||
|
||||
</dependencySets>
|
||||
|
|
|
@ -105,23 +105,5 @@
|
|||
<version>2.0.0-SNAPSHOT</version>
|
||||
<type>nar</type>
|
||||
</dependency>
|
||||
|
||||
<!-- dependencies for jaxb/activation/annotation for running NiFi on Java 11 -->
|
||||
<!-- TODO: remove these once minimum Java version is 11 -->
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
<version>${jakarta.xml.bind-api.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
<version>${jaxb.runtime.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.annotation</groupId>
|
||||
<artifactId>javax.annotation-api</artifactId>
|
||||
<version>1.3.2</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
|
@ -33,21 +33,9 @@
|
|||
<artifactId>validation-api</artifactId>
|
||||
<version>2.0.1.Final</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<!-- This profile provides configuration to allow compiling on JDKs above 1.8. -->
|
||||
<id>jigsaw</id>
|
||||
<activation>
|
||||
<jdk>(1.8,)</jdk>
|
||||
</activation>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
|
|
@ -29,22 +29,13 @@
|
|||
<artifactId>nifi-extension-manifest-model</artifactId>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<!-- This profile provides configuration to allow compiling on JDKs above 1.8. -->
|
||||
<id>jigsaw</id>
|
||||
<activation>
|
||||
<jdk>(1.8,)</jdk>
|
||||
</activation>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
|
|
@ -54,6 +54,10 @@
|
|||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.avro</groupId>
|
||||
<artifactId>avro</artifactId>
|
||||
|
@ -106,24 +110,4 @@
|
|||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<profiles>
|
||||
<profile>
|
||||
<!-- This profile, activating when compiling on Java versions above 1.8, provides configuration changes to
|
||||
allow NiFi to be compiled on those JDKs. -->
|
||||
<id>jigsaw</id>
|
||||
<activation>
|
||||
<jdk>(1.8,)</jdk>
|
||||
</activation>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -72,24 +72,4 @@
|
|||
<version>${prometheus.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<profiles>
|
||||
<profile>
|
||||
<!-- This profile, activating when compiling on Java versions above 1.8, provides configuration changes to
|
||||
allow NiFi to be compiled on those JDKs. -->
|
||||
<id>jigsaw</id>
|
||||
<activation>
|
||||
<jdk>(1.8,)</jdk>
|
||||
</activation>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
|
|
@ -34,16 +34,17 @@
|
|||
</resources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>jaxb2-maven-plugin</artifactId>
|
||||
<groupId>org.jvnet.jaxb2.maven2</groupId>
|
||||
<artifactId>maven-jaxb2-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>current</id>
|
||||
<goals>
|
||||
<goal>xjc</goal>
|
||||
<goal>generate</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<packageName>org.apache.nifi.authorization.generated</packageName>
|
||||
<generatePackage>org.apache.nifi.authorization.generated</generatePackage>
|
||||
<schemaDirectory>src/main/xsd</schemaDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
|
@ -57,60 +58,6 @@
|
|||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<!-- This profile, activating when compiling on Java versions above 1.8, provides configuration changes to
|
||||
allow NiFi to be compiled on those JDKs. -->
|
||||
<id>jigsaw</id>
|
||||
<activation>
|
||||
<jdk>(1.8,)</jdk>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>jaxb2-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>current</id>
|
||||
<configuration>
|
||||
<skipXjc>true</skipXjc>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.jvnet.jaxb2.maven2</groupId>
|
||||
<artifactId>maven-jaxb2-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>current</id>
|
||||
<goals>
|
||||
<goal>generate</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<generatePackage>org.apache.nifi.authorization.generated</generatePackage>
|
||||
<schemaDirectory>src/main/xsd</schemaDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.nifi</groupId>
|
||||
|
@ -156,6 +103,14 @@
|
|||
<groupId>org.apache.nifi</groupId>
|
||||
<artifactId>nifi-property-protection-loader</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Test dependencies -->
|
||||
<dependency>
|
||||
|
|
|
@ -26,35 +26,19 @@
|
|||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.nifi</groupId>
|
||||
<artifactId>nifi-api</artifactId>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.nifi</groupId>
|
||||
<artifactId>nifi-api</artifactId>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.nifi</groupId>
|
||||
<artifactId>c2-protocol-component-api</artifactId>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<profiles>
|
||||
<profile>
|
||||
<!-- This profile, activating when compiling on Java versions above 1.8, provides configuration changes to
|
||||
allow NiFi to be compiled on those JDKs. -->
|
||||
<id>jigsaw</id>
|
||||
<activation>
|
||||
<jdk>(1.8,)</jdk>
|
||||
</activation>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
|
|
@ -32,161 +32,59 @@
|
|||
</resources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>jaxb2-maven-plugin</artifactId>
|
||||
<groupId>org.jvnet.jaxb2.maven2</groupId>
|
||||
<artifactId>maven-jaxb2-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>authorizations</id>
|
||||
<goals>
|
||||
<goal>xjc</goal>
|
||||
<goal>generate</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<sources>
|
||||
<source>src/main/xsd/authorizations.xsd</source>
|
||||
</sources>
|
||||
<packageName>org.apache.nifi.authorization.file.generated</packageName>
|
||||
<generatePackage>org.apache.nifi.authorization.file.generated</generatePackage>
|
||||
<schemaDirectory>src/main/xsd</schemaDirectory>
|
||||
<schemaIncludes>
|
||||
<include>authorizations.xsd</include>
|
||||
</schemaIncludes>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>tenants</id>
|
||||
<goals>
|
||||
<goal>xjc</goal>
|
||||
<goal>generate</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<sources>
|
||||
<source>src/main/xsd/tenants.xsd</source>
|
||||
</sources>
|
||||
<packageName>org.apache.nifi.authorization.file.tenants.generated</packageName>
|
||||
<clearOutputDir>false</clearOutputDir>
|
||||
<generatePackage>org.apache.nifi.authorization.file.tenants.generated</generatePackage>
|
||||
<schemaDirectory>src/main/xsd</schemaDirectory>
|
||||
<schemaIncludes>
|
||||
<include>tenants.xsd</include>
|
||||
</schemaIncludes>
|
||||
<removeOldOutput>false</removeOldOutput>
|
||||
<forceRegenerate>true</forceRegenerate>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>users</id>
|
||||
<goals>
|
||||
<goal>xjc</goal>
|
||||
<goal>generate</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<sources>
|
||||
<source>src/main/xsd/legacy-users.xsd</source>
|
||||
</sources>
|
||||
<packageName>org.apache.nifi.user.generated</packageName>
|
||||
<clearOutputDir>false</clearOutputDir>
|
||||
<generatePackage>org.apache.nifi.user.generated</generatePackage>
|
||||
<schemaDirectory>src/main/xsd</schemaDirectory>
|
||||
<schemaIncludes>
|
||||
<include>legacy-users.xsd</include>
|
||||
</schemaIncludes>
|
||||
<removeOldOutput>false</removeOldOutput>
|
||||
<forceRegenerate>true</forceRegenerate>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<outputDirectory>${project.build.directory}/generated-sources/jaxb</outputDirectory>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
<configuration>
|
||||
<excludes>**/authorization/file/generated/*.java,**/authorization/file/tenants/generated/*.java,**/user/generated/*.java</excludes>
|
||||
<generateDirectory>${project.build.directory}/generated-sources/jaxb</generateDirectory>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<profiles>
|
||||
<profile>
|
||||
<!-- This profile, activating when compiling on Java versions above 1.8, provides configuration changes to
|
||||
allow NiFi to be compiled on those JDKs. -->
|
||||
<id>jigsaw</id>
|
||||
<activation>
|
||||
<jdk>(1.8,)</jdk>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>jaxb2-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>authorizations</id>
|
||||
<configuration>
|
||||
<skipXjc>true</skipXjc>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>tenants</id>
|
||||
<configuration>
|
||||
<skipXjc>true</skipXjc>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>users</id>
|
||||
<configuration>
|
||||
<skipXjc>true</skipXjc>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.jvnet.jaxb2.maven2</groupId>
|
||||
<artifactId>maven-jaxb2-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>authorizations</id>
|
||||
<goals>
|
||||
<goal>generate</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<generatePackage>org.apache.nifi.authorization.file.generated</generatePackage>
|
||||
<schemaDirectory>src/main/xsd</schemaDirectory>
|
||||
<schemaIncludes>
|
||||
<include>authorizations.xsd</include>
|
||||
</schemaIncludes>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>tenants</id>
|
||||
<goals>
|
||||
<goal>generate</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<generatePackage>org.apache.nifi.authorization.file.tenants.generated</generatePackage>
|
||||
<schemaDirectory>src/main/xsd</schemaDirectory>
|
||||
<schemaIncludes>
|
||||
<include>tenants.xsd</include>
|
||||
</schemaIncludes>
|
||||
<removeOldOutput>false</removeOldOutput>
|
||||
<forceRegenerate>true</forceRegenerate>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>users</id>
|
||||
<goals>
|
||||
<goal>generate</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<generatePackage>org.apache.nifi.user.generated</generatePackage>
|
||||
<schemaDirectory>src/main/xsd</schemaDirectory>
|
||||
<schemaIncludes>
|
||||
<include>legacy-users.xsd</include>
|
||||
</schemaIncludes>
|
||||
<removeOldOutput>false</removeOldOutput>
|
||||
<forceRegenerate>true</forceRegenerate>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<generateDirectory>${project.build.directory}/generated-sources/jaxb</generateDirectory>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
</profiles>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.nifi</groupId>
|
||||
|
@ -225,6 +123,14 @@
|
|||
<groupId>org.apache.nifi</groupId>
|
||||
<artifactId>nifi-framework-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
|
|
|
@ -57,6 +57,15 @@
|
|||
<artifactId>nifi-xml-processing</artifactId>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- spring dependencies -->
|
||||
<dependency>
|
||||
|
@ -76,24 +85,4 @@
|
|||
<artifactId>jackson-module-jaxb-annotations</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<profiles>
|
||||
<profile>
|
||||
<!-- This profile, activating when compiling on Java versions above 1.8, provides configuration changes to
|
||||
allow NiFi to be compiled on those JDKs. -->
|
||||
<id>jigsaw</id>
|
||||
<activation>
|
||||
<jdk>(1.8,)</jdk>
|
||||
</activation>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
|
|
@ -122,6 +122,10 @@
|
|||
<groupId>com.fasterxml.jackson.module</groupId>
|
||||
<artifactId>jackson-module-jaxb-annotations</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.squareup.okhttp3</groupId>
|
||||
<artifactId>okhttp</artifactId>
|
||||
|
@ -179,24 +183,4 @@
|
|||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<profiles>
|
||||
<profile>
|
||||
<!-- This profile, activating when compiling on Java versions above 1.8, provides configuration changes to
|
||||
allow NiFi to be compiled on those JDKs. -->
|
||||
<id>jigsaw</id>
|
||||
<activation>
|
||||
<jdk>(1.8,)</jdk>
|
||||
</activation>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
|
|
@ -65,25 +65,9 @@ language governing permissions and limitations under the License. -->
|
|||
<groupId>org.apache.nifi</groupId>
|
||||
<artifactId>nifi-framework-authorization</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<profiles>
|
||||
<profile>
|
||||
<!-- This profile, activating when compiling on Java versions above 1.8, provides configuration changes to
|
||||
allow NiFi to be compiled on those JDKs. -->
|
||||
<id>jigsaw</id>
|
||||
<activation>
|
||||
<jdk>(1.8,)</jdk>
|
||||
</activation>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
|
|
@ -214,6 +214,14 @@
|
|||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.curator</groupId>
|
||||
<artifactId>curator-test</artifactId>
|
||||
|
@ -293,24 +301,4 @@
|
|||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<profiles>
|
||||
<profile>
|
||||
<!-- This profile, activating when compiling on Java versions above 1.8, provides configuration changes to
|
||||
allow NiFi to be compiled on those JDKs. -->
|
||||
<id>jigsaw</id>
|
||||
<activation>
|
||||
<jdk>(1.8,)</jdk>
|
||||
</activation>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
|
|
@ -126,27 +126,15 @@
|
|||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<profiles>
|
||||
<profile>
|
||||
<!-- This profile, activating when compiling on Java versions above 1.8, provides configuration changes to
|
||||
allow NiFi to be compiled on those JDKs. -->
|
||||
<id>jigsaw</id>
|
||||
<activation>
|
||||
<jdk>(1.8,)</jdk>
|
||||
</activation>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
</profiles>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
</dependency>
|
||||
<!--
|
||||
Artifacts that will be on the jetty classpath at runtime either through
|
||||
the application classpath or the maven jetty plugin classpath defined
|
||||
|
|
|
@ -43,16 +43,17 @@
|
|||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>jaxb2-maven-plugin</artifactId>
|
||||
<groupId>org.jvnet.jaxb2.maven2</groupId>
|
||||
<artifactId>maven-jaxb2-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>current</id>
|
||||
<goals>
|
||||
<goal>xjc</goal>
|
||||
<goal>generate</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<packageName>org.apache.nifi.authentication.generated</packageName>
|
||||
<generatePackage>org.apache.nifi.authentication.generated</generatePackage>
|
||||
<schemaDirectory>src/main/xsd</schemaDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
|
@ -75,58 +76,6 @@
|
|||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<profiles>
|
||||
<profile>
|
||||
<!-- This profile, activating when compiling on Java versions above 1.8, provides configuration changes to
|
||||
allow NiFi to be compiled on those JDKs. -->
|
||||
<id>jigsaw</id>
|
||||
<activation>
|
||||
<jdk>(1.8,)</jdk>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>jaxb2-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>current</id>
|
||||
<configuration>
|
||||
<skipXjc>true</skipXjc>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.jvnet.jaxb2.maven2</groupId>
|
||||
<artifactId>maven-jaxb2-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>current</id>
|
||||
<goals>
|
||||
<goal>generate</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<generatePackage>org.apache.nifi.authentication.generated</generatePackage>
|
||||
<schemaDirectory>src/main/xsd</schemaDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
</profiles>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.nifi</groupId>
|
||||
|
@ -200,6 +149,10 @@
|
|||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-context-support</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>javax.servlet-api</artifactId>
|
||||
|
|
|
@ -63,6 +63,10 @@ language governing permissions and limitations under the License. -->
|
|||
<artifactId>grpc-stub</artifactId>
|
||||
<version>${grpc.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.annotation</groupId>
|
||||
<artifactId>javax.annotation-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.nifi</groupId>
|
||||
<artifactId>nifi-mock</artifactId>
|
||||
|
@ -139,21 +143,4 @@ language governing permissions and limitations under the License. -->
|
|||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<!-- This profile, activating when compiling on Java versions above 1.8, provides configuration changes to
|
||||
allow NiFi to be compiled on those JDKs. -->
|
||||
<id>jigsaw</id>
|
||||
<activation>
|
||||
<jdk>(1.8,)</jdk>
|
||||
</activation>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>javax.annotation</groupId>
|
||||
<artifactId>javax.annotation-api</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
|
|
@ -153,6 +153,14 @@
|
|||
<version>2.0.0-SNAPSHOT</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
@ -175,25 +183,4 @@
|
|||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<!-- This profile, activating when compiling on Java versions above 1.8, provides configuration changes to
|
||||
allow NiFi to be compiled on those JDKs. -->
|
||||
<id>jigsaw</id>
|
||||
<activation>
|
||||
<jdk>(1.8,)</jdk>
|
||||
</activation>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
|
|
@ -128,24 +128,4 @@
|
|||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<profiles>
|
||||
<profile>
|
||||
<!-- This profile, activating when compiling on Java versions above 1.8, provides configuration changes to
|
||||
allow NiFi to be compiled on those JDKs. -->
|
||||
<id>jigsaw</id>
|
||||
<activation>
|
||||
<jdk>(1.8,)</jdk>
|
||||
</activation>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -117,24 +117,6 @@
|
|||
</dependency>
|
||||
</dependencies>
|
||||
<profiles>
|
||||
<profile>
|
||||
<!-- This profile, activating when compiling on Java versions above 1.8, provides configuration changes to
|
||||
allow NiFi to be compiled on those JDKs. -->
|
||||
<id>jigsaw</id>
|
||||
<activation>
|
||||
<jdk>(1.8,)</jdk>
|
||||
</activation>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>include-kafka-aws</id>
|
||||
<activation>
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -129,24 +129,6 @@
|
|||
</dependency>
|
||||
</dependencies>
|
||||
<profiles>
|
||||
<profile>
|
||||
<!-- This profile, activating when compiling on Java versions above 1.8, provides configuration changes to
|
||||
allow NiFi to be compiled on those JDKs. -->
|
||||
<id>jigsaw</id>
|
||||
<activation>
|
||||
<jdk>(1.8,)</jdk>
|
||||
</activation>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>include-kafka-aws</id>
|
||||
<activation>
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -52,7 +52,14 @@
|
|||
<groupId>org.glassfish.jersey.inject</groupId>
|
||||
<artifactId>jersey-hk2</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.nifi</groupId>
|
||||
<artifactId>nifi-mock</artifactId>
|
||||
|
@ -60,24 +67,4 @@
|
|||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<profiles>
|
||||
<profile>
|
||||
<!-- This profile, activating when compiling on Java versions above 1.8, provides configuration changes to
|
||||
allow NiFi to be compiled on those JDKs. -->
|
||||
<id>jigsaw</id>
|
||||
<activation>
|
||||
<jdk>(1.8,)</jdk>
|
||||
</activation>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
|
|
@ -115,6 +115,18 @@ language governing permissions and limitations under the License. -->
|
|||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-annotations</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sun.activation</groupId>
|
||||
<artifactId>javax.activation</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jersey.test-framework.providers</groupId>
|
||||
<artifactId>jersey-test-framework-provider-inmemory</artifactId>
|
||||
|
@ -228,29 +240,4 @@ language governing permissions and limitations under the License. -->
|
|||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<profiles>
|
||||
<profile>
|
||||
<!-- This profile, activating when compiling on Java versions above 1.8, provides configuration changes to
|
||||
allow NiFi to be compiled on those JDKs. -->
|
||||
<id>jigsaw</id>
|
||||
<activation>
|
||||
<jdk>(1.8,)</jdk>
|
||||
</activation>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sun.activation</groupId>
|
||||
<artifactId>javax.activation</artifactId>
|
||||
<version>1.2.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
|
|
@ -462,6 +462,14 @@
|
|||
<groupId>org.apache.nifi</groupId>
|
||||
<artifactId>nifi-oauth2-provider-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.sshd</groupId>
|
||||
<artifactId>sshd-core</artifactId>
|
||||
|
@ -747,45 +755,4 @@
|
|||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<profiles>
|
||||
<profile>
|
||||
<!-- Custom profile for tests requiring large heap operations -->
|
||||
<id>expensive-heap-tests</id>
|
||||
<activation>
|
||||
<property>
|
||||
<name>heap</name>
|
||||
<value>expensive</value>
|
||||
</property>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<argLine>-Xmx3072M</argLine>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
<profile>
|
||||
<!-- This profile, activating when compiling on Java versions above 1.8, provides configuration changes to
|
||||
allow NiFi to be compiled on those JDKs. -->
|
||||
<id>jigsaw</id>
|
||||
<activation>
|
||||
<jdk>(1.8,)</jdk>
|
||||
</activation>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
|
|
@ -102,6 +102,10 @@
|
|||
<groupId>commons-logging</groupId>
|
||||
<artifactId>commons-logging</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>jdk.tools</groupId>
|
||||
<artifactId>jdk.tools</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
|
@ -135,47 +139,4 @@
|
|||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<!-- This profile, activating when compiling on Java versions above 1.8, provides configuration changes to
|
||||
allow NiFi to be compiled on those JDKs. -->
|
||||
<id>jigsaw</id>
|
||||
<activation>
|
||||
<jdk>(1.8,)</jdk>
|
||||
</activation>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.hbase</groupId>
|
||||
<artifactId>hbase-client</artifactId>
|
||||
<version>${hbase.version}</version>
|
||||
<exclusions>
|
||||
<!-- Need to re-list exclusions here, plus add jdk.tools for Java 9+, since it doesn't need
|
||||
to be imported in those JDKs.
|
||||
See https://openjdk.java.net/jeps/220 -->
|
||||
<exclusion>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>com.google.code.findbugs</groupId>
|
||||
<artifactId>jsr305</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>jdk.tools</groupId>
|
||||
<artifactId>jdk.tools</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>commons-logging</groupId>
|
||||
<artifactId>commons-logging</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
|
|
@ -99,6 +99,10 @@
|
|||
<groupId>commons-logging</groupId>
|
||||
<artifactId>commons-logging</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>jdk.tools</groupId>
|
||||
<artifactId>jdk.tools</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
@ -130,47 +134,4 @@
|
|||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<!-- This profile, activating when compiling on Java versions above 1.8, provides configuration changes to
|
||||
allow NiFi to be compiled on those JDKs. -->
|
||||
<id>jigsaw</id>
|
||||
<activation>
|
||||
<jdk>(1.8,)</jdk>
|
||||
</activation>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.hbase</groupId>
|
||||
<artifactId>hbase-client</artifactId>
|
||||
<version>${hbase.version}</version>
|
||||
<exclusions>
|
||||
<!-- Need to re-list exclusions here, plus add jdk.tools for Java 9+, since it doesn't need
|
||||
to be imported in those JDKs.
|
||||
See https://openjdk.java.net/jeps/220 -->
|
||||
<exclusion>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>com.google.code.findbugs</groupId>
|
||||
<artifactId>jsr305</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>jdk.tools</groupId>
|
||||
<artifactId>jdk.tools</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>commons-logging</groupId>
|
||||
<artifactId>commons-logging</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
|
|
@ -43,20 +43,6 @@
|
|||
<include>*:slf4j-api</include>
|
||||
</includes>
|
||||
</dependencySet>
|
||||
|
||||
<!-- Write out the bootstrap libs for java11 to its own dir -->
|
||||
<!-- TODO: remove this dependency set once minimum Java version is 11 -->
|
||||
<dependencySet>
|
||||
<scope>runtime</scope>
|
||||
<useProjectArtifact>false</useProjectArtifact>
|
||||
<outputDirectory>./java11</outputDirectory>
|
||||
<directoryMode>0770</directoryMode>
|
||||
<fileMode>0664</fileMode>
|
||||
<useTransitiveFiltering>true</useTransitiveFiltering>
|
||||
<includes>
|
||||
<include>jakarta.xml.bind:jakarta.xml.bind-api</include>
|
||||
</includes>
|
||||
</dependencySet>
|
||||
</dependencySets>
|
||||
|
||||
</assembly>
|
||||
|
|
|
@ -28,25 +28,13 @@
|
|||
<artifactId>nifi-xml-processing</artifactId>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<profiles>
|
||||
<profile>
|
||||
<!-- This profile, activating when compiling on Java versions above 1.8, provides configuration changes to
|
||||
allow NiFi to be compiled on those JDKs. -->
|
||||
<id>jigsaw</id>
|
||||
<activation>
|
||||
<jdk>(1.8,)</jdk>
|
||||
</activation>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
|
|
@ -46,26 +46,6 @@
|
|||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<profiles>
|
||||
<profile>
|
||||
<!-- This profile, activating when compiling on Java versions above 1.8, provides configuration changes to
|
||||
allow NiFi to be compiled on those JDKs. -->
|
||||
<id>jigsaw</id>
|
||||
<activation>
|
||||
<jdk>(1.8,)</jdk>
|
||||
</activation>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
</profiles>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.nifi</groupId>
|
||||
|
@ -98,6 +78,14 @@
|
|||
<artifactId>nifi-expression-language</artifactId>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>javax.servlet-api</artifactId>
|
||||
|
|
|
@ -149,16 +149,6 @@
|
|||
<scope>runtime</scope>
|
||||
<type>zip</type>
|
||||
</dependency>
|
||||
<!-- Dependencies required for running on Java 11 that will be placed in the lib/java11 dir -->
|
||||
<!-- TODO: remove these once minimum Java version is 11 and these can be bundle directly into the application -->
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
</dependency>
|
||||
<!-- Dependencies for sensitive properties providers that will be written out to lib/spp and excluded from lib -->
|
||||
<dependency>
|
||||
<groupId>org.apache.nifi.registry</groupId>
|
||||
|
|
|
@ -68,22 +68,6 @@
|
|||
</includes>
|
||||
</dependencySet>
|
||||
|
||||
<!-- Write out the libs for java11 to its own dir -->
|
||||
<!-- TODO: remove these once minimum Java version is 11 and these can be bundle directly into the application -->
|
||||
<dependencySet>
|
||||
<scope>runtime</scope>
|
||||
<useProjectArtifact>false</useProjectArtifact>
|
||||
<outputDirectory>lib/java11</outputDirectory>
|
||||
<directoryMode>0770</directoryMode>
|
||||
<fileMode>0664</fileMode>
|
||||
<useTransitiveFiltering>true</useTransitiveFiltering>
|
||||
<includes>
|
||||
<include>jakarta.xml.bind:jakarta.xml.bind-api</include>
|
||||
<include>org.glassfish.jaxb:jaxb-runtime</include>
|
||||
<include>jakarta.activation:jakarta.activation-api</include>
|
||||
</includes>
|
||||
</dependencySet>
|
||||
|
||||
<!-- Write out all dependency artifacts to lib directory -->
|
||||
<dependencySet>
|
||||
<scope>runtime</scope>
|
||||
|
@ -100,11 +84,6 @@
|
|||
<exclude>*:nifi-registry-ranger-assembly</exclude>
|
||||
<exclude>*:nifi-registry-aws-assembly</exclude>
|
||||
<exclude>*:nifi-registry-properties-loader</exclude>
|
||||
|
||||
<!-- Exclude any jaxb dependencies because they will be in lib/java11 -->
|
||||
<!-- TODO: remove these once minimum Java version is 11 and these can be bundle directly into the application -->
|
||||
<exclude>jakarta.xml.bind:jakarta.xml.bind-api</exclude>
|
||||
<exclude>org.glassfish.jaxb:jaxb-runtime</exclude>
|
||||
</excludes>
|
||||
</dependencySet>
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -31,26 +31,10 @@
|
|||
<artifactId>nifi-extension-manifest-parser</artifactId>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<!-- This profile provides configuration to allow NiFi Registry to be compiled on JDKs above 1.8. -->
|
||||
<id>jigsaw</id>
|
||||
<activation>
|
||||
<jdk>(1.8,)</jdk>
|
||||
</activation>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
|
|
@ -33,6 +33,10 @@
|
|||
<groupId>javax.ws.rs</groupId>
|
||||
<artifactId>javax.ws.rs-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.nifi</groupId>
|
||||
<artifactId>nifi-api</artifactId>
|
||||
|
@ -49,20 +53,4 @@
|
|||
<version>2.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<!-- This profile provides configuration to allow NiFi Registry to be compiled on JDKs above 1.8. -->
|
||||
<id>jigsaw</id>
|
||||
<activation>
|
||||
<jdk>(1.8,)</jdk>
|
||||
</activation>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
|
|
@ -451,25 +451,13 @@
|
|||
<artifactId>nifi-property-protection-api</artifactId>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<!-- This profile provides configuration to allow NiFi Registry to be compiled on JDKs above 1.8. -->
|
||||
<id>jigsaw</id>
|
||||
<activation>
|
||||
<jdk>(1.8,)</jdk>
|
||||
</activation>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
|
|
@ -223,62 +223,6 @@
|
|||
</plugins>
|
||||
</build>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>no-swagger-ui</id>
|
||||
<!-- Activate this profile with "-P no-swagger-ui" to disable the Swagger UI
|
||||
static assets from being downloaded and bundled with the web api WAR. -->
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>com.googlecode.maven-download-plugin</groupId>
|
||||
<artifactId>download-maven-plugin</artifactId>
|
||||
<version>1.2.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>download-swagger-ui</id>
|
||||
<phase>none</phase>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<version>1.8</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>bundle-swagger-ui</id>
|
||||
<phase>none</phase>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
<profile>
|
||||
<!-- This profile provides configuration to allow NiFi Registry to be compiled on JDKs above 1.8. -->
|
||||
<id>jigsaw</id>
|
||||
<activation>
|
||||
<jdk>(1.8,)</jdk>
|
||||
</activation>
|
||||
<!-- These dependencies would normally be transitive deps of framework and data model, but we want to
|
||||
redeclare them with provided scope so that they don't end up in WEB-INF/lib of the WAR, they will
|
||||
be added to the lib/java11 directory and added to the classpath based on the JVM being used -->
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
@ -396,6 +340,14 @@
|
|||
<artifactId>javax.servlet-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
|
|
|
@ -106,17 +106,6 @@
|
|||
<version>${jetty.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<!-- lib/java11 -->
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
<version>${jaxb.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
<version>${jaxb.version}</version>
|
||||
</dependency>
|
||||
<!-- NiFi Registry Modules -->
|
||||
<dependency>
|
||||
<groupId>org.apache.nifi.registry</groupId>
|
||||
|
@ -478,39 +467,5 @@
|
|||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
<profile>
|
||||
<!-- This profile will disable DocLint which performs strict
|
||||
JavaDoc processing which was introduced in JDK 8, which is required to build nifi-registry.
|
||||
These are technically errors in the JavaDoc, which we need to eventually address.
|
||||
However, without this, artifact generation currently fails. -->
|
||||
<id>disable-doclint</id>
|
||||
<activation>
|
||||
<activeByDefault>true</activeByDefault>
|
||||
</activation>
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<configuration>
|
||||
<doclint>none</doclint>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
</profile>
|
||||
<profile>
|
||||
<!-- This profile provides configuration to allow NiFi Registry to be compiled on JDKs above 1.8. -->
|
||||
<id>jigsaw</id>
|
||||
<activation>
|
||||
<jdk>(1.8,)</jdk>
|
||||
</activation>
|
||||
<properties>
|
||||
<maven.compiler.source>11</maven.compiler.source>
|
||||
<maven.compiler.target>11</maven.compiler.target>
|
||||
</properties>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
|
|
@ -125,24 +125,6 @@
|
|||
<type>nar</type>
|
||||
</dependency>
|
||||
|
||||
<!-- dependencies for jaxb/activation/annotation for running NiFi on Java 11 -->
|
||||
<!-- TODO: remove these once minimum Java version is 11 -->
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
<version>${jakarta.xml.bind-api.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
<version>${jaxb.runtime.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.annotation</groupId>
|
||||
<artifactId>javax.annotation-api</artifactId>
|
||||
<version>1.3.2</version>
|
||||
</dependency>
|
||||
|
||||
<!-- AspectJ library needed by the Java Agent used for native library loading -->
|
||||
<dependency>
|
||||
<groupId>org.aspectj</groupId>
|
||||
|
|
|
@ -30,24 +30,6 @@
|
|||
</includes>
|
||||
</dependencySet>
|
||||
|
||||
<!-- Write out the libs for java11 to its own directory -->
|
||||
<!-- TODO: remove this dependency set once minimum Java version is 11 -->
|
||||
<dependencySet>
|
||||
<scope>runtime</scope>
|
||||
<useProjectArtifact>false</useProjectArtifact>
|
||||
<outputDirectory>lib/java11</outputDirectory>
|
||||
<directoryMode>0770</directoryMode>
|
||||
<fileMode>0664</fileMode>
|
||||
<useTransitiveFiltering>true</useTransitiveFiltering>
|
||||
<includes>
|
||||
<include>org.glassfish.jaxb:jaxb-runtime</include>
|
||||
<include>jakarta.xml.bind:jakarta.xml.bind-api</include>
|
||||
<include>javax.annotation:javax.annotation-api</include>
|
||||
<include>com.sun.activation:jakarta.activation</include>
|
||||
<include>jakarta.activation:jakarta.activation-api</include>
|
||||
</includes>
|
||||
</dependencySet>
|
||||
|
||||
<!-- Write out the conf directory contents -->
|
||||
<dependencySet>
|
||||
<scope>runtime</scope>
|
||||
|
|
|
@ -33,14 +33,7 @@
|
|||
<useTransitiveFiltering>true</useTransitiveFiltering>
|
||||
<excludes>
|
||||
<exclude>*:nifi-stateless-resources</exclude>
|
||||
|
||||
<!-- exclude jaxb/activation/annotation libs from lib, they'll be included in the java11 subdir -->
|
||||
<!-- TODO: remove these once minimum Java version is 11 -->
|
||||
<exclude>org.glassfish.jaxb:jaxb-runtime</exclude>
|
||||
<exclude>jakarta.xml.bind:jakarta.xml.bind-api</exclude>
|
||||
<exclude>javax.annotation:javax.annotation-api</exclude>
|
||||
|
||||
<!-- exclude AspectJ library from lib, it'll be included in the aspectj subdir -->
|
||||
<!-- exclude AspectJ library from lib included in the aspectj subdir -->
|
||||
<exclude>org.aspectj:aspectjweaver</exclude>
|
||||
</excludes>
|
||||
</dependencySet>
|
||||
|
|
|
@ -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<File> javaHomeFiles = findJavaHomeFiles();
|
||||
final Set<String> javaHomeFilenames = new HashSet<>();
|
||||
for (final File file : javaHomeFiles) {
|
||||
|
|
|
@ -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<URL> 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));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,24 +48,6 @@
|
|||
<version>2.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Java 11 Dependencies -->
|
||||
<!-- TODO: remove these once minimum Java version is 11 -->
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
<version>${jakarta.xml.bind-api.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
<version>${jaxb.runtime.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.annotation</groupId>
|
||||
<artifactId>javax.annotation-api</artifactId>
|
||||
<version>1.3.2</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Optional Dependencies -->
|
||||
<dependency>
|
||||
<groupId>org.apache.nifi</groupId>
|
||||
|
|
|
@ -31,29 +31,8 @@
|
|||
<excludes>
|
||||
<exclude>*:jackson-core</exclude>
|
||||
<exclude>*:jackson-databind</exclude>
|
||||
|
||||
<!-- TODO: remove these once minimum Java version is 11 -->
|
||||
<exclude>org.glassfish.jaxb:jaxb-runtime</exclude>
|
||||
<exclude>jakarta.xml.bind:jakarta.xml.bind-api</exclude>
|
||||
<exclude>javax.annotation:javax.annotation-api</exclude>
|
||||
</excludes>
|
||||
</dependencySet>
|
||||
|
||||
<!-- Write out the libs for java11 to its own directory -->
|
||||
<!-- TODO: remove this dependency set once minimum Java version is 11 -->
|
||||
<dependencySet>
|
||||
<scope>runtime</scope>
|
||||
<useProjectArtifact>false</useProjectArtifact>
|
||||
<outputDirectory>nars/java11</outputDirectory>
|
||||
<directoryMode>0770</directoryMode>
|
||||
<fileMode>0664</fileMode>
|
||||
<useTransitiveFiltering>true</useTransitiveFiltering>
|
||||
<includes>
|
||||
<include>org.glassfish.jaxb:jaxb-runtime</include>
|
||||
<include>jakarta.xml.bind:jakarta.xml.bind-api</include>
|
||||
<include>javax.annotation:javax.annotation-api</include>
|
||||
</includes>
|
||||
</dependencySet>
|
||||
</dependencySets>
|
||||
|
||||
</assembly>
|
||||
|
|
|
@ -241,23 +241,5 @@
|
|||
<classifier>assembly</classifier>
|
||||
<type>zip</type>
|
||||
</dependency>
|
||||
|
||||
<!-- dependencies for jaxb/activation/annotation for running NiFi on Java 11 -->
|
||||
<!-- TODO: remove these once minimum Java version is 11 -->
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
<version>${jakarta.xml.bind-api.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
<version>${jaxb.runtime.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.annotation</groupId>
|
||||
<artifactId>javax.annotation-api</artifactId>
|
||||
<version>1.3.2</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
|
@ -38,24 +38,6 @@
|
|||
</includes>
|
||||
</dependencySet>
|
||||
|
||||
<!-- Write out the bootstrap libs for java11 to its own dir -->
|
||||
<!-- TODO: remove this dependency set once minimum Java version is 11 -->
|
||||
<dependencySet>
|
||||
<scope>runtime</scope>
|
||||
<useProjectArtifact>false</useProjectArtifact>
|
||||
<outputDirectory>lib/java11</outputDirectory>
|
||||
<directoryMode>0770</directoryMode>
|
||||
<fileMode>0664</fileMode>
|
||||
<useTransitiveFiltering>true</useTransitiveFiltering>
|
||||
<includes>
|
||||
<include>org.glassfish.jaxb:jaxb-runtime</include>
|
||||
<include>jakarta.xml.bind:jakarta.xml.bind-api</include>
|
||||
<include>javax.annotation:javax.annotation-api</include>
|
||||
<include>com.sun.activation:jakarta.activation</include>
|
||||
<include>jakarta.activation:jakarta.activation-api</include>
|
||||
</includes>
|
||||
</dependencySet>
|
||||
|
||||
<!-- Write out all dependency artifacts to lib directory -->
|
||||
<dependencySet>
|
||||
<scope>runtime</scope>
|
||||
|
@ -78,12 +60,6 @@
|
|||
<exclude>*:nifi-security-utils-api</exclude>
|
||||
<exclude>*:nifi-xml-processing</exclude>
|
||||
<exclude>*:nifi-nar-provider-assembly</exclude>
|
||||
|
||||
<!-- exclude jaxb/activation/annotation libs from lib, they'll be included in the java11 subdir -->
|
||||
<!-- TODO: remove these once minimum Java version is 11 -->
|
||||
<exclude>org.glassfish.jaxb:jaxb-runtime</exclude>
|
||||
<exclude>jakarta.xml.bind:jakarta.xml.bind-api</exclude>
|
||||
<exclude>javax.annotation:javax.annotation-api</exclude>
|
||||
</excludes>
|
||||
</dependencySet>
|
||||
</dependencySets>
|
||||
|
|
|
@ -136,6 +136,14 @@ language governing permissions and limitations under the License. -->
|
|||
<artifactId>commons-compress</artifactId>
|
||||
<version>1.21</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
</dependency>
|
||||
<!-- Spock testing dependencies-->
|
||||
<dependency>
|
||||
<groupId>com.github.stefanbirkner</groupId>
|
||||
|
@ -229,25 +237,4 @@ language governing permissions and limitations under the License. -->
|
|||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<!-- This profile, activating when compiling on Java versions above 1.8, provides configuration changes to
|
||||
allow NiFi to be compiled on those JDKs. -->
|
||||
<id>jigsaw</id>
|
||||
<activation>
|
||||
<jdk>(1.8,)</jdk>
|
||||
</activation>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
|
|
@ -58,6 +58,10 @@ language governing permissions and limitations under the License. -->
|
|||
<groupId>com.fasterxml.jackson.datatype</groupId>
|
||||
<artifactId>jackson-datatype-jsr310</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.annotation</groupId>
|
||||
<artifactId>javax.annotation-api</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<!--
|
||||
|
@ -115,20 +119,4 @@ language governing permissions and limitations under the License. -->
|
|||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<profiles>
|
||||
<profile>
|
||||
<!-- This profile, activating when compiling on Java versions above 1.8, provides configuration changes to
|
||||
allow NiFi to be compiled on those JDKs. -->
|
||||
<id>jigsaw</id>
|
||||
<activation>
|
||||
<jdk>(1.8,)</jdk>
|
||||
</activation>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>javax.annotation</groupId>
|
||||
<artifactId>javax.annotation-api</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
|
|
@ -113,24 +113,6 @@ language governing permissions and limitations under the License. -->
|
|||
<artifactId>javax.servlet-api</artifactId>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- dependencies for jaxb/activation/annotation for running NiFi on Java 11 -->
|
||||
<!-- TODO: remove these once minimum Java version is 11 -->
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
<version>${jakarta.xml.bind-api.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
<version>${jaxb.runtime.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.annotation</groupId>
|
||||
<artifactId>javax.annotation-api</artifactId>
|
||||
<version>1.3.2</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
|
|
|
@ -32,28 +32,6 @@
|
|||
<useProjectArtifact>false</useProjectArtifact>
|
||||
<directoryMode>0770</directoryMode>
|
||||
<fileMode>0660</fileMode>
|
||||
<excludes>
|
||||
<!-- exclude jaxb/activation libs from lib, they'll be included in the java11 subdir -->
|
||||
<!-- TODO: remove these once minimum Java version is 11 -->
|
||||
<exclude>org.glassfish.jaxb:jaxb-runtime</exclude>
|
||||
<exclude>jakarta.xml.bind:jakarta.xml.bind-api</exclude>
|
||||
</excludes>
|
||||
</dependencySet>
|
||||
<!-- Write out the bootstrap libs for java11 to its own dir -->
|
||||
<!-- TODO: remove this dependency set once minimum Java version is 11 -->
|
||||
<dependencySet>
|
||||
<scope>runtime</scope>
|
||||
<useProjectArtifact>false</useProjectArtifact>
|
||||
<outputDirectory>lib/java11</outputDirectory>
|
||||
<directoryMode>0770</directoryMode>
|
||||
<fileMode>0664</fileMode>
|
||||
<useTransitiveFiltering>true</useTransitiveFiltering>
|
||||
<includes>
|
||||
<include>org.glassfish.jaxb:jaxb-runtime</include>
|
||||
<include>jakarta.xml.bind:jakarta.xml.bind-api</include>
|
||||
<include>com.sun.activation:jakarta.activation</include>
|
||||
<include>jakarta.activation:jakarta.activation-api</include>
|
||||
</includes>
|
||||
</dependencySet>
|
||||
</dependencySets>
|
||||
|
||||
|
@ -69,15 +47,6 @@
|
|||
<outputDirectory>conf/</outputDirectory>
|
||||
<fileMode>0600</fileMode>
|
||||
</fileSet>
|
||||
<!--<fileSet>-->
|
||||
<!--<directory>${project.build.directory}/nifi-resources/src/main/resources/conf</directory>-->
|
||||
<!--<outputDirectory>conf/</outputDirectory>-->
|
||||
<!--<fileMode>0600</fileMode>-->
|
||||
<!--<includes>-->
|
||||
<!--<include>nifi.properties</include>-->
|
||||
<!--<include>bootstrap.conf</include>-->
|
||||
<!--</includes>-->
|
||||
<!--</fileSet>-->
|
||||
<fileSet>
|
||||
<directory>${project.basedir}/src/main/resources/classpath</directory>
|
||||
<outputDirectory>classpath/</outputDirectory>
|
||||
|
|
|
@ -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:"=%
|
||||
|
|
|
@ -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 "$@"
|
||||
|
|
|
@ -81,54 +81,4 @@
|
|||
<artifactId>slf4j-simple</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<profiles>
|
||||
<profile>
|
||||
<!-- This profile, activating when compiling on Java versions above
|
||||
1.8, provides configuration changes to allow NiFi to be compiled on those
|
||||
JDKs. -->
|
||||
<id>jigsaw</id>
|
||||
<activation>
|
||||
<jdk>(1.8,)</jdk>
|
||||
</activation>
|
||||
<properties>
|
||||
<maven.compiler.source>11</maven.compiler.source>
|
||||
<maven.compiler.target>11</maven.compiler.target>
|
||||
</properties>
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.jvnet.jaxb2.maven2</groupId>
|
||||
<artifactId>maven-jaxb2-plugin</artifactId>
|
||||
<version>0.14.0</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
<version>${jakarta.xml.bind-api.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
<version>${jaxb.runtime.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sun.activation</groupId>
|
||||
<artifactId>javax.activation</artifactId>
|
||||
<version>1.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.annotation</groupId>
|
||||
<artifactId>javax.annotation-api</artifactId>
|
||||
<version>1.3.2</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
|
105
pom.xml
105
pom.xml
|
@ -687,7 +687,26 @@
|
|||
<scope>import</scope>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
<version>${jakarta.xml.bind-api.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
<version>${jaxb.runtime.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sun.activation</groupId>
|
||||
<artifactId>javax.activation</artifactId>
|
||||
<version>1.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.annotation</groupId>
|
||||
<artifactId>javax.annotation-api</artifactId>
|
||||
<version>1.3.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jsoup</groupId>
|
||||
<artifactId>jsoup</artifactId>
|
||||
|
@ -815,6 +834,7 @@
|
|||
<quiet>true</quiet>
|
||||
<javadocVersion>1.8</javadocVersion>
|
||||
<additionalJOption>-J-Xmx512m</additionalJOption>
|
||||
<doclint>none</doclint>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
|
@ -949,6 +969,14 @@
|
|||
<nexusUrl>https://repository.apache.org/</nexusUrl>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.jvnet.jaxb2.maven2</groupId>
|
||||
<artifactId>maven-jaxb2-plugin</artifactId>
|
||||
<version>0.14.0</version>
|
||||
<configuration>
|
||||
<noFileHeader>true</noFileHeader>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-enforcer-plugin</artifactId>
|
||||
|
@ -1107,81 +1135,6 @@
|
|||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
<profile>
|
||||
<!-- This profile will disable DocLint which performs strict
|
||||
JavaDoc processing which was introduced in JDK 8. These are technically errors
|
||||
in the JavaDoc which we need to eventually address. However, if a release
|
||||
is performed using JDK 8 or newer, the JavaDoc generation would fail. By activating
|
||||
this profile when running on JDK 8 or newer we can ensure the JavaDocs continue to
|
||||
generate successfully -->
|
||||
<id>disable-doclint</id>
|
||||
<activation>
|
||||
<jdk>[1.8,)</jdk>
|
||||
</activation>
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<configuration>
|
||||
<additionalparam>-Xdoclint:none</additionalparam>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
</profile>
|
||||
<profile>
|
||||
<!-- This profile, activating when compiling on Java versions above 1.8, provides configuration changes to
|
||||
allow NiFi to be compiled on those JDKs. -->
|
||||
<id>jigsaw</id>
|
||||
<activation>
|
||||
<jdk>(1.8,)</jdk>
|
||||
</activation>
|
||||
<properties>
|
||||
<maven.compiler.source>11</maven.compiler.source>
|
||||
<maven.compiler.target>11</maven.compiler.target>
|
||||
</properties>
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.jvnet.jaxb2.maven2</groupId>
|
||||
<artifactId>maven-jaxb2-plugin</artifactId>
|
||||
<version>0.14.0</version>
|
||||
<configuration>
|
||||
<noFileHeader>true</noFileHeader>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
<version>${jakarta.xml.bind-api.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
<version>${jaxb.runtime.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sun.activation</groupId>
|
||||
<artifactId>javax.activation</artifactId>
|
||||
<version>1.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.annotation</groupId>
|
||||
<artifactId>javax.annotation-api</artifactId>
|
||||
<version>1.3.2</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
</profile>
|
||||
<profile>
|
||||
<!-- Run "mvn validate -P dependency-check" to generate dependency-check-report.html in the target directory -->
|
||||
<!-- Report results require detailed analysis to determine whether the vulnerability impacts the application -->
|
||||
|
|
Loading…
Reference in New Issue