frontend-maven-plugin icon indicating copy to clipboard operation
frontend-maven-plugin copied to clipboard

Create alternative nodejs download path

Open Gasgeber opened this issue 2 years ago • 5 comments

Feature Request

Is Situation

The following download path is currently calculated:

https://nexus.mydomain.de/repository/npm-all/node/-/v18.16.1/node-v18.16.1-linux-x64.tar.gz (with manuel downloadroot) or https://nodejs.org/dist/v18.16.1/node-v18.16.1-linux-x64.tar.xz (with default downloadroot)

The path is hardcoded in Platform.java line 170

        return nodeVersion + "/" + getLongNodeFilename(nodeVersion, archiveOnWindows) + "." + os.getArchiveExtension();

Desired Situation

Our nexus offers the following download links:

For npm: https://nexus.mydomain.de/repository/npm-all/npm/-/npm-8.15.1.tgz (THIS WORKS) For node: https://nexus.mydomain.de/repository/npm-all/node/-/node-18.16.1.tgz (THIS DOES NOT WORK)

Could you please add the function to configure, so that the above node link may be generated so we can use our nexus repository?

Info: Unfortunately we can not change the files/paths in our nexus.

Thanks for any support

Gasgeber avatar Sep 22 '23 14:09 Gasgeber

I second this. Nodejs ships both 'tar.gz' and 'tar.xz'. I rebundle for maven central. To preserve space on central, I'd like to eventually drop 'tar.gz' entirely. Rebundles here for reference. It would be nice to have ability to configure what extension type per platform in case it differs on any platform.

hazendaz avatar Oct 02 '23 15:10 hazendaz

Related to #413.

wkruse avatar Oct 10 '23 13:10 wkruse

A Raw Repository in Nexus that proxies https://nodejs.org/dist can be used. Then no changes in frontend-maven-plugin are required.

wkruse avatar Oct 30 '23 13:10 wkruse

I have this problem building guacamole-common-js that use this plugin but it is trying to download this Node Version https://nodejs.org/dist/v16.19.1/node-v16.19.1-linux-x86.tar.gz but this one isn't posted on the site.

[INFO] Downloading https://nodejs.org/dist/v16.19.1/node-v16.19.1-linux-x86.tar.gz to /root/.m2/repository/com/github/eirslett/node/16.19.1/node-16.19.1-linux-x86.tar.gz [INFO] No proxies configured [INFO] No proxy was configured, downloading directly [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 47.819 s [INFO] Finished at: 2023-12-30T17:49:07Z [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.12.1:install-node-and-npm (install-node-and-npm) on project guacamole-common-js: Could not download Node.js: Got error code 404 from the server. -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.12.1:install-node-and-npm (install-node-and-npm) on project guacamole-common-js: Could not download Node.js: Got error code 404 from the server.

node

How can I modify the Path to Download the correct file?

omarerc avatar Dec 30 '23 19:12 omarerc

How can I modify the Path to Download the correct file?

I don't think Node.js has supported x86 on Linux for many years. Is it an option to switch to x64? Or you might have to compile your own custom Node.js binary. Maybe it's on https://unofficial-builds.nodejs.org/. You could use a "raw repository" in Nexus and then upload your custom Node.js binary in there, maybe.

eirslett avatar Jan 01 '24 14:01 eirslett