sbt-unidoc icon indicating copy to clipboard operation
sbt-unidoc copied to clipboard

javadoc: error - java.lang.OutOfMemoryError

Open brthanmathwoag opened this issue 7 years ago • 0 comments

When I ran unidoc recently, it exploded with an OOM exception.

$ sbt jancyCommon/unidoc
...
[info] Generating /home/j/moje/src/jancy/jancy-common/target/javaunidoc/index-all.html...
[info] 1 error
[error] javadoc: error - java.lang.OutOfMemoryError: Please increase memory.
[error] For example, on the JDK Classic or HotSpot VMs, add the option -J-Xmx
[error] such as -J-Xmx32m.
[error] (jancyCommon/javaunidoc:doc) javadoc returned nonzero exit code
[error] Total time: 245 s, completed Apr 19, 2017 10:01:56 PM

I increased the maximum memory in the sbt launcher script, but unidoc didn't pick it up and launched javadoc with default settings. It only worked when I temporarily changed it system-wide:

$ export JAVA_TOOL_OPTIONS='-Xmx2048M'

but this feels like a hack.

Could we have a unidoc setting for tweaking this, like in maven-javadoc?

EDIT: And by 'could we have' I mean 'Would add it myself and send a PR if somebody was interested in merging it in'

brthanmathwoag avatar Apr 20 '17 10:04 brthanmathwoag