Home > Net >  JRuby - loading resource from class loader failed
JRuby - loading resource from class loader failed

Time:05-17

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

CodePudding user response:

This was caused by a corrupted JRuby .jar file, copied from a corrupt repository.

Might help someone in the future.

  • Related