From 7e7fef33040c837a0d9b389ddd5fb0d58d085cc3 Mon Sep 17 00:00:00 2001 From: Zach Kimberg Date: Mon, 4 Feb 2019 17:31:12 -0800 Subject: [PATCH] Fix website scala doc (#14065) * Fix doc building * Remove deplicate in --- docs/mxdoc.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/mxdoc.py b/docs/mxdoc.py index f7b226a4323a..280f2a6ce282 100644 --- a/docs/mxdoc.py +++ b/docs/mxdoc.py @@ -106,7 +106,11 @@ def build_r_docs(app): def build_scala(app): """build scala for scala docs, java docs, and clojure docs to use""" - _run_cmd("cd %s/../scala-package && mvn -B install -DskipTests" % app.builder.srcdir) + if any(v in _BUILD_VER for v in ['1.2.', '1.3.', '1.4.']): + _run_cmd("cd %s/.. && make scalapkg" % app.builder.srcdir) + _run_cmd("cd %s/.. && make scalainstall" % app.builder.srcdir) + else: + _run_cmd("cd %s/../scala-package && mvn -B install -DskipTests" % app.builder.srcdir) def build_scala_docs(app): """build scala doc and then move the outdir""" @@ -119,7 +123,7 @@ def build_scala_docs(app): '`find infer -name "*.jar" | tr "\\n" ":" `' ]) # There are unresolvable errors on mxnet 1.2.x. We are ignoring those errors while aborting the ci on newer versions - scala_ignore_errors = '; exit 0' if '1.2.' or '1.3.' in _BUILD_VER else '' + scala_ignore_errors = '; exit 0' if any(v in _BUILD_VER for v in ['1.2.', '1.3.']) else '' _run_cmd('cd {}; scaladoc `{}` -classpath {} -feature -deprecation {}' .format(scala_path, scala_doc_sources, scala_doc_classpath, scala_ignore_errors)) dest_path = app.builder.outdir + '/api/scala/docs'