Skip to content

frontend-maven-plugin Node.js Download Path Mismatch with Corporate Nexus Repository #1186

@Vinskao

Description

@Vinskao

The frontend-maven-plugin's install-node-and-npm goal enforces a specific download path format ${downloadRoot}/v${nodeVersion}/${platform}/node${extension} which does not match our current corporate Nexus repository structure at https://[CORPORATE_DOMAIN]/repository/npm-group/types/node/node-16.11.7/, causing Node.js installation failures during Maven builds.
Problem Description
The plugin's hardcoded path structure conflicts with our internal Nexus repository layout, resulting in 404 errors when attempting to download Node.js binaries.
Current Behavior

Plugin attempts to download from: https://[CORPORATE_DOMAIN]/repository/nodejs/v16.13.1/win-x64/node.exe
Corporate Nexus serves files from: https://[CORPORATE_DOMAIN]/repository/npm-group/types/node/node-16.11.7/

Error Message
Could not download Node.js from: https://[CORPORATE_DOMAIN]/repository/nodejs/v16.13.1/win-x64/node.exe: Got error code 404 from the server.
Root Cause Analysis
The issue stems from the plugin's source code implementation in the following files:

Platform.java - getNodeDownloadFilename() method:

Repository: https://github.com/eirslett/frontend-maven-plugin/blob/master/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/Platform.java

NodeInstaller.java - Line 291:

Repository: https://github.com/eirslett/frontend-maven-plugin/blob/master/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/NodeInstaller.java#L291

These components enforce the path structure without providing flexibility for custom repository layouts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions