Apache Solr open-source search software
Give NPM registry option for downloading node tools (#2208)
Houston Putmana5337ee3fb93
diff --git a/gradle/node.gradle b/gradle/node.gradleindex bb0ea5b3f82..1823b783053 100644--- a/gradle/node.gradle+++ b/gradle/node.gradle@@ -18,6 +18,13 @@configure([project(":solr:packaging"), project(":solr:solr-ref-guide"), project(":solr:webapp")]) {apply plugin: "com.github.node-gradle.node"+ def npmRegistry = "${ -> propertyOrEnvOrDefault("solr.npm.registry", "SOLR_NPM_REGISTRY", '') }"+ if (!npmRegistry.isEmpty()) {+ tasks.npmSetup {+ args.addAll(['--registry', npmRegistry])+ }+ }+ext {rootNodeDir = "$rootDir/.gradle/node"nodeProjectDir = file("$rootNodeDir/$project.name")diff --git a/help/localSettings.txt b/help/localSettings.txtindex 5089bb669ca..3c261fd234d 100644--- a/help/localSettings.txt+++ b/help/localSettings.txt@@ -6,3 +6,15 @@ and save a project-local 'gradle.properties' file from a template,with some default settings which you can modify.See your 'gradle.properties' file for more details of those settings.++Building without access to the internet+---------------------------------------++-- Node --+There are a few tasks that rely on downloading node tools from NPM.+These include the Reference Guide build, the integration (e2e) tests and the webapp build.+Some of these can be disabled, however other tasks such as building the solr webapp often cannot be disabled.++In order to set a NPM registry for Gradle to connect to, please use either:+- The "SOLR_NPM_REGISTRY" environment variable+- The "-Psolr.npm.registry" Gradle property.