Skip to content

Conversation

@lhotari
Copy link
Member

@lhotari lhotari commented Aug 26, 2025

Motivation

The nifi-nar-maven-plugin will generate NiFi specific documentation when the NAR file is created. Pulsar doesn't use this documentation and it's a waste of resources to attempt to generate the documentation which requires a heavy classloading and scanning process.

Since org.apache.nifi:nifi-nar-maven-plugin:2.0.0, it has been possible to skip the documentation generation, thanks to @nicoloboschi's PR apache/nifi-maven#35. The challenge with nifi-nar-maven-plugin 2.0.0+ version is that it requires Java 21+. This PR solves that challenge.

Modifications

  • Configure the build to use org.apache.nifi:nifi-nar-maven-plugin:2.1.0 with skipDocGeneration=true when the build JVM is Java 21+

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

… skipDocGeneration=true, when build JVM is Java 21+
@lhotari
Copy link
Member Author

lhotari commented Aug 26, 2025

Example of the build stalling due to NiFi nar plugin documentation generation:

[INFO] Generating documentation for NiFi extensions in the NAR...
[WARNING] The artifact org.apache.commons:commons-io:jar:1.3.2 has been relocated to commons-io:commons-io:jar:1.3.2: https://issues.sonatype.org/browse/MVNCENTRAL-244
Downloading from HDPReleases: https://repo.hortonworks.com/content/repositories/releases/org/alluxio/alluxio-shaded-hadoop/2.9.4/alluxio-shaded-hadoop-2.9.4.pom
[WARNING] Unable to construct Maven Project for org.alluxio:alluxio-core-server-worker:jar:2.9.4:test when attempting to determine the expected version of NiFi API
[WARNING] net.minidev:json-smart/maven-metadata.xml failed to transfer from http://0.0.0.0/ during a previous attempt. This failure was cached in the local repository and resolution will not be reattempted until the update interval of maven-default-http-blocker has elapsed or updates are forced. Original error: Could not transfer metadata net.minidev:json-smart/maven-metadata.xml from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [glassfish-repository (http://download.java.net/maven/glassfish, default, releases+snapshots)]
[WARNING] net.minidev:json-smart/maven-metadata.xml failed to transfer from http://0.0.0.0/ during a previous attempt. This failure was cached in the local repository and resolution will not be reattempted until the update interval of maven-default-http-blocker has elapsed or updates are forced. Original error: Could not transfer metadata net.minidev:json-smart/maven-metadata.xml from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [glassfish-repository (http://download.java.net/maven/glassfish, default, releases+snapshots)]
Downloading from HDPReleases: https://repo.hortonworks.com/content/repositories/releases/net/minidev/json-smart/maven-metadata.xml
[WARNING] Could not transfer metadata net.minidev:json-smart/maven-metadata.xml from/to HDPReleases (https://repo.hortonworks.com/content/repositories/releases/): status code: 500, reason phrase: Internal Server Error (500)
[WARNING] The artifact org.slf4j:slf4j-log4j12:jar:2.0.17 has been relocated to org.slf4j:slf4j-reload4j:jar:2.0.17
[WARNING] net.minidev:json-smart/maven-metadata.xml failed to transfer from http://0.0.0.0/ during a previous attempt. This failure was cached in the local repository and resolution will not be reattempted until the update interval of maven-default-http-blocker has elapsed or updates are forced. Original error: Could not transfer metadata net.minidev:json-smart/maven-metadata.xml from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [glassfish-repository (http://download.java.net/maven/glassfish, default, releases+snapshots)]
[WARNING] net.minidev:json-smart/maven-metadata.xml failed to transfer from https://repo.hortonworks.com/content/repositories/releases/ during a previous attempt. This failure was cached in the local repository and resolution will not be reattempted until the update interval of HDPReleases has elapsed or updates are forced. Original error: Could not transfer metadata net.minidev:json-smart/maven-metadata.xml from/to HDPReleases (https://repo.hortonworks.com/content/repositories/releases/): status code: 500, reason phrase: Internal Server Error (500)
[WARNING] org.bouncycastle:bcutil-jdk18on/maven-metadata.xml failed to transfer from http://0.0.0.0/ during a previous attempt. This failure was cached in the local repository and resolution will not be reattempted until the update interval of maven-default-http-blocker has elapsed or updates are forced. Original error: Could not transfer metadata org.bouncycastle:bcutil-jdk18on/maven-metadata.xml from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [apache.snapshots (http://repository.apache.org/snapshots, default, snapshots)]
[WARNING] org.bouncycastle:bcutil-jdk18on/maven-metadata.xml failed to transfer from http://0.0.0.0/ during a previous attempt. This failure was cached in the local repository and resolution will not be reattempted until the update interval of maven-default-http-blocker has elapsed or updates are forced. Original error: Could not transfer metadata org.bouncycastle:bcutil-jdk18on/maven-metadata.xml from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [apache.snapshots (http://repository.apache.org/snapshots, default, snapshots)]
Downloading from HDPReleases: https://repo.hortonworks.com/content/repositories/releases/org/bouncycastle/bcutil-jdk18on/maven-metadata.xml

This PR will resolve this issue as long as the build JVM is Java 21.

@lhotari lhotari requested a review from BewareMyPower August 26, 2025 10:29
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.27%. Comparing base (e5e7981) to head (a685113).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #24668      +/-   ##
============================================
+ Coverage     74.01%   74.27%   +0.26%     
+ Complexity    33224    33208      -16     
============================================
  Files          1858     1885      +27     
  Lines        146500   146943     +443     
  Branches      16880    16927      +47     
============================================
+ Hits         108425   109144     +719     
+ Misses        29394    29100     -294     
- Partials       8681     8699      +18     
Flag Coverage Δ
inttests 26.77% <ø> (-0.15%) ⬇️
systests 22.69% <ø> (?)
unittests 73.75% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 166 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@lhotari lhotari merged commit a239240 into apache:master Aug 26, 2025
55 of 56 checks passed
lhotari added a commit that referenced this pull request Aug 26, 2025
… skipDocGeneration=true (#24668)

(cherry picked from commit a239240)
lhotari added a commit that referenced this pull request Aug 26, 2025
… skipDocGeneration=true (#24668)

(cherry picked from commit a239240)
lhotari added a commit that referenced this pull request Aug 26, 2025
… skipDocGeneration=true (#24668)

(cherry picked from commit a239240)
nodece pushed a commit to ascentstream/pulsar that referenced this pull request Aug 26, 2025
manas-ctds pushed a commit to datastax/pulsar that referenced this pull request Aug 28, 2025
… skipDocGeneration=true (apache#24668)

(cherry picked from commit a239240)
(cherry picked from commit 44ca073)
ganesh-ctds pushed a commit to datastax/pulsar that referenced this pull request Aug 29, 2025
… skipDocGeneration=true (apache#24668)

(cherry picked from commit a239240)
(cherry picked from commit efaeef9)
srinath-ctds pushed a commit to datastax/pulsar that referenced this pull request Sep 3, 2025
… skipDocGeneration=true (apache#24668)

(cherry picked from commit a239240)
(cherry picked from commit efaeef9)
Technoboy- pushed a commit to Technoboy-/pulsar that referenced this pull request Sep 10, 2025
srinath-ctds pushed a commit to datastax/pulsar that referenced this pull request Sep 12, 2025
… skipDocGeneration=true (apache#24668)

(cherry picked from commit a239240)
(cherry picked from commit 44ca073)
nborisov pushed a commit to nborisov/pulsar that referenced this pull request Sep 12, 2025
KannarFr pushed a commit to CleverCloud/pulsar that referenced this pull request Sep 22, 2025
walkinggo pushed a commit to walkinggo/pulsar that referenced this pull request Oct 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants