mavenjruby

JRuby - loading resource from classloader failed


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


Solution

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

    Might help someone in the future.