refactor to make doc is able to be generated on integration server.