diff options
author | cody koeninger <cody@koeninger.org> | 2016-07-05 16:44:15 -0700 |
---|---|---|
committer | Tathagata Das <tathagata.das1565@gmail.com> | 2016-07-05 16:44:15 -0700 |
commit | 1f0d021308f2201366111f8390015114710d4f9b (patch) | |
tree | 19152080a5bfc1ec5b5a1a6d8070b6c0aa4f542d | |
parent | 920cb5fe4ed0eb008cd14bf0ea45ed5b225b5022 (diff) | |
download | spark-1f0d021308f2201366111f8390015114710d4f9b.tar.gz spark-1f0d021308f2201366111f8390015114710d4f9b.tar.bz2 spark-1f0d021308f2201366111f8390015114710d4f9b.zip |
[SPARK-16359][STREAMING][KAFKA] unidoc skip kafka 0.10
## What changes were proposed in this pull request?
during sbt unidoc task, skip the streamingKafka010 subproject and filter kafka 0.10 classes from the classpath, so that at least existing kafka 0.8 doc can be included in unidoc without error
## How was this patch tested?
sbt spark/scalaunidoc:doc | grep -i error
Author: cody koeninger <cody@koeninger.org>
Closes #14041 from koeninger/SPARK-16359.
-rw-r--r-- | project/SparkBuild.scala | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/project/SparkBuild.scala b/project/SparkBuild.scala index 6018b22bae..b1a9f39342 100644 --- a/project/SparkBuild.scala +++ b/project/SparkBuild.scala @@ -701,15 +701,29 @@ object Unidoc { .map(_.filterNot(_.getCanonicalPath.contains("org/apache/spark/sql/hive/test"))) } + private def ignoreClasspaths(classpaths: Seq[Classpath]): Seq[Classpath] = { + classpaths + .map(_.filterNot(_.data.getCanonicalPath.matches(""".*kafka-clients-0\.10.*"""))) + .map(_.filterNot(_.data.getCanonicalPath.matches(""".*kafka_2\..*-0\.10.*"""))) + } + val unidocSourceBase = settingKey[String]("Base URL of source links in Scaladoc.") lazy val settings = scalaJavaUnidocSettings ++ Seq ( publish := {}, unidocProjectFilter in(ScalaUnidoc, unidoc) := - inAnyProject -- inProjects(OldDeps.project, repl, examples, tools, streamingFlumeSink, yarn, tags), + inAnyProject -- inProjects(OldDeps.project, repl, examples, tools, streamingFlumeSink, yarn, tags, streamingKafka010), unidocProjectFilter in(JavaUnidoc, unidoc) := - inAnyProject -- inProjects(OldDeps.project, repl, examples, tools, streamingFlumeSink, yarn, tags), + inAnyProject -- inProjects(OldDeps.project, repl, examples, tools, streamingFlumeSink, yarn, tags, streamingKafka010), + + unidocAllClasspaths in (ScalaUnidoc, unidoc) := { + ignoreClasspaths((unidocAllClasspaths in (ScalaUnidoc, unidoc)).value) + }, + + unidocAllClasspaths in (JavaUnidoc, unidoc) := { + ignoreClasspaths((unidocAllClasspaths in (JavaUnidoc, unidoc)).value) + }, // Skip actual catalyst, but include the subproject. // Catalyst is not public API and contains quasiquotes which break scaladoc. |