Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nexus-compliant repository to get node and npm installers

I am looking for a nexus-compliant repository where I can get a node installer (a nexus-compliant alternative to http://nodejs.org/dist/.

Context :

In a java environment, our builds are processed by maven. Recently we add a javascript frontend app and I am trying to get it built via maven with the excellent plugin frontend-maven-plugin.

The plugin installs node and npm, then run npm install and grunt build. Everything works perfectly.

But we MUST put all our dependencies under nexus (or some locally proxified repository).

  • About frontend dependencies: no problem since nexus 2.10 supports the npm registries. It works.

  • About the node and npm installers, they are initially downloaded from http://nodejs.org/dist/ by the plugin, and I do not know how to locally proxify this repo ... or where I can find theses installers on a nexus-compliant's one.

Any suggestions ?

Thx.

like image 337
M'sieur Toph' Avatar asked Dec 04 '14 08:12

M'sieur Toph'


People also ask

What is Nexus repository?

Nexus Repository OSS is an open source repository that supports many artifact formats, including Docker, Java™, and npm. With the Nexus tool integration, pipelines in your toolchain can publish and retrieve versioned apps and their dependencies by using central repositories that are accessible from other environments.

What is npm repository?

NPM or Node Package Manager is an open-source repository of tools engineers use to develop applications and websites. NPM is two things: A repository for publishing open-source projects. Simplified version: a digital storage and retrieval facility. A command-line interface (CLI) for interacting with the repository.


1 Answers

I would suggest to create a pull request/patch for the frontend plugin that allows you to add a full url for npm and node rather than just the version and the root url. Then you can host the two installed e.g. by uploading them to Nexus into a Maven 2 repository and using that URL. I filed an issue for that btw. https://github.com/eirslett/frontend-maven-plugin/issues/126

Alternatively could try to create a site repository in Nexus with the same structure and use that.

like image 100
Manfred Moser Avatar answered Oct 21 '22 13:10

Manfred Moser