请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

您好,能帮忙看下swagger的问题么

Failed to execute goal io.github.swagger2markup:swagger2markup-maven-plugin:1.3.7:convertSwagger2markup (default-cli) on project dms: Execution default-cli of goal io.github.swagger2markup:swagger2markup-maven-plugin:1.3.7:convertSwagger2markup failed: Plugin io.github.swagger2markup:swagger2markup-maven-plugin:1.3.7 or one of its dependencies could not be resolved: The following artifacts could not be resolved: nl.jworks.markdown_to_asciidoc:markdown_to_asciidoc:jar:1.0, ch.netzwerg:paleo-core:jar:0.11.0: Failure to find nl.jworks.markdown_to_asciidoc:markdown_to_asciidoc:jar:1.0 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced

这边是我这里依赖的问题么

依赖

    <dependency>
        <groupId>io.springfox</groupId>
        <artifactId>springfox-swagger2</artifactId>
        <version>2.9.2</version>
        <exclusions>
            <exclusion>
                <groupId>io.swagger</groupId>
                <artifactId>swagger-annotations</artifactId>
            </exclusion>
            <exclusion>
                <groupId>io.swagger</groupId>
                <artifactId>swagger-models</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>io.springfox</groupId>
        <artifactId>springfox-swagger-ui</artifactId>
        <version>2.9.2</version>
    </dependency>
    <dependency>
        <groupId>io.swagger</groupId>
        <artifactId>swagger-annotations</artifactId>
        <version>1.5.21</version>
    </dependency>
    <dependency>
        <groupId>io.swagger</groupId>
        <artifactId>swagger-models</artifactId>
        <version>1.5.21</version>
    </dependency>


        <plugin>
            <groupId>io.github.swagger2markup</groupId>
            <artifactId>swagger2markup-maven-plugin</artifactId>
            <version>1.3.7</version>
            <configuration>
                <!-- api-docs访问url -->
                <swaggerInput>http://localhost:8080/v2/api-docs</swaggerInput>
                <!-- 生成为单个文档,输出路径 -->
                <outputFile>src/docs/asciidoc/generated/all</outputFile>
                <config>
                    <!-- ascii格式文档 -->
                    <swagger2markup.markupLanguage>ASCIIDOC</swagger2markup.markupLanguage>
                    <swagger2markup.pathsGroupedBy>TAGS</swagger2markup.pathsGroupedBy>
                </config>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.asciidoctor</groupId>
            <artifactId>asciidoctor-maven-plugin</artifactId>
            <version>1.5.6</version>
            <configuration>
                <sourceDirectory>src/docs/asciidoc/generated</sourceDirectory>
                <outputDirectory>src/docs/asciidoc/html</outputDirectory>
                <backend>html</backend>
                <sourceHighlighter>coderay</sourceHighlighter>
                <!--&ndash; html文档格式参数 &ndash;&gt;-->
                <attributes>
                    <doctype>book</doctype>
                    <toc>left</toc>
                    <toclevels>3</toclevels>
                    <numbered></numbered>
                    <hardbreaks></hardbreaks>
                    <sectlinks></sectlinks>
                    <sectanchors></sectanchors>
                </attributes>
            </configuration>
        </plugin>

执行 mvn swagger2markup:convertSwagger2markup 生成ASCIIDOC 报错,后面执行生产html没有报错,但是因为前面报错原因,html没有生产

正在回答 回答被采纳积分+3

2回答

大目 2019-12-05 16:30:47

您好,从异常来看,这个依赖没有下载成功:

The following artifacts could not be resolved: nl.jworks.markdown_to_asciidoc:markdown_to_asciidoc:jar:1.0

建议先执行下mvn clean install -U,然后再执行生成DOC的命令。

1 回复 有任何疑惑可以回复我~
  • softgg #1
    大目老师,download plugin一直下载不下来,这是为什么?
    回复 有任何疑惑可以回复我~ 2020-04-02 16:43:04
  • 大目 回复 softgg #2
    依赖下载不成功一般是网络的问题,另一个情况就是依赖的坐标有问题。
    可以多次执行mvn clean install -U试试
    回复 有任何疑惑可以回复我~ 2020-04-02 19:28:08
提问者 徐子与 2019-12-05 16:33:56

谢谢大佬

0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信