Bryan Bende 334c9db9c3
NIFI-10915 Add additionalDetails content to runtime manifest
- Update manifests assembly to include the additionaDetails.html files
- Update C2 ExtensionDefinition to add a new field for additional details content
- Update manifest generation to read the additional details and pass through to C2 runtime manifest
- Switch to boolean to indicate presence of additional details, instead of including content

Add additionalDetails files to nifi-runtime-manifest artifact, organized by group/artifact/version/type

Signed-off-by: Matthew Burgess <mattyb149@apache.org>

This closes #6767
2022-12-08 11:02:56 -05:00

154 lines
6.8 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-manifest</artifactId>
<version>1.20.0-SNAPSHOT</version>
</parent>
<artifactId>nifi-runtime-manifest</artifactId>
<packaging>jar</packaging>
<properties>
<extension.manifest.unpack.dir>${project.build.directory}</extension.manifest.unpack.dir>
<build.properties.file>${project.build.directory}/classes/build.properties</build.properties.file>
<runtime.manifest.file>${project.build.directory}/classes/nifi-runtime-manifest.json</runtime.manifest.file>
<runtime.manifest.id>apache-nifi</runtime.manifest.id>
</properties>
<dependencies>
<!-- Needed to unpack the extension-manifest.xml files during the build, marked as optional
because it is not a real dependency for anyone depending on this module -->
<dependency>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-assembly</artifactId>
<version>1.20.0-SNAPSHOT</version>
<classifier>manifests</classifier>
<type>zip</type>
<optional>true</optional>
</dependency>
</dependencies>
<build>
<!-- Replace variables in src/main/resource/build.properties when processing resources -->
<resources>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>build.properties</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
<!-- Populate buildBranch, buildRevision, and timestamp so variables are available to build.properties -->
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<inherited>true</inherited>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>create</goal>
</goals>
</execution>
</executions>
<configuration>
<doCheck>false</doCheck>
<doUpdate>false</doUpdate>
<shortRevisionLength>7</shortRevisionLength>
<getRevisionOnlyOnce>true</getRevisionOnlyOnce>
<revisionOnScmFailure />
<buildNumberPropertyName>buildRevision</buildNumberPropertyName>
<scmBranchPropertyName>buildBranch</scmBranchPropertyName>
</configuration>
</plugin>
<!-- Unpack all of NiFi's extension manifests -->
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>extract-extension-manifests</id>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<includeArtifactIds>nifi-assembly</includeArtifactIds>
<includeClassifiers>manifests</includeClassifiers>
<excludeTransitive>true</excludeTransitive>
<outputDirectory>${extension.manifest.unpack.dir}</outputDirectory>
<silent>true</silent>
</configuration>
</execution>
</executions>
</plugin>
<!-- Execute the runtime manifest generator -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<executions>
<execution>
<id>generate-runtime-manifest</id>
<phase>prepare-package</phase>
<goals>
<goal>java</goal>
</goals>
<configuration>
<mainClass>org.apache.nifi.runtime.manifest.impl.RuntimeManifestGenerator</mainClass>
<arguments>
<argument>${extension.manifest.unpack.dir}/nifi-manifests</argument>
<argument>${build.properties.file}</argument>
<argument>${runtime.manifest.file}</argument>
<argument>${runtime.manifest.id}</argument>
</arguments>
<includePluginDependencies>true</includePluginDependencies>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-runtime-manifest-core</artifactId>
<version>1.20.0-SNAPSHOT</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
<profiles>
<!-- Specifies an empty buildRevision and buildBranch when building outside of a git repo -->
<profile>
<id>build-info-no-git</id>
<activation>
<activeByDefault>false</activeByDefault>
<file>
<missing>../../.git/HEAD</missing>
</file>
</activation>
<properties>
<buildRevision />
<buildBranch />
</properties>
</profile>
</profiles>
</project>