Building package documentation from source notebooks using the Workbench [is as simple as a click of a button](http://reference.wolfram.com/workbench/index.jsp?topic=/com.wolfram.eclipse.help/html/tasks/documentationpaclets/build.html).

How can I automate the documentation build from the command line?

I believe that this requires some familiarity with Java build tools (ant?), which I haven't used before.

---

Alternatively, is it possible to build the documentation directly from Mathematica, without having to use Ant and `docbuild.xml`? The Workbench includes a DocumentationBuild package.

---

I want to do this to be able to automate all tasks necessary to build a ready-to-distribute Mathematica package.