Skip to content

Commit

Permalink
Showing 2 changed files with 64 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ruby/stdlib/rubygems/defaults/jruby.rb
Original file line number Diff line number Diff line change
@@ -13,13 +13,13 @@ def ruby
ruby_path = original_ruby
if jarred_path?(ruby_path)
# use quote as the original_ruby does it
ruby_path = "\"#{org.jruby.util.Classpath.jrubyCommand(JRuby.runtime)}\""
ruby_path = "\"#{org.jruby.util.ClasspathLauncher.jrubyCommand(JRuby.runtime)}\""
end
ruby_path
end

def jarred_path?(p)
p =~ /^file:/
p =~ /^(file|uri|jar|classpath):/
end

# A jar path looks like this on non-Windows platforms:
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<project>
<groupId>org.jruby</groupId>
<artifactId>gem-install-with-forked-jruby</artifactId>
<version>1</version>
<modelVersion>4.0.0</modelVersion>

<repositories>
<repository>
<id>rubygems-releases</id>
<url>http://rubygems-proxy.torquebox.org/releases</url>
</repository>
</repositories>

<dependencies>
<dependency>
<groupId>rubygems</groupId>
<artifactId>diff-lcs</artifactId>
<version>1.2.5</version>
<type>gem</type>
</dependency>
<dependency>
<groupId>org.jruby</groupId>
<artifactId>jruby-complete</artifactId>
<version>@project.version@</version>
<type>jar</type>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2</version>
<executions>
<execution>
<phase>package</phase>
<goals><goal>exec</goal></goals>
<configuration>
<executable>java</executable>
<arguments>
<argument>-classpath</argument>
<classpath/>
<argument>org.jruby.Main</argument>
<argument>-S</argument>
<argument>gem</argument>
<argument>install</argument>
<argument>${settings.localRepository}/rubygems/diff-lcs/1.2.5/diff-lcs-1.2.5.gem</argument>
<argument>--ignore-dependencies</argument>
<argument>--install-dir=./gems</argument>
<argument>--no-user-install</argument>
<argument>--wrappers</argument>
<argument>--no-document</argument>
<argument>--local</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

0 comments on commit 6c228c7

Please sign in to comment.