未在 Maven 项目中下载 Bitbucket 依赖项
Bitbucket dependencies not being downloaded in maven project
我正在尝试编写一个 BitBucket 拉取请求侦听器。但是当我尝试创建一个 maven 项目时,相关的 jars 没有被下载。
<!-- 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,这会起作用吗?
您还需要定义存储库。
所以在 <dependencies>
之前将其放入您的 pom.xml 文件中:
<repositories>
<repository>
<id>atlassian</id>
<url>https://maven.atlassian.com/content/repositories/atlassian-public/</url>
</repository>
</repositories>
mvnrepository.com只是各种图书馆的搜索引擎。当您需要包含存储库时,它通常会在注释中给您一个 link。
示例:
我花了一天多的时间来解决这个问题,这对我有用。
通过命令创建新的 bitbucket 插件项目时出现以下错误:atlas-create-bitbucket-plugin-module
错误: 无法解析 Maven 中的以下依赖关系 POP.xml:
com.atlassian.bitbucket.server
> 比特桶-api
com.atlassian.bitbucket.server
> bitbucket-spi
解决方案:
已将此细分添加到 POM.xml
<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>
我正在尝试编写一个 BitBucket 拉取请求侦听器。但是当我尝试创建一个 maven 项目时,相关的 jars 没有被下载。
<!-- 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,这会起作用吗?
您还需要定义存储库。
所以在 <dependencies>
之前将其放入您的 pom.xml 文件中:
<repositories>
<repository>
<id>atlassian</id>
<url>https://maven.atlassian.com/content/repositories/atlassian-public/</url>
</repository>
</repositories>
mvnrepository.com只是各种图书馆的搜索引擎。当您需要包含存储库时,它通常会在注释中给您一个 link。
示例:
我花了一天多的时间来解决这个问题,这对我有用。
通过命令创建新的 bitbucket 插件项目时出现以下错误:atlas-create-bitbucket-plugin-module
错误: 无法解析 Maven 中的以下依赖关系 POP.xml:
com.atlassian.bitbucket.server > 比特桶-api
com.atlassian.bitbucket.server > bitbucket-spi
解决方案:
已将此细分添加到 POM.xml
<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>