使用github作为maven存储库校验和验证失败(using github as maven repository Checksum validation failed)
我已经尝试使用github作为我在那里托管的项目的maven存储库,但是我遇到了一些让它工作的问题。 首先,这是项目:
https://github.com/dwatrous/cache4guice
我创建了一个分支'mvn-repo'来保存maven发布文件。 我按照这个过程为该分支创建了maven文件:
http://blog.rueedlinger.ch/2012/09/use-github-as-maven-remote-repository/
我已经验证了文件在那里。 然后我将其添加到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>
和
<dependency> <groupId>com.github</groupId> <artifactId>cache4guice</artifactId> <version>0.1</version> </dependency>
当我构建时,我收到以下错误:
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
我查了一下,jar文件看起来确实是假的。 我无法使用zip实用程序打开它,其大小略大于存储库中的大小。
我知道哪里出错了或为什么文件maven正在变得似乎是假的?
I've tried to use github as a maven repository for a project I host there, but I'm having some issues getting it to work. First off, here's the project:
https://github.com/dwatrous/cache4guice
I created a branch, 'mvn-repo', to hold the maven release files. I followed this process to create the maven files for that branch:
http://blog.rueedlinger.ch/2012/09/use-github-as-maven-remote-repository/
I have verified the files are up there. I then added this to the pom.xml for a project that uses the cache4guice library:
<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>
and
<dependency> <groupId>com.github</groupId> <artifactId>cache4guice</artifactId> <version>0.1</version> </dependency>
When I build I get the following errors:
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)
And eventually this:
COMPILATION ERROR : ------------------------------------------------------------- error: error reading C:\Users\watrous\.m2\repository\com\github\cache4guice\0.1\cache4guice-0.1.jar; error in opening zip file
I checked and the jar file does appear to be bogus. I can't open it with a zip utility and the size is slightly larger than what is in the repository.
Any idea where I went wrong or why the file maven is getting seems to be bogus?
原文:https://stackoverflow.com/questions/16718263
最满意答案
var myvalue = function() { myfunction(1,2); };
myvalue是一个匿名函数,使用指定的参数调用myfunction。 您可以调用它,如果您打印它进行调试,它将类似于:
function () { myfunction(1, 2); }
var myvalue = function() { myfunction(1,2); };
myvalue is a anonymous function that calls myfunction with the specified parameters. You can call it, and if you print it for debugging, it will look something like:
function () { myfunction(1, 2); }
相关问答
更多-
TCP/IP模型是一个________。[2023-10-02]
a -
下列中不属于面向对象的编程语言的是?[2022-05-30]
a -
我玩了一段时间,但由于使用paramflags实例化函数的方式需要导出的函数名称和DLL的语法,它不考虑导出的全局函数指针 。 当然,你可以通过定义一个包装来分配和返回输出参数来获得相同的行为。 _four = function.in_dll( dll, 'four' ) def four(input): output = ctypes.c_int() _four(output,input) return output.value output = four(5) print('ou ...
-
您有两个基本选择:通过指针传递或通过引用传递。 传递指针需要使用指向指针的指针: void modify_pointer(node **p) { *p = new_value; } modify_pointer(&d); 按引用传递使用& : void modify_pointer(node *&p) { p = new_value; } modify_pointer(d); 如果您将指针作为node *d传递,那么修改函数内的d只会修改本地副本,如您所见。 You have two ...
-
var myvalue = function() { myfunction(1,2); }; myvalue是一个匿名函数,使用指定的参数调用myfunction。 您可以调用它,如果您打印它进行调试,它将类似于: function () { myfunction(1, 2); } var myvalue = function() { myfunction(1,2); }; myvalue is a anonymous function that calls myfunction w ...
-
这行代码: current = &mesh->GetVert(0); 也许可以更具说明性地被认为是: { Point3 _tmp_point = mesh->GetVert(0); current = &_tmp_point; // _tmp_point gets destroyed } // current points to destroyed temporary (注意:我假设GetVert返回Point3而不是Point3& ,否则你不会有任何问题) 基本上问题是curr ...
-
清除缓存可能会起作用 - Resharper - > Options - > Environment - > General并单击Clear Caches按钮。 Clearing the caches would probably work - Resharper->Options->Environment->General and click the Clear Caches button.
-
由于您尝试拟合的函数是多项式,因此可以使用numpy.polyfit >>> numpy.polyfit(x, y, 2) # The 2 signifies a polynomial of degree 2 array([ -1.04978546, 115.16698544, 236.16191491]) 这意味着最佳拟合是y~-1.05 x 2 + 115.157x + 236.16 。 对于一般函数,您对它的了解越多(例如,它是凸的,可微的,两次可微的等等),使用scipy.optimize. ...
-
衰变的lambda指向存储的函数在哪里?(Where is the function that a decayed lambda points to stored? How is it freed?)[2023-06-24]
lambda不是指针,但可以转换为指向函数的指针。 函数不像C ++中的值那样“存储”。 实际上,它们存在于可执行文件的代码段中,并由可执行文件/ dll加载器加载到写保护的执行位集页面中。 无状态lambda的代码也不例外。 转换只返回一个指向函数的指针,该函数与lambda的主体具有相同的效果,不多也不少。 请记住,这只适用于无状态的lambda。 没有要存储的非静态数据。 现在, +东西是一个技巧,因为当你将一元运算operator+应用于一个对象时,会尝试转换,并找到一个uniqie类型(将函数对象 ... -
指向任意函数的“通用函数签名”指针(a “general function signature” pointer that points to an arbitrary function)[2022-01-24]
函数类型是C ++中的编译时,因此它不起作用,除非您可以提前定义所有要使用的类型。 它是将参数推送到堆栈(和本地变量就是这样)并将函数调用为void(__cdecl *)(void)的问题。 对于其他类型的函数(如fastcall或thiscall),它可能会更成问题。 更新:我实际上做了一个例子,它可以在键盘上工作:(也适用于stdcall函数,因为堆栈恢复后对齐的堆栈分配) http://codepad.org/0cf0YFRH #include#ifdef __GNUC__ ...