Integrating a custom doclet.
[JENKINS-18641]

Improving the logic that ensures dependency. If prototype.js is present, as in Jenkins,
there's no need to bring in json2 as we can use Object.toJSON from prototype for JSON.stringify.