Closed 48038411 closed 2 months ago
Please forgive me; I cannot read or write Chinese, so I used Google Translate to read your message and to translate this response.
If you declare the therapi-runtime-javadoc-scribe
dependency without the provided
scoope, this library will be a transitive dependency of your project. That may be fine if you are building a standalone app, but if you are building a library for other developers to use, they might not want to include therapi-runtime-javadoc-scribe
in their project. That's why it's recommended to use provided
scope.
Alternatively, I think with modern versions of Maven it might be better to configure the compiler plugin to use the annotation processor library using the "annotationProcessorPaths" option, instead of including it as a normal project dependency. The Maven compiler plugin documentation has an example of this here:
https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#optional-parameters
请原谅我,我不会读写中文,所以我用谷歌翻译来阅读您的消息并翻译这个回复。
如果您在声明therapi-runtime-javadoc-scribe
依赖项时没有使用provided
作用域,这个库将成为您项目的传递依赖。如果您正在构建一个独立的应用程序,这可能没问题,但如果您正在构建供其他开发人员使用的库,他们可能不希望在他们的项目中包含therapi-runtime-javadoc-scribe
。这就是为什么建议使用provided
作用域。
另外,我认为使用现代版本的Maven,通过配置编译器插件使用“annotationProcessorPaths”选项来使用注解处理器库可能更好,而不是将其作为普通的项目依赖包含进来。Maven编译器插件的文档在这里有一个示例:
https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#optional-parameters
Please forgive me; I cannot read or write Chinese, so I used Google Translate to read your message and to translate this response.
If you declare the
therapi-runtime-javadoc-scribe
dependency without theprovided
scoope, this library will be a transitive dependency of your project. That may be fine if you are building a standalone app, but if you are building a library for other developers to use, they might not want to includetherapi-runtime-javadoc-scribe
in their project. That's why it's recommended to useprovided
scope.Alternatively, I think with modern versions of Maven it might be better to configure the compiler plugin to use the annotation processor library using the "annotationProcessorPaths" option, instead of including it as a normal project dependency. The Maven compiler plugin documentation has an example of this here:
https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#optional-parameters
请原谅我,我不会读写中文,所以我用谷歌翻译来阅读您的消息并翻译这个回复。
如果您在声明
therapi-runtime-javadoc-scribe
依赖项时没有使用provided
作用域,这个库将成为您项目的传递依赖。如果您正在构建一个独立的应用程序,这可能没问题,但如果您正在构建供其他开发人员使用的库,他们可能不希望在他们的项目中包含therapi-runtime-javadoc-scribe
。这就是为什么建议使用provided
作用域。另外,我认为使用现代版本的Maven,通过配置编译器插件使用“annotationProcessorPaths”选项来使用注解处理器库可能更好,而不是将其作为普通的项目依赖包含进来。Maven编译器插件的文档在这里有一个示例:
https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#optional-parameters
I'm sorry for not paying attention to the author's nationality and communicating with you in Chinese.
According to your suggestion, I defined
The problem was solved. Lombok was introduced because my project is also using lombok. If it is not configured, an error will be reported. Thank you very much for your answer!
项目结构:module/common api 我在common模块引入了0.15.0版本的
common模块对应的类编译后都生成了_Javadoc.json文件,但是引入common模块的api未生成