Making JavaDocs available with GitHub, Sonatype Maven repo [closed]

大憨熊 提交于 2019-12-02 15:53:32

GitHub serves static HTML files that are in the gh-pages branch of your repo at http://your_username.github.com/your_repo/. In theory, Maven could be made to do the following:

  1. Commit the release pom.xml.
  2. Generate the JavaDocs to a .gitignore'd directory (so it would be preserved across branch changes).
  3. Checkout the gh-pages branch.
  4. Replace all of the files in the working directory with that of the directory the JavaDocs were copied to
  5. Commit
  6. Checkout the original branch.
  7. Continue with release...

I'm only two days in to using Maven for a few of my projects so this is way beyond my capabilities. I'd be eager to see this implemented either with existing plugins or a custom plugin.

There is now a Maven plugin that can push a directory to a particular branch on githib at: http://github.com/github/maven-plugins.

You can use a shell script to do the git checkout/add/commit/checkout/push as Jake Wharton suggested, and configure Ant or Gradle to run the shell script after it generates the javadoc. I'm not sure this would work with Maven. Here's an example shell script.

You can use the github pages, creating a static web site then you put your javadoc in a directory and commmit to gh-pages branch.

see the Git hub pages, its simple and useful.

see

http://readwrite.com/2013/11/27/github-pages-explained#awesm=~oII5EQELsqV6S7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!