首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >maven项目中未下载Bitbucket依赖项

maven项目中未下载Bitbucket依赖项
EN

Stack Overflow用户
提问于 2017-09-05 07:59:59
回答 2查看 1.1K关注 0票数 2

我正在尝试编写一个BitBucket拉请求侦听器。但是当我尝试创建一个maven项目时,与它相关的jars并没有被下载。

代码语言:javascript
复制
<!-- https://mvnrepository.com/artifact/com.atlassian.bitbucket.server    /bitbucket-api -->

<dependency>
  <groupId>com.atlassian.bitbucket.server</groupId>
  <artifactId>bitbucket-api</artifactId>
  <version>4.0.0-m7</version>
  <scope>provided</scope>
</dependency>

[INFO] ------------------------------------------------------------------------
[WARNING] The POM for com.atlassian.bitbucket.server:bitbucket-api:jar:4.0.0-m7 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.470 s
[INFO] Finished at: 2017-09-05T13:31:54+05:30
[INFO] Final Memory: 6M/155M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project bitbucketsniffer: Could not resolve dependencies for project com.bitbucketsniffer:bitbucketsniffer:jar:1.0-SNAPSHOT: Failure to find com.atlassian.bitbucket.server:bitbucket-api:jar:4.0.0-m7 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 -> [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.

有没有一种方法可以像我们使用oracle依赖jar那样手动安装jar,如果是的话,如果我尝试为这个项目创建一个可执行的jar,这个方法会起作用吗?

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2017-09-05 08:57:55

您还需要定义存储库。

因此,将其放入pom.xml文件中,在<dependencies>之前

代码语言:javascript
复制
<repositories>
    <repository>
        <id>atlassian</id>
        <url>https://maven.atlassian.com/content/repositories/atlassian-public/</url>
    </repository>
</repositories>

mvnrepository.com只是一个用于各种库的搜索引擎。当您需要包含一个存储库时,它通常会给您一个注释中的链接。

示例:

票数 1
EN

Stack Overflow用户

发布于 2020-05-26 06:31:35

我花了一天多的时间来解决这个问题,这对我来说是有效的。

在通过命令创建新的bitbucket插件项目时出现了以下错误:atlas-create-bitbucket-plugin-module

错误:无法解决maven POP.xml中的下列依赖关系:

com.atlassian.bitbucket.server > bitbucket-api

com.atlassian.bitbucket.server > bitbucket-spi

解决方案:

将此段添加到POM.xml中

代码语言:javascript
复制
<repositories>
    <repository>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
        <id>central</id>
        <name>bintray</name>
        <url>https://jcenter.bintray.com</url>
    </repository>
</repositories>
<pluginRepositories>
    <pluginRepository>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
        <id>central</id>
        <name>bintray-plugins</name>
        <url>https://jcenter.bintray.com</url>
    </pluginRepository>
</pluginRepositories>
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/46049840

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档