简体   繁体   English

如何包含具有无效/过时 POM 的 maven package?

[英]How do I include a maven package that has invalid/outdated POM?

I want to use a package named sourcemap in my project.我想在我的项目中使用名为sourcemap的 package。 It's not available in maven central, but in Atlassian's public maven repository .它在 maven Central 中不可用,但在Atlassian 的公共 maven 存储库中可用。 I therefore set up my pom.xml like this:因此,我像这样设置我的pom.xml

    <repositories>
        <repository>
            <id>atlassian</id>
            <name>Atlassian</name>
            <url>https://packages.atlassian.com/content/repositories/atlassian-public/</url>
        </repository>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>com.atlassian.sourcemap</groupId>
            <artifactId>sourcemap</artifactId>
            <version>1.7.7</version>
        </dependency>
    </dependencies>

Now, the POM file for sourcemap references another POM file from a package named public-pom :现在,sourcemap 的 POM 文件从名为public-pomsourcemap引用另一个 POM 文件:

    <!-- POM for sourcemap (NOT my pom.xml!) -->
    <parent>
        <groupId>com.atlassian.pom</groupId>
        <artifactId>public-pom</artifactId>
        <version>3.0.84</version>
    </parent>

The problem: the POM file references version 3.0.84 of public-pom , but Atlassian's repo no longer provides 3.0.84.问题:POM 文件引用了public-pom的 3.0.84 版本,但 Atlassian 的 repo 不再提供 3.0.84。 Currently, the oldest available version of public-pom is 5.0.0, as you can see here .目前,可用的最旧版本的public-pom是 5.0.0,你可以在这里看到。 Because of this, maven complains when I attempt to build the project:因此,当我尝试构建项目时,maven 会抱怨:

Could not find artifact com.atlassian.pom:public-pom:pom:3.0.84 in atlassian (https://packages.atlassian.com/content/repositories/atlassian-public/)

How can I fix the POM and use this package in my project?如何修复 POM 并在我的项目中使用这个 package?

Mvnrepository lists com.atlassian.pom:public-pom:pom:3.0.84 but when selecting the link to it : Mvnrepository 列出com.atlassian.pom:public-pom:pom:3.0.84但在选择链接时

status:     404
message:    "Could not find resource"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM