jruby / jruby-maven-plugins

maven plugin to handle rubygems in a maven way. including support for rspec, rails, cucumber, rake, etc
MIT License
112 stars 46 forks source link

support for Ruby 2.x? #89

Open vasili-zolotov opened 7 years ago

vasili-zolotov commented 7 years ago

I am getting errors like this while doing maven build:

...
Downloading: http://rubygems-proxy.torquebox.org/releases/rubygems/swagger-diff/1.0.1/swagger-diff-1.0.1.pom
Downloaded: http://rubygems-proxy.torquebox.org/releases/rubygems/swagger-diff/1.0.1/swagger-diff-1.0.1.pom (4 KB at 4.5 KB/sec)
Downloading: http://rubygems-proxy.torquebox.org/releases/rubygems/swagger-diff/1.0.1/swagger-diff-1.0.1.gem
Downloaded: http://rubygems-proxy.torquebox.org/releases/rubygems/swagger-diff/1.0.1/swagger-diff-1.0.1.gem (84 KB at 96.9 KB/sec)
[INFO] Successfully installed swagger-diff-1.0.1
[INFO] ERROR:  Error installing /Users/zolotov/.m2/repository/rubygems/addressable/2.5.0/addressable-2.5.0.gem:
[INFO]  addressable requires Ruby version >= 2.0.
[INFO] 1 gem installed
[INFO] ERROR:  Error installing /Users/zolotov/.m2/repository/rubygems/public_suffix/2.0.5/public_suffix-2.0.5.gem:
[INFO]  public_suffix requires Ruby version >= 2.0.
...

pom.xml snippet:

      <plugin>
        <groupId>de.saumya.mojo</groupId>
        <artifactId>gem-maven-plugin</artifactId>
        <version>${gem-maven.version}</version>
        <executions>
          <execution>
            <goals>
              <goal>exec</goal>
            </goals>
            <phase>compile</phase>
            <configuration>
              <execArgs>${project.build.directory}/rubygems/bin/swagger-diff -i ${old} ${new}</execArgs>
            </configuration>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>rubygems</groupId>
            <artifactId>swagger-diff</artifactId>
            <version>${swagger-diff.version}</version>
            <type>gem</type>
          </dependency>
        </dependencies>
      </plugin>

Unfortunately there's no version of swagger-diff that would work with Ruby <2.0. Is there a way to make this work? I believe jruby supports ruby 2.2 now.

tjuchniewicz commented 7 years ago

@vasili-zolotov: I use following configuration in my pom to force newer Ruby:

<properties>
   <jruby.version>9.1.8.0</jruby.version>
</properties>
deivid-rodriguez commented 2 years ago

It seems that this is fixable through configuration, and ruby 2.0 is very old anyways. I think it can be closed.