Jruby- classloader的加载资源失败
我正在使用插件gem-maven-plugin
进行MVN install
目标,请参见下面的pom.xml
-
<plugin>
<groupId>de.saumya.mojo</groupId>
<artifactId>gem-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>initialize</goal>
</goals>
</execution>
</executions>
</plugin>
构建失败,并且错误消息:
[错误]无法执行目标de.saumya.mojo:gem-maven-plugin:2.0.1:initialize
由:java.io.filenotfoundexception引起:meta-inf/jruby.home/bin/gem
我正在使用Windows构建,但是该软件已从Linux移植。
文件路径meta-inf/jruby.home/bin/gem
在我的系统上不存在(这是UNIX/Linux路径),是否有一种方法可以解决此错误?
Jruby版本:Jruby 9.1.2.0
OS:Windows Server 2012 R2
I am running a mvn install
goal with the plugin gem-maven-plugin
, see below pom.xml
-
<plugin>
<groupId>de.saumya.mojo</groupId>
<artifactId>gem-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>initialize</goal>
</goals>
</execution>
</executions>
</plugin>
The build is failing with the error message:
[ERROR] Failed to execute goal de.saumya.mojo:gem-maven-plugin:2.0.1:initialize
Caused by: java.io.FileNotFoundException: loading resource from classloader failed: META-INF/jruby.home/bin/gem
I am building using Windows, but the software has been ported from Linux.
The file path META-INF/jruby.home/bin/gem
does not exist on my system (it is a Unix/Linux path), is there a way to fix this error?
jRuby version: jruby 9.1.2.0
OS: Windows Server 2012 R2
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是由损坏的jruby
.jar
文件,从损坏的存储库中复制。将来可能会帮助某人。
This was caused by a corrupted JRuby
.jar
file, copied from a corrupt repository.Might help someone in the future.
谢谢耶尔菲。你做到了。
在扩展Maven直接从Ruby存储库中下载Ruby Gems之后,我围绕它删除了本地存储库。
将以下片段添加到pom.xml:
Thank you Jelphy. You did.
I worked around it deleting my local repo after extending maven to download ruby gems directly from ruby repositories.
Add the following snippets to pom.xml: