maven - 我自己的仓库的 POM 丢失,没有可用的依赖信息
问题描述
我目前正在学习软件开发并根据使用 jitpack 在另一个项目中使用一个项目的版本来完成一项任务。
第一个项目,我想在我的第二个项目中添加一个依赖项,只有三个类和一个 JUnit 测试。我改变了一些东西,所以我现在处于 V5.0 版本。
https://github.com/MohamedMoustafaNUIG/assignment1/releases/tag/V5.0
我的第二个项目还没有推送,但这是 pom 文件:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.nuig</groupId>
<artifactId>assignment1_driver</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>com.github.MohamedMoustafaNUIG</groupId>
<artifactId>assignment1</artifactId>
<version>v5.0</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
</project>
当我尝试使用依赖项(在 netbeans 中)构建时,出现此错误:
Failed to execute goal on project assignment1_driver:
Could not resolve dependencies for project com.nuig:assignment1_driver:jar:1.0-SNAPSHOT:
Failure to find com.github.MohamedMoustafaNUIG:assignment1:jar:v5.0 in
https://jitpack.io was cached in the local repository,
resolution will not be reattempted until the update interval of jitpack.io has
elapsed or updates are forced -> [Help 1]
我也收到此警告:
The POM for com.github.MohamedMoustafaNUIG:assignment1:jar:v5.0 is missing, no dependency information available
即使 zip 文件(来自链接版本)具有 pom 文件。
任何帮助表示赞赏,因为我不知道如何解决这个问题
解决方案
您要么需要:
assignment1
在同一台机器上构建clean install
以使其在本地存储库中可用。- 部署
assignment1
到 Maven 存储库,clean deploy
然后将其用作<repository>
.
推荐阅读
- reactjs - 社交登录 - 如何在反应中使用函数之外的变量?
- django - POST 时 Drf 节流重启
- javascript - 在刷新页面的一个地方一个一个地展示广告
- r - 如何通过“子”功能提取前四个字符?
- android - 为我的 Android VpnService 实例发送消息或调用函数的最佳实践
- python - 如何在多索引数据框的索引中插入值
- python - numpy where:如何通过匹配一维数组在 3D 数组中找到 2D 数组的索引?
- python - NLTK CFG ValueError:语法不涵盖某些输入词
- laravel - 如何在 Laravel 中通过 Guzzle HTTP 上传文件
- facebook - 第三方网络应用程序是否可以在 Facebook 上发布活动?