将 Enunciate 与 Maven/多个模块结合使用
我有多个 Maven 模块,它们为我的服务公开了各种 REST。最重要的是,我有一个(几乎是空的)模块,称为项目文档,我想使用它并生成聚合的 Enunciate api 文档。不幸的是,Enunciate 确实希望在执行它的模块中找到一些(如果不是全部)REST。
我已经尝试过这个 https://github.com /stoicflame/enunciate/wiki/Multi-Module-Projects-%28Version-1%29,但似乎不起作用。此外,我还没有找到 org.codehaus.enunciate:maven-enunciate-plugin 的任何教程/描述。
查看上面的链接,我已明确公开其中一个模块的源代码,并将其复制到 target/enunciate-scratch
目录。但是,我认为我缺少一些配置选项。
有人可以帮忙吗?
I have multiple Maven modules that expose various REST for my service. On top of that, I have an (almost empty) module, called project-docs, that I want to use and generate an aggregated Enunciate api documentation. Unfortunately, Enunciate really expects some (if not all) the REST to be found within the module where it gets executed.
I have tried this https://github.com/stoicflame/enunciate/wiki/Multi-Module-Projects-%28Version-1%29, but doesn't seem to work. Furthermore, I haven't found any tutorial/description of the for org.codehaus.enunciate:maven-enunciate-plugin.
Looking at the link above, I have explicitly exposed the source code from one of modules, and it gets copied to target/enunciate-scratch
directory. However, I think I'm missing some configuration options.
Can anyone help?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您是否尝试在项目文档模块中添加依赖项?看起来 enunciate 要求类文件应在类路径中可用,并且也应在 enunciate xml 文件中导入。
Did you try adding the dependency in the project-docs module? Looks like enunciate requires that the class files should be available in classpath and also imported in enunciate xml file.
我不确定“似乎不起作用”是什么意思,但如果您在阐明应用的项目中没有 REST 端点,则可能必须显式“包含”这些端点:
I'm not sure what "doesn't seem to work" means, but if you have no REST endpoints in the enunciate-applied project, you may have to explicitly "include" these endpoints:
您可以尝试 api-import 而不是 api-classes
Instead of api-classes can you try api-import