Skip to content

fix: build jsdocs via frontend-maven-plugin instead of exec-maven-plugin - #1981

Merged
rismehta merged 1 commit into
devfrom
fix/jsdocs-cloud-manager-build-node-path
Sep 9, 2026
Merged

fix: build jsdocs via frontend-maven-plugin instead of exec-maven-plugin#1981
rismehta merged 1 commit into
devfrom
fix/jsdocs-cloud-manager-build-node-path

Conversation

@vladbailescu

Copy link
Copy Markdown
Member

Description

jsdocs/pom.xml used exec-maven-plugin to invoke node_modules/.bin/jsdoc directly. That script has a #!/usr/bin/env node shebang, which requires a global node binary on PATH. Build environments that don't have Node installed globally (e.g. Adobe Cloud Manager's build container, which only has the Node that frontend-maven-plugin installs locally into jsdocs/node/) fail with:

--- exec:3.0.0:exec (run-exec-generate-jsdocs) @ core-forms-components-af-jsapi ---
/usr/bin/env: 'node': No such file or directory
...
Failed to execute goal org.codehaus.mojo:exec-maven-plugin:3.0.0:exec (run-exec-generate-jsdocs) on project core-forms-components-af-jsapi: Command execution failed. Process exited with an error: 127 (Exit value: 127)

This fix routes the jsdoc generation through frontend-maven-plugin's own npm goal (npm run jsdoc, added as a script in package.json), which correctly resolves and prepends its own locally-installed Node/npm to PATH for the child process. This matches the pattern already used by other modules in this repo (e.g. ui.frontend/pom.xml) and removes the now-unneeded Windows/unix script.file profiles.

Related Issue

Found while diagnosing a downstream Cloud Manager build failure that vendors this module.

Motivation and Context

Without this fix, any build environment lacking a global node binary on PATH fails to build the core-forms-components-af-jsapi module, even though the module already manages its own Node install via frontend-maven-plugin.

How Has This Been Tested?

Ran mvn clean package in jsdocs/ standalone — build succeeds and the jsdoc jar/HTML output is generated correctly, both with and without a global Node on PATH.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes and the overall coverage did not decrease.
  • All unit tests pass on CircleCi.
  • I ran all tests locally and they pass.

@adobe-bot

Copy link
Copy Markdown

Accessibility Violations Found

Id Impact
aria-required-attr critical
empty-heading minor
label-title-only serious
target-size serious

1 similar comment
@adobe-bot

Copy link
Copy Markdown

Accessibility Violations Found

Id Impact
aria-required-attr critical
empty-heading minor
label-title-only serious
target-size serious

@rismehta
rismehta changed the base branch from master to dev September 9, 2026 06:36
exec-maven-plugin invoked node_modules/.bin/jsdoc directly, which requires a global
node binary on PATH via its #!/usr/bin/env shebang. In build environments without a
global Node install (e.g. Cloud Manager), this fails with exit 127:
"/usr/bin/env: 'node': No such file or directory".

Route the jsdoc generation through frontend-maven-plugin's npm goal instead, which
correctly uses the locally-installed node/npm it manages, matching the pattern
already used by other modules in this repo (e.g. ui.frontend).
@rismehta
rismehta force-pushed the fix/jsdocs-cloud-manager-build-node-path branch from f7aa727 to 3653a18 Compare September 9, 2026 06:43
@adobe-bot

Copy link
Copy Markdown

Accessibility Violations Found

Id Impact
aria-required-attr critical
empty-heading minor
label-title-only serious
target-size serious

@adobe-bot

Copy link
Copy Markdown

Accessibility Violations Found

Id Impact
aria-required-attr critical
empty-heading minor
label-title-only serious
page-has-heading-one moderate
target-size serious

@codecov

codecov Bot commented Sep 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@rismehta
rismehta merged commit fea6e47 into dev Sep 9, 2026
9 checks passed
@rismehta
rismehta deleted the fix/jsdocs-cloud-manager-build-node-path branch September 9, 2026 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants