eirslett / frontend-maven-plugin

"Maven-node-grunt-gulp-npm-node-plugin to end all maven-node-grunt-gulp-npm-plugins." A Maven plugin that downloads/installs Node and NPM locally, runs NPM install, Grunt, Gulp and/or Karma.
Apache License 2.0
4.2k stars 867 forks source link

Using multiple npmRegistryURL for a project #1101

Closed pmfrontdev2023 closed 11 months ago

pmfrontdev2023 commented 11 months ago

Hello, I was trying to use two different registries by having two different "npmRegistryURL" in a project, but it seems that what this does is to override the one that appear as first with the one that appears in the second place, and so the 3rd parties that are available in the first registry cannot be found since they are only being searched for in the second registry. Is this a bug or is there a limitation of the registries you can have in your project with this plugin? If so, how can I have multiple registries for a project using this plugin? Thank you x

eirslett commented 11 months ago

For multiple registries, I think you'll have to remove that option, and instead provide your own .npmrc file where you configure your registries and their authentication. Then you might also have to set <npmInheritsProxyConfigFromMaven>false</npmInheritsProxyConfigFromMaven> but I'm not 100 % sure.