Sha256: 8d8ee8ff37047f932e7fa9b4d3ff47e36f1792189eb0546becc51cb6e6699059

Contents?: true

Size: 953 Bytes

Versions: 195

Compression:

Stored size: 953 Bytes

Contents

JAVA_LIBS = {}

unless RUBY_VERSION == '1.8.6'
  # When we're building native windows gems with 1.8.6 this block of code fails.
  # We'll just disable running it - it's not needed at that stage of the build.
  
  require 'rexml/document'
  pom = REXML::Document.new(IO.read(File.dirname(__FILE__) + '/../../java/pom.xml'))
  pom_version = REXML::XPath.first(pom, '//xmlns:project/xmlns:version/text()').to_s
  REXML::XPath.each(pom, '//xmlns:project/xmlns:dependencies/xmlns:dependency').each do |dep|
    groupId = dep.get_elements('groupId')[0].text()
    artifactId = dep.get_elements('artifactId')[0].text()
    version = dep.get_elements('version')[0].text()
    scope = dep.get_elements('scope')[0].text() rescue nil

    jar = "~/.m2/repository/#{groupId.gsub(/\./, '/')}/#{artifactId}/#{version}/#{artifactId}-#{version}.jar"
    JAVA_LIBS["#{groupId}-#{artifactId}"] = jar if scope != 'test'
    require jar if defined?(JRUBY_VERSION)
  end
end

Version data entries

195 entries across 195 versions & 3 rubygems

Version Path
gherkin-2.4.17-java spec/gherkin/java_libs.rb
gherkin-2.4.16 spec/gherkin/java_libs.rb
gherkin-2.4.16-x86-mswin32 spec/gherkin/java_libs.rb
gherkin-2.4.16-x86-mingw32 spec/gherkin/java_libs.rb
gherkin-2.4.16-universal-dotnet spec/gherkin/java_libs.rb
gherkin-2.4.16-java spec/gherkin/java_libs.rb
gherkin-2.4.15 spec/gherkin/java_libs.rb
gherkin-2.4.15-x86-mswin32 spec/gherkin/java_libs.rb
gherkin-2.4.15-x86-mingw32 spec/gherkin/java_libs.rb
gherkin-2.4.15-universal-dotnet spec/gherkin/java_libs.rb
gherkin-2.4.15-java spec/gherkin/java_libs.rb
gherkin-2.4.14 spec/gherkin/java_libs.rb
gherkin-2.4.14-x86-mswin32 spec/gherkin/java_libs.rb
gherkin-2.4.14-x86-mingw32 spec/gherkin/java_libs.rb
gherkin-2.4.14-universal-dotnet spec/gherkin/java_libs.rb
gherkin-2.4.14-java spec/gherkin/java_libs.rb
gherkin-2.4.13 spec/gherkin/java_libs.rb
gherkin-2.4.13-x86-mswin32 spec/gherkin/java_libs.rb
gherkin-2.4.13-x86-mingw32 spec/gherkin/java_libs.rb
gherkin-2.4.13-universal-dotnet spec/gherkin/java_libs.rb