使用maven编译时,从github repo下载jar失败



我是Maven的新手。使用此处提及的说明:http://activeintelligence.org/blog/archive/hosting-maven-repository-for-third-party-jars-on-git-bitbucketgithub/,我为第三方jar创建了一个github-maven repo。我可以在这里看到罐子(和相应的pom):https://github.com/sushilmittal/wiki-keyword-extraction/tree/master/repository/com/rapid_i/rapidminer/5.3.006

我的pom.xml有这两个条目对应于上面的jar:

<dependency>
    <groupId>com.rapid_i</groupId>
    <artifactId>rapidminer</artifactId>
    <version>5.3.006</version>
</dependency>

<repositories>
    <repository>
        <id>wiki-keyword-extraction</id>
        <url>https://github.com/sushilmittal/wiki-keyword-extraction/tree/master/repository/</url>
    </repository>
</repositories>

当我进行mvn编译时,我会收到以下警告:

正在下载:https://github.com/sushilmittal/wiki-keywordextraction/tree/master/repository/com/rapid_i/rapidminer/5.3.006/rapidminer-5.3.006.pom[警告]校验和验证失败,应为https://github.com/sushilmittal/wiki-keyword-extraction/tree/master/repository/com/rapid_i/rapidminer/5.3.006/rapidminer-5.3.006.pom

这进一步导致以下错误:

[错误]无法对项目执行目标DataIndex:无法解析项目DataIndex:DataIndex:jar:0.0.1SNAPSHOT:在wiki关键字提取中找不到工件com.rapid_i:rapidminer:jar:5.3.006(https://github.com/sushilmittal/wiki-keyword-extraction/master/repository/)->[帮助1]

如果我手动转到该位置https://github.com/sushilmittal/wiki-keywordextraction/tree/master/repository/com/rapid_i/rapidminer/5.3.006/,我可以看到文件。所以我不明白为什么maven不能从那个位置下载jar/pom。

有什么想法吗?

首先,请阅读这篇文章

其次,将源代码管理系统用作Maven Repository是一个非常糟糕的计划。建议使用Maven Repository Manager。至少有三种实现可用,甚至还有一种在线托管服务。

第三,如果你坚持遵循这个错误的计划,你需要告诉Maven GitHub repo中原始文件的https路径,而不是带有行号等文件内容的HTML呈现

最新更新