bergerhealer/BKCommonLib

JavaDocs link is broken, redirects to another site

Closed this issue · 8 comments

vvoww commented

https://jd.mg-dev.eu/BKCommonLib in the Readme.md

The javadocs are in maven now

I think it should be possible to set something up so the last built bkcommonlib and traincarts javadocs are hosted somewhere. I'll put it on wip, you can leave this ticket up until thats implemented (and links updated)

I personally think the easiest solution would be to make BKCommonLib and TC build the javadocs towards a docs folder and then use GitHub Pages together with a custom subdomain to host everything here.

The setup I imagine:

  • Create a bergerhealer.github.io repository
  • Add basic stuff to it to have a landing page when connecting to either bergerhealer.github.io or a custom subdomain
  • Add a CNAME file with jd.mg-dev.eu or something else as subdomain and configure the DNS Settings accordingly
  • Enable GitHub Pages for the repository
  • Setup BKCommonLib and TC to build javadocs towards a docs directory when using the javadoc command
  • Enable GitHub Pages for those repositories by selecting the main branch and the docs folder
  • The Docs should now be accessible on jd.mg-dev.eu/bkcommonlib and jd.mg-dev.eu/traincarts respectively

It looks like a lot of work on first, but I'm sure it would be a major benefit in the end as GH Pages are reliable and free to use.

Who would push the docs folder changes? A separate commit issued by jenkins?

Who would push the docs folder changes? A separate commit issued by jenkins?

Yeah. Didn't see this problem.
It could be done that way probably, but I believe it could be better to utilize GitHub Actions to auto-build and auto-push Javadoc changes to the folder.

Here can you find an example I use to achieve this.

The biggest downside here would be that it causes an additional commit which would trigger jenkins, but I believe you could configure Jenkins to ignore/skip commits made towards specific folders.

A perhaps better and doable solution is, to setup jenkins to make generated Javadocs accessible. Other libraries like JDA do that for their Javadocs and it could simplify stuff, but I'm not sure how this would be set up....

Jenkins already has a running nginx which I can configure to point to a certain directory, so I think thats honestly the easiest solution right now. I like the idea of using github pages and a repository to host it in, but idk how I feel about commits being created next to source commits and stuff.

Maybe a separate repository for it?

But if I let jenkins build it and copy/extract it in some folder as post-build step, its done too

From my basic understanding would you configure maven to generate javadocs in a folder (Aforementioned docs folder) and then Let Jenkins build those docs using the javadoc command, which should result in something like https://ci.mg-dev.eu/job/BKCommonLib/ws/docs to exist.
Then I think you would just need to make this folder accessible or something...

As I said do I barely know anything, so you probably would need to dig around a bit.

There's now a new URL for javadocs over here: https://ci.mg-dev.eu/javadocs

Ive also updated the discord links page, the link on spigot, and added it to the jenkins bkcommonlib description.