-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I can't use the Maven plug-in #181
Comments
sounds like #154? |
Yes, but I don't know how to solve this problem. I used spring-auto-restdocs and a lot of scala case class in my project, the spring-auto-restdocs only parse javadoc. I rely on scaladoc to output the restapi description. |
what version of genjavadoc are you using? |
I tried 0.11 and 0.13. My POM configuration is as follows: `
|
So what should I do? |
#156 should have been fixed in 0.12, so if you're still seeing the problem with 0.13 then either that didn't completely fix the issue or what you are seeing is a different issue. A useful next step could be to put together and share a "reproducer" project that shows the problem. That would be a very helpful starting point for someone to look further into the problem. Perhaps a bit more complicated, reproducing the problem as a genjavadoc test case would also be great. |
Thank you for your reply. I uploaded a demo to reproduce the error. Please have a look. genjavadoc-error-demo |
The first problem I noticed is that the empty package is not handled correctly in a generic type parameter, I added that as a separate issue under #182 |
When I add a package, indeed I see errors like:
While these are definitely errors, perhaps the problem here is that we try to compile those sources at all. genjavadoc has some known limitations that prevent it from producing actually-correct Java code. It just creates Java code that is 'correct enough' to be able to use it as the basis to create javadocs. The problem might be that you're adding the generated sources to your 'main' project with the |
em, |
Okay, I'll take a look at the links you provide, because using this project is looking to inject other operations into the process of creating Javadoc to generate other data. |
I wonder if it is possible for plug-ins to provide an extensible interface that injects scaladoc-like abstractions into the scope of the interface. Then can users define other behaviors or side effects? It's like slick's CodeGen. I think it's good that users can extend some behavior and transform the data they need, and be more flexible in dealing with scaladoc and Javadoc tag compatibility. ` |
I don't understand what you mean by that. but also, probably this issue tracker isn't the place to discuss it |
Thanks to @SethTisue and @raboof's help. I modified a little Maven configuration to avoid the compilation process. Now I can use this library to generate the data I need. Finally, my configuration is as follows:
${project.build.directory}\genjavadoc\com\scst; ${project.basedir} |
Good to hear you managed to get it to work! Is this something that we could/should document better, or was it specific to your project? |
I think it can be adjusted to make it easier to use. Instead of using build-helper-maven-plugin to add genjavadoc's output directory as the source directory, I added genjavadoc's output directory to maven-javadoc-plugin's configuration. Now Javadoc can work in the compile stage, avoiding trying to compile the code generated by genjavadoc. |
like this:
|
I can't compile:
My environment is Maven3.6 + scala2.12.8 + java1.8
For example, I have a class like this:
case class AreaModel(code: String, name: String, level: String, parent: String, code_short: String)
run compile and gened
AreaModel.java and AreaModel$.java
but, Maven throws some errors similar to: abstract and static:
static public abstract boolean canEqual (Object that) ;
How should I solve it?
The text was updated successfully, but these errors were encountered: