Repository: bazelbuild/bazel
Issue: Documentation for certain rules is missing
Labels: type: documentation (cleanup)
P1
team-Rules-Java

### Description of the problem / feature request:

Documentation for certain rules (for example `java_toolchain`) is missing on latest docs.build.bazel.

### Feature requests: what underlying problem are you trying to solve with this feature?

Read the docs.

### Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

https://docs.bazel.build/versions/master/be/java.html

<img width="359" alt="screen shot 2018-11-07 at 1 32 02 pm" src="https://user-images.githubusercontent.com/33242106/48106906-91db3e00-e291-11e8-8eaf-d2b19662cbb5.png">

Note the missing `java_toolchain`, compare with:

https://web.archive.org/web/20181021162843/https://docs.bazel.build/versions/master/be/java.html

<img width="438" alt="screen shot 2018-11-07 at 1 32 10 pm" src="https://user-images.githubusercontent.com/33242106/48106927-a6b7d180-e291-11e8-9b61-5b0cbc64e8e4.png">

The source of the docs still exists on current master, so I don't think it's been removed intentionally: https://github.com/bazelbuild/bazel/blob/91e0bae6143e39f60e9d62e8b61854cbc8d7a4f4/src/main/java/com/google/devtools/build/lib/rules/java/JavaToolchainRule.java#L269

Issue comments:
cc @lberki 
Doc for java_import is also broken:

0.20.0: https://docs.bazel.build/versions/0.20.0/be/java.html#java_import 

java_import(name, deps, data, compatible_with, constraints, deprecation, distribs, exports, features, jars, licenses, neverlink, proguard_specs, restricted_to, runtime_deps, srcjar, tags, testonly, visibility)

0.21.0: https://docs.bazel.build/versions/0.21.0/be/java.html#java_import

java_import(name, deps, data, compatible_with, deprecation, distribs, exports, features, licenses, restricted_to, runtime_deps, tags, testonly, visibility)
cc @iirina @buchgr @fweikert 
Please fix this, not finding this rule in the documentation cost me a considerable amount of time. :cry: 
Writing docs for implemented code is not all that that much work compared to writing the code in the first place.
Bisected to https://github.com/bazelbuild/bazel/commit/c1d7672707a4d8898b0cd37b5695804ca047d0b8.

```
jingwen@jingwen:/tmp
$ curl http://localhost:12345/versions/master/be/overview.html | grep java_runtime
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--100 37307  100 37307    0     0  2602k      0 --:--:-- --:--:-- --:--:-- 2802k
```

At 1db9e66b3d3666eeed37db286ece0f227c45e47b, the commit before c1d7672707a4d8898b0cd37b5695804ca047d0b8

```
jingwen@jingwen:/tmp
$ curl http://localhost:12345/versions/master/be/overview.html | grep java_runtime
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--100 37666  100 37666    0     0  2627k      0 --:--:-                <a href="  java.html#java_runtime">
-             java_runtime
--:--:-- --:--:-- 2627k
```

cc @cushon 
Fix: https://github.com/bazelbuild/bazel/pull/7061

Pull request review comments:

Patch that resolved the issue:
diff --git a/src/main/java/com/google/devtools/build/lib/BUILD b/src/main/java/com/google/devtools/build/lib/BUILD
index 72ceb6e411f4b3..d8ca8af2c5dadc 100644
--- a/src/main/java/com/google/devtools/build/lib/BUILD
+++ b/src/main/java/com/google/devtools/build/lib/BUILD
@@ -1385,6 +1385,7 @@ filegroup(
         "//src/main/java/com/google/devtools/build/lib/rules/apple/cpp:srcs",
         "//src/main/java/com/google/devtools/build/lib/rules/config:srcs",
         "//src/main/java/com/google/devtools/build/lib/rules/cpp:srcs",
+        "//src/main/java/com/google/devtools/build/lib/rules/java:srcs",
         "//src/main/java/com/google/devtools/build/lib/rules/cpp/proto:srcs",
         "//src/main/java/com/google/devtools/build/lib/rules/genquery:srcs",
         "//src/main/java/com/google/devtools/build/lib/rules/genrule:srcs",


Test patch: