首页 > 解决方案 > 来自 mvnrepository.com 的一个 maven 依赖项已解决,而另一个则没有

问题描述

TLDR;

一种依赖解决了,而另一种则没有。有人可以分享如何调试它吗?或分享一些关于可能发生的事情的见解?

细节:

我创建了一个新的 Maven 项目来从文件中创建modelsapi输入打字稿。OpenApiV3.yaml

在我的项目pom文件中,我添加了一个插件。

<profile>
        <id>typescript-angular</id>
        <build>
            <plugins>
                <plugin>
                    <groupId>io.swagger</groupId>
                    <artifactId>swagger-codegen-maven-plugin</artifactId>
                    <version>3.0.25</version>

swagger-codegen-maven-plugin不解决。我在构建中收到错误,无法找到它。

<profiles>
    <profile>
        <id>typescript</id>
        <build>
            <plugins>
                <plugin>
                    <groupId>org.openapitools</groupId>
                    <artifactId>openapi-generator-maven-plugin</artifactId>
                    <version>5.1.0</version>

虽然openapi-generator-maven-plugin解决。并且确实生成了对象。

org.openapitools openapi-generator-maven-plugin 5.1.0

io.swagger.codegen.v3 swagger-codegen-maven-plugin 3.0.25

我们在组织中确实有一个本地nexus部署,但显然这种行为pluginRepositories在项目pom文件中是相同的。没有进行任何更改以使其适用于其他依赖项。

    <pluginRepositories>
        <pluginRepository>
            <id>maven-repository</id>
            <name>Maven Repository</name>
            <url>https://mvnrepository.com/artifact/</url>
        </pluginRepository>
        <pluginRepository>
            <id>maven-central</id>
            <name>Maven Central</name>
            <url>https://repo1.maven.org/maven2/</url>
        </pluginRepository>
    </pluginRepositories>

有人可以分享如何调试它吗?或分享一些关于可能发生的事情的见解?

标签: mavenswaggeropenapi

解决方案


推荐阅读