chenguoyu
V2EX  ›  Java

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

  •  
  •   chenguoyu · May 1, 2020 · 1490 views
    This topic created in 2227 days ago, the information mentioned may be changed or developed.

    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 replies    2020-05-03 09:44:00 +08:00
    anzu
        1
    anzu  
       May 2, 2020   ❤️ 1
    我试了编译你的项目没问题
    chenguoyu
        2
    chenguoyu  
    OP
       May 3, 2020
    @anzu #1 ...我打开本地的项目,编译又报错了,然后我去 github 把项目下载下来,再编译下。又没有问题,简直吐血,找了一整个下午的问题。非常感谢,不然我肯定认为不行
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2964 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 09:08 · PVG 17:08 · LAX 02:08 · JFK 05:08
    ♥ Do have faith in what you're doing.