NIFI-12511 Corrected lib Directory Assembly Configuration

- Moved JAR libraries to core.xml configuration using include strategy
- Added NAR bundles section to common.xml dependencies

Signed-off-by: Pierre Villard <pierre.villard.fr@gmail.com>

This closes #8155.
This commit is contained in:
exceptionfactory 2023-12-13 10:39:56 -06:00 committed by Pierre Villard
parent 2691ad0451
commit 23d2d97aab
No known key found for this signature in database
GPG Key ID: F92A93B30C07C6D5
4 changed files with 61 additions and 41 deletions

View File

@ -190,6 +190,15 @@
</unpackOptions>
</dependencySet>
<!-- NAR bundles -->
<dependencySet>
<outputDirectory>lib</outputDirectory>
<useProjectArtifact>false</useProjectArtifact>
<useTransitiveDependencies>false</useTransitiveDependencies>
<includes>
<include>org.apache.nifi:*:nar</include>
</includes>
</dependencySet>
</dependencySets>
<fileSets>
<fileSet>

View File

@ -0,0 +1,50 @@
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<component>
<dependencySets>
<!-- Core libraries -->
<dependencySet>
<outputDirectory>lib</outputDirectory>
<directoryMode>0770</directoryMode>
<fileMode>0664</fileMode>
<useProjectArtifact>false</useProjectArtifact>
<includes>
<!-- Logging -->
<include>org.slf4j:slf4j-api</include>
<include>org.slf4j:log4j-over-slf4j</include>
<include>org.slf4j:jcl-over-slf4j</include>
<include>org.slf4j:jul-to-slf4j</include>
<include>ch.qos.logback:logback-classic</include>
<include>ch.qos.logback:logback-core</include>
<!-- Servlet API -->
<include>javax.servlet:javax.servlet-api</include>
<include>org.eclipse.jetty.toolchain:jetty-schemas</include>
<!-- Apache NiFi -->
<include>org.apache.nifi:nifi-api</include>
<include>org.apache.nifi:nifi-framework-api</include>
<include>org.apache.nifi:nifi-nar-utils</include>
<include>org.apache.nifi:nifi-per-process-group-logging</include>
<include>org.apache.nifi:nifi-properties</include>
<include>org.apache.nifi:nifi-property-utils</include>
<include>org.apache.nifi:nifi-python-framework-api</include>
<include>org.apache.nifi:nifi-runtime</include>
<include>org.apache.nifi:nifi-server-api</include>
<include>org.apache.nifi:nifi-stateless-api</include>
<include>org.apache.nifi:nifi-stateless-bootstrap</include>
</includes>
</dependencySet>
</dependencySets>
</component>

View File

@ -19,30 +19,7 @@
<baseDirectory>nifi-${project.version}</baseDirectory>
<componentDescriptors>
<componentDescriptor>src/main/assembly/core.xml</componentDescriptor>
<componentDescriptor>src/main/assembly/common.xml</componentDescriptor>
</componentDescriptors>
<dependencySets>
<!-- Write out all dependency artifacts to lib directory -->
<dependencySet>
<scope>runtime</scope>
<useProjectArtifact>false</useProjectArtifact>
<outputDirectory>lib</outputDirectory>
<directoryMode>0770</directoryMode>
<fileMode>0664</fileMode>
<useTransitiveFiltering>true</useTransitiveFiltering>
<excludes>
<exclude>*:nifi-bootstrap</exclude>
<exclude>*:nifi-property-protection-api</exclude>
<exclude>*:nifi-property-protection-factory</exclude>
<exclude>*:nifi-resources</exclude>
<exclude>*:nifi-docs</exclude>
<exclude>*:nifi-single-user-utils</exclude>
<exclude>*:nifi-flow-encryptor</exclude>
<!-- exclude AspectJ library from lib included in the aspectj subdir -->
<exclude>org.aspectj:aspectjweaver</exclude>
</excludes>
</dependencySet>
</dependencySets>
</assembly>

View File

@ -24,27 +24,11 @@
<baseDirectory>nifi-${project.version}</baseDirectory>
<componentDescriptors>
<componentDescriptor>src/main/assembly/core.xml</componentDescriptor>
<componentDescriptor>src/main/assembly/common.xml</componentDescriptor>
</componentDescriptors>
<dependencySets>
<!-- Write out all dependency artifacts to lib directory, exclude Ranger dependencies -->
<dependencySet>
<scope>runtime</scope>
<useProjectArtifact>false</useProjectArtifact>
<outputDirectory>lib</outputDirectory>
<directoryMode>0770</directoryMode>
<fileMode>0660</fileMode>
<useTransitiveFiltering>true</useTransitiveFiltering>
<excludes>
<exclude>*:nifi-bootstrap</exclude>
<exclude>*:nifi-property-protection-api</exclude>
<exclude>*:nifi-property-protection-factory</exclude>
<exclude>*:nifi-resources</exclude>
<exclude>*:nifi-docs</exclude>
<exclude>org.apache.nifi:nifi-ranger-resources:jar</exclude>
</excludes>
</dependencySet>
<!-- Write out dependencies for Ranger's credentialbuilder to ext/ranger/install/lib -->
<dependencySet>
<scope>runtime</scope>