Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
将github用作maven存储库校验和验证失败_Maven_Github_Repository_Checksum - Fatal编程技术网

将github用作maven存储库校验和验证失败

将github用作maven存储库校验和验证失败,maven,github,repository,checksum,Maven,Github,Repository,Checksum,我曾尝试将github用作我在那里主持的项目的maven存储库,但在使其正常工作时遇到了一些问题。首先,这是一个项目: 我创建了一个分支“mvn repo”,用来保存maven发布文件。我按照此过程为该分支创建maven文件: 我已经确认文件在上面。然后,我将其添加到pom.xml中,用于使用cache4guice库的项目: <repository> <id>com.github.cache4guice</id> <url>ht

我曾尝试将github用作我在那里主持的项目的maven存储库,但在使其正常工作时遇到了一些问题。首先,这是一个项目:

我创建了一个分支“mvn repo”,用来保存maven发布文件。我按照此过程为该分支创建maven文件:

我已经确认文件在上面。然后,我将其添加到pom.xml中,用于使用cache4guice库的项目:

<repository>
    <id>com.github.cache4guice</id>
    <url>https://github.com/dwatrous/cache4guice/tree/mvn-repo</url>
    <!-- use snapshot version -->
    <snapshots>
        <enabled>true</enabled>
        <updatePolicy>always</updatePolicy>
    </snapshots>
</repository>
我检查过了,jar文件看起来确实是假的。我不能用zip工具打开它,而且它的大小比存储库中的稍大


你知道我哪里出错了,或者maven得到的文件为什么是假的吗?

事实证明这很简单。我只需要将存储库声明更改为referenceraw.github.com,如下所示:

<repository>
    <id>com.github.cache4guice</id>
    <url>https://raw.github.com/dwatrous/cache4guice/mvn-repo</url>
    <!-- use snapshot version -->
    <snapshots>
        <enabled>true</enabled>
        <updatePolicy>always</updatePolicy>
    </snapshots>
</repository>

com.github.cache4guice
https://raw.github.com/dwatrous/cache4guice/mvn-repo
真的
总是
我仍然遇到校验和问题,但所有文件都已正确下载,我可以构建。

我刚刚意识到URL显示了嵌入github接口的文件。要获取实际文件,我需要“原始”查看它。我仍然不确定在我的include中到底要更改什么。
Downloading: https://github.com/dwatrous/cache4guice/tree/mvn-repo/com/github/cache4guice/0.1/cache4guice-0.1.pom
Checksum validation failed, expected <!DOCTYPE but is 6ca9a53135148bf33e1b08aadc611b65489b4991 for https://github.com/dwatrous/cache4guice/tree/mvn-repo/com/github/cache4guice/0.1/cache4guice-0.1.pom
Checksum validation failed, expected <!DOCTYPE but is 57e202c6b25139da08d065550ebd8c50d9f7d162 for https://github.com/dwatrous/cache4guice/tree/mvn-repo/com/github/cache4guice/0.1/cache4guice-0.1.pom

Downloaded: https://github.com/dwatrous/cache4guice/tree/mvn-repo/com/github/cache4guice/0.1/cache4guice-0.1.pom (38 KB at 2.7 KB/sec)
The POM for com.github:cache4guice:jar:0.1 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
Downloading: http://morphia.googlecode.com/svn/mavenrepo/com/github/cache4guice/0.1/cache4guice-0.1.jar

Downloading: https://github.com/dwatrous/cache4guice/tree/mvn-repo/com/github/cache4guice/0.1/cache4guice-0.1.jar
Checksum validation failed, expected <!DOCTYPE but is 12bd0042aad0971621728f9ba3c048106ef8a84e for https://github.com/dwatrous/cache4guice/tree/mvn-repo/com/github/cache4guice/0.1/cache4guice-0.1.jar
Checksum validation failed, expected <!DOCTYPE but is 1506b45c11f00ba484462660f61a83ac14620761 for https://github.com/dwatrous/cache4guice/tree/mvn-repo/com/github/cache4guice/0.1/cache4guice-0.1.jar

Downloaded: https://github.com/dwatrous/cache4guice/tree/mvn-repo/com/github/cache4guice/0.1/cache4guice-0.1.jar (23 KB at 4.7 KB/sec)
COMPILATION ERROR : 
-------------------------------------------------------------
error: error reading C:\Users\watrous\.m2\repository\com\github\cache4guice\0.1\cache4guice-0.1.jar; error in opening zip file
<repository>
    <id>com.github.cache4guice</id>
    <url>https://raw.github.com/dwatrous/cache4guice/mvn-repo</url>
    <!-- use snapshot version -->
    <snapshots>
        <enabled>true</enabled>
        <updatePolicy>always</updatePolicy>
    </snapshots>
</repository>