esdoc / esdoc-plugins

MIT License
139 stars 74 forks source link

esdoc-publish-html-plugin includes non-configurable "class" directory for classes #58

Open eemeli opened 6 years ago

eemeli commented 6 years ago

This is a problem when using Jenkins as a CI tool; its "Publish Javadoc" post-build action results in code being served by Jetty, which silently filters out paths with a class part. To work around this, I've needed to include this horrible hacky monkeypatching "plugin" in my ESDoc configuration:

const DocBuilder = require('esdoc-publish-html-plugin/out/src/Builder/DocBuilder').default;

if (!DocBuilder.prototype.__gOFN) {
  DocBuilder.prototype.__gOFN = DocBuilder.prototype._getOutputFileName;
  DocBuilder.prototype._getOutputFileName = function (doc) {
    return this.__gOFN(doc).replace(/^class\//, 'cls/');
  };
}

module.exports = {}

Any ideas for a cleaner solution? Jenkins in this case is in a hosted environment and is not configurable at the required level to fix this there.

andsouto commented 6 years ago

I'm having the same problem. I have applied your workaround and now is working. It will be nice finding a good solution as this seems as you said a horrible hack but at least it works.

docwhat commented 6 years ago

I filed a JENKINS-53095 for this issue. I'm pretty sure it is just a problem with publishHTML, not Jetty.

Please vote up the issue if this impacts you. :smiley: