Closed Andre601 closed 5 months ago
as of the time i am seeing this, the answer is "downgrade to java 11"
Not really a solution tho.
Somebody finally found an updated one!
https://github.com/ScaCap/spring-auto-restdocs/tree/master/spring-auto-restdocs-json-doclet-jdk9
Well, "Updated"... If you ignore the fact this repository is archived.
Additionally, this seems to be specifically for Spring and not just Java itself? Unless I'm missing something.
Hello.
I have not used this package in years, so obviously I have no personal reasons to refactor this to support the new jdk.java.javadoc API.
Looking over the code quickly, I see that pretty much every part of sun.javadoc has an equivalent (or a replacement) in jdk.java.javadoc. I encourage anyone who wants to see this package work in modern JDK to look at https://docs.oracle.com/en/java/javase/11/docs/api/jdk.javadoc/jdk/javadoc/doclet/package-summary.html docs and see if it's feasible to just replace the sun.javadoc types to their new javax element alternatives, i don't see why that wouldn't work, it seems most types I used have a 1:1 replacement type.
This seems like a fairly easy PR, if you truly need this package, get it working and I'll gladly merge it here on a new JDK12+ branch
One major I can already see is the fact that this repository lacks a lot of major files required to even setup a proper environment to build the final jar in, such as a pom.xml or build.gradle.
This makes it extremely difficult to work with, and making one from scratch would probs be an easier task in the end...
It's a single file using two jar imports. i dont think I even made it in an IDE.... 😆
That is noticable. Also your statement that most can just have its imports replaced isn't really true either, because while there are alternatives listed, the code itself becomes not really compatible.
One example is the first line of your start method: There RootDoc
is now DocletEnvironment
and ClassDoc
is now TypeElement
.
The main issue comes with getting a collection of these elements. DocletEnvironment
has methods to get sets, but the issue here is that these are sets of ? extends Element
, making it not possible to use Set<TypeElement>
.
And that's just the first line.
That's why I asked if there are updated alternatives to this one here, as this one is clearly not easy to be updated at all... Not to mention would just converting it as-is result in a doclet that doesn't follow certain standards established (i.e. now requiring to implement a interface to include specific methods for options and alike).
Looking at it again, I can see .idea and going through those files shows that there is IDE support for intelliJ, as well as build files to setup your jar artifact
Im going go ahead and close this issue for now since it's been a year of just complaints and "it wont be possible". I encourage anyone who needs this tool to work on it, I don't have any way to test since I don't work with Java projects as much anymore.
Open source works on the basis of small improvements in a codebase that reach goals over time, not on people who ask for features with no intent to make them happen. This library is a 200 line long Java file, designed to generate docs for Java projects... Anyone who uses it can certainly code Java. Even making it "from scratch" would be a single day of work for any seasoned developer.
Should probably pin this if you're gonna close it @RaidAndFade
The Soring code did work for me, btw
Hey.
Not sure if you still maintain it (or give help on it), but I currently was wondering, if there is a updated version of a doclet like this?
The reason I ask is, that I tried to use yours, but since Java 13 is the
com.sun.javadoc
API no longer supported. I would love to use a doclet or something similar to this to generate JSON from my Javadocs to use...