Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

SOLR-15670: Introduce Gradle parameter to skip ref-guide tasks (#323)

Houston Putmana867ff2e8127
diff --git a/help/workflow.txt b/help/workflow.txt
index eec7c4e33bf..2b22c3c8618 100644
--- a/help/workflow.txt
+++ b/help/workflow.txt
@@ -39,3 +39,10 @@ Other validation and checks
Generate a report of dependencies with known OWASP vulnerabilities:
gradlew :dependencyCheckAnalyze
open ./build/reports/dependency-check-report.html
+
+Additional General Options
+==========================
+
+Use the following environment variable or gradle property to ignore all ref-guide steps when running assemble or check.
+`-Prefguide.include=false`
+`SOLR_REF_GUIDE_INCLUDE=false`
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index d30c343995d..5ea2f81e723 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -369,6 +369,8 @@ Other Changes
* SOLR-15480: Make Tuple copy constructor, clone and merge consistent w.r.t. markers (EOF, EXCEPTION), field names and labels. (John Durham, Mike Drob, Christine Poerschke)
+* SOLR-15670: Introduce Gradle parameter to skip ref-guide tasks (Houston Putman, Dawid Weiss)
+
Bug Fixes
---------------------
* SOLR-14546: Fix for a relatively hard to hit issue in OverseerTaskProcessor that could lead to out of order execution
diff --git a/solr/solr-ref-guide/README.adoc b/solr/solr-ref-guide/README.adoc
index c82f2860308..f02b5981217 100644
--- a/solr/solr-ref-guide/README.adoc
+++ b/solr/solr-ref-guide/README.adoc
@@ -24,3 +24,5 @@ To build the Ref Guide, simply run `./gradlew checkSite`.
This will build the HTML files and validate that page references and internal links work properly.
See the `../../dev-docs/ref-guide` directory for information about editing and publishing the Ref Guide.
+
+To ignore the Ref Guide steps when running gradle `assemble` or `check`, use either `-Prefguide.include=false` or `SOLR_REF_GUIDE_INCLUDE=false`.
diff --git a/solr/solr-ref-guide/build.gradle b/solr/solr-ref-guide/build.gradle
index 6b6ab62b6ae..884a1544299 100644
--- a/solr/solr-ref-guide/build.gradle
+++ b/solr/solr-ref-guide/build.gradle
@@ -210,11 +210,12 @@ ext {
// Hook in our dependency on all top level documentation in order to check local javadoc links
checkLocalJavadocLinksSite.dependsOn ':documentation'
-// Hook up custom tasks with standard tasks.
-check.dependsOn checkLocalJavadocLinksSite, checkSite
-
-// Hook site building to assemble.
-assemble.dependsOn buildSite
+// Attach building the ref guide to standard convention tasks. This
+// can be optionally turned off (see SOLR-15670).
+if (propertyOrEnvOrDefault('refguide.include', 'SOLR_REF_GUIDE_INCLUDE', "true").toBoolean()) {
+ check.dependsOn checkLocalJavadocLinksSite, checkSite
+ assemble.dependsOn buildSite
+}
@CacheableTask
abstract class PrepareSources extends DefaultTask {