This is an automated email from the ASF dual-hosted git repository.
ottersbach pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git
The following commit(s) were added to refs/heads/main by this push:
new de9042bb19 NIFI-14052 Removed non-deterministic build properties
(#9558)
de9042bb19 is described below
commit de9042bb19c8550e51b628e96291fb70e3c443ad
Author: David Handermann <[email protected]>
AuthorDate: Sat Nov 30 13:47:20 2024 -0600
NIFI-14052 Removed non-deterministic build properties (#9558)
- Removed Maven and Java Home properties from Runtime Manifest build
- Removed Built-By and Build-Os-Version properties from Runtime Manifest
- Disabled JAXB episode file generation
- Enabled output sorting for Swagger specification
Signed-off-by: Lucas Ottersbach <[email protected]>
---
.../src/main/resources/build.properties.template | 4 ----
.../nifi-framework/nifi-web/nifi-web-api/pom.xml | 1 +
.../src/main/resources/build.properties | 4 ----
.../nifi-registry-core/nifi-registry-web-api/pom.xml | 1 +
pom.xml | 17 +++++++++++++++++
5 files changed, 19 insertions(+), 8 deletions(-)
diff --git
a/minifi/minifi-assembly/src/main/resources/build.properties.template
b/minifi/minifi-assembly/src/main/resources/build.properties.template
index 6197a6ebe9..a54326a29e 100644
--- a/minifi/minifi-assembly/src/main/resources/build.properties.template
+++ b/minifi/minifi-assembly/src/main/resources/build.properties.template
@@ -17,15 +17,11 @@
Build-Branch:${buildBranch}
Build-Timestamp:${timestamp}
-Built-By:${user.name}
MiNiFi-Version:${project.version}
Build-Revision:${buildRevision}
-Maven-Home:${maven.home}
Maven-Version:${maven.version}
Created-By:${maven.build.version}
-Build-Java-Home:${java.home}
Build-Jdk:${java.version}
Build-Jdk-Vendor:${java.vendor}
Build-Arch:${os.arch}
Build-Os:${os.name}
-Build-Os-Version:${os.version}
diff --git a/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/pom.xml
b/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/pom.xml
index b26cda3749..c11af26fc7 100644
--- a/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/pom.xml
+++ b/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/pom.xml
@@ -112,6 +112,7 @@
<outputPath>${restApiDirectory}</outputPath>
<outputFileName>swagger</outputFileName>
<outputFormat>JSONANDYAML</outputFormat>
+ <sortOutput>true</sortOutput>
<prettyPrint>true</prettyPrint>
<defaultResponseCode>200</defaultResponseCode>
<configurationFilePath>${project.build.outputDirectory}/openapi.yaml</configurationFilePath>
diff --git
a/nifi-manifest/nifi-runtime-manifest/src/main/resources/build.properties
b/nifi-manifest/nifi-runtime-manifest/src/main/resources/build.properties
index 988b887763..1edc6b1d69 100644
--- a/nifi-manifest/nifi-runtime-manifest/src/main/resources/build.properties
+++ b/nifi-manifest/nifi-runtime-manifest/src/main/resources/build.properties
@@ -17,13 +17,9 @@ Project-Version:${project.version}
Build-Branch:${buildBranch}
Build-Revision:${buildRevision}
Build-Timestamp:${maven.build.timestamp}
-Built-By:${user.name}
-Maven-Home:${maven.home}
Maven-Version:${maven.version}
Created-By:${maven.build.version}
-Build-Java-Home:${java.home}
Build-Jdk:${java.version}
Build-Jdk-Vendor:${java.vendor}
Build-Arch:${os.arch}
Build-Os:${os.name}
-Build-Os-Version:${os.version}
\ No newline at end of file
diff --git a/nifi-registry/nifi-registry-core/nifi-registry-web-api/pom.xml
b/nifi-registry/nifi-registry-core/nifi-registry-web-api/pom.xml
index e3b639b8f5..28283dfdcb 100644
--- a/nifi-registry/nifi-registry-core/nifi-registry-web-api/pom.xml
+++ b/nifi-registry/nifi-registry-core/nifi-registry-web-api/pom.xml
@@ -96,6 +96,7 @@
<outputPath>${api.docs.dir}</outputPath>
<outputFileName>swagger</outputFileName>
<outputFormat>JSONANDYAML</outputFormat>
+ <sortOutput>true</sortOutput>
<prettyPrint>true</prettyPrint>
<defaultResponseCode>200</defaultResponseCode>
<configurationFilePath>${project.build.outputDirectory}/openapi.yaml</configurationFilePath>
diff --git a/pom.xml b/pom.xml
index 41cb0b2a2c..a4c705ebab 100644
--- a/pom.xml
+++ b/pom.xml
@@ -815,6 +815,8 @@
<artifactId>hisrc-higherjaxb40-maven-plugin</artifactId>
<configuration>
<noFileHeader>true</noFileHeader>
+ <!-- Disable episode file generation with non-reproducible
timestamps -->
+ <episode>false</episode>
</configuration>
</plugin>
<plugin>
@@ -1009,6 +1011,21 @@
</properties>
</profile>
+ <!-- Set reproducible build properties for Apache Releases -->
+ <profile>
+ <id>apache-release</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+ <properties>
+ <maven.buildNumber.skip>true</maven.buildNumber.skip>
+ <buildTag>rel/nifi-${project.version}</buildTag>
+ <buildRevision>1</buildRevision>
+ <buildBranch>main</buildBranch>
+
<maven.build.timestamp>${project.build.outputTimestamp}</maven.build.timestamp>
+ </properties>
+ </profile>
+
<profile>
<!-- Performs execution of Integration Tests using the Maven
FailSafe Plugin. The view of integration tests in this context
are those