NIFI-9378 Create new artifact in nifi-assembly that packages all exte… (#5521)

* NIFI-9378 Create new artifact in nifi-assembly that packages all extension manifests

* Minor changes to clean up manifest zip creation

This closes #5521
This commit is contained in:
Bryan Bende 2021-11-17 14:38:26 -05:00 committed by GitHub
parent 5016eac010
commit 18fc492e4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 88 additions and 12 deletions

View File

@ -21,12 +21,33 @@ language governing permissions and limitations under the License. -->
<description>This is the assembly Apache NiFi</description>
<build>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>extract-extension-manifests</id>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<includeTypes>nar</includeTypes>
<includes>**/extension-manifest.xml</includes>
<excludeTransitive>false</excludeTransitive>
<outputDirectory>${project.build.directory}/extension-manifests</outputDirectory>
<useSubDirectoryPerArtifact>true</useSubDirectoryPerArtifact>
<stripClassifier>true</stripClassifier>
<stripVersion>true</stripVersion>
<silent>true</silent>
<fileMappers>
<org.codehaus.plexus.components.io.filemappers.FlattenFileMapper />
</fileMappers>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<finalName>nifi-${project.version}</finalName>
<attach>false</attach>
</configuration>
<executions>
<execution>
<id>make shared resource</id>
@ -35,6 +56,8 @@ language governing permissions and limitations under the License. -->
</goals>
<phase>package</phase>
<configuration>
<finalName>nifi-${project.version}</finalName>
<attach>false</attach>
<archiverConfig>
<defaultDirectoryMode>0775</defaultDirectoryMode>
<directoryMode>0775</directoryMode>
@ -51,6 +74,29 @@ language governing permissions and limitations under the License. -->
</formats>
</configuration>
</execution>
<execution>
<id>make-extension-manifest-assembly</id>
<goals>
<goal>single</goal>
</goals>
<phase>package</phase>
<configuration>
<finalName>nifi-${project.version}</finalName>
<attach>true</attach>
<archiverConfig>
<defaultDirectoryMode>0775</defaultDirectoryMode>
<directoryMode>0775</directoryMode>
<fileMode>0664</fileMode>
</archiverConfig>
<descriptors>
<descriptor>src/main/assembly/extension-manifests.xml</descriptor>
</descriptors>
<tarLongFileMode>posix</tarLongFileMode>
<formats>
<format>zip</format>
</formats>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
@ -1335,10 +1381,6 @@ language governing permissions and limitations under the License. -->
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<finalName>nifi-${project.version}</finalName>
<attach>false</attach>
</configuration>
<executions>
<execution>
<id>make shared resource</id>
@ -1347,6 +1389,8 @@ language governing permissions and limitations under the License. -->
</goals>
<phase>package</phase>
<configuration>
<finalName>nifi-${project.version}</finalName>
<attach>false</attach>
<archiverConfig>
<defaultDirectoryMode>0775</defaultDirectoryMode>
<directoryMode>0775</directoryMode>
@ -1401,10 +1445,6 @@ language governing permissions and limitations under the License. -->
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<finalName>nifi-${project.version}</finalName>
<attach>false</attach>
</configuration>
<executions>
<execution>
<id>make shared resource</id>
@ -1413,6 +1453,8 @@ language governing permissions and limitations under the License. -->
</goals>
<phase>package</phase>
<configuration>
<finalName>nifi-${project.version}</finalName>
<attach>false</attach>
<archiverConfig>
<defaultDirectoryMode>0775</defaultDirectoryMode>
<directoryMode>0775</directoryMode>

View File

@ -0,0 +1,28 @@
<?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.
-->
<assembly>
<id>manifests</id>
<includeBaseDirectory>true</includeBaseDirectory>
<baseDirectory>nifi-manifests</baseDirectory>
<fileSets>
<fileSet>
<directory>${project.build.directory}/extension-manifests</directory>
<outputDirectory>./</outputDirectory>
</fileSet>
</fileSets>
</assembly>

View File

@ -583,6 +583,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<tarLongFileMode>gnu</tarLongFileMode>
</configuration>
@ -661,6 +662,11 @@
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.2</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>