V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
chenguoyu
V2EX  ›  Java

问一个 swagger-maven-plugin 相关的问题

  •  
  •   chenguoyu · 2020-05-01 11:13:30 +08:00 · 639 次点击
    这是一个创建于 1457 天前的主题,其中的信息可能已经有所发展或是发生改变。

    swagger-maven-plugin是能生成 swagger 静态配置文件的 maven 插件。

    这是官方提供的一个demo

    但是官方的 demo 有个问题,就是不是以多模块的方式编译的项目,这是我的项目。 编译的时候报错,请问有人知道怎么解决这个问题吗?

    [ERROR] Number of foreign imports: 1
    [ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
    [ERROR] 
    [ERROR] -----------------------------------------------------
    [ERROR] : javax.xml.bind.annotation.XmlRootElement
    [ERROR] -> [Help 1]
    [ERROR] 
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR] 
    [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException
    
    
    2 条回复    2020-05-03 09:44:00 +08:00
    anzu
        1
    anzu  
       2020-05-02 21:17:22 +08:00   ❤️ 1
    我试了编译你的项目没问题
    chenguoyu
        2
    chenguoyu  
    OP
       2020-05-03 09:44:00 +08:00
    @anzu #1 ...我打开本地的项目,编译又报错了,然后我去 github 把项目下载下来,再编译下。又没有问题,简直吐血,找了一整个下午的问题。非常感谢,不然我肯定认为不行
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1522 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 16:52 · PVG 00:52 · LAX 09:52 · JFK 12:52
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.