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
resque-pool-0.3.0 vendor/bundle/ruby/1.8/gems/gherkin-2.3.3/spec/gherkin/java_libs.rb
resque-pool-0.3.0.beta.2 vendor/bundle/ruby/1.8/gems/gherkin-2.3.3/spec/gherkin/java_libs.rb
gherkin-2.6.5 spec/gherkin/java_libs.rb
gherkin-2.6.5-x86-mswin32 spec/gherkin/java_libs.rb
gherkin-2.6.5-x86-mingw32 spec/gherkin/java_libs.rb
gherkin-2.6.5-universal-dotnet spec/gherkin/java_libs.rb
gherkin-2.6.5-java spec/gherkin/java_libs.rb
gherkin-2.6.4 spec/gherkin/java_libs.rb
gherkin-2.6.4-x86-mswin32 spec/gherkin/java_libs.rb
gherkin-2.6.4-x86-mingw32 spec/gherkin/java_libs.rb
gherkin-2.6.4-universal-dotnet spec/gherkin/java_libs.rb
gherkin-2.6.4-java spec/gherkin/java_libs.rb
gherkin-2.6.3 spec/gherkin/java_libs.rb
gherkin-2.6.3-x86-mswin32 spec/gherkin/java_libs.rb
gherkin-2.6.3-x86-mingw32 spec/gherkin/java_libs.rb
gherkin-2.6.3-universal-dotnet spec/gherkin/java_libs.rb
gherkin-2.6.3-java spec/gherkin/java_libs.rb
gherkin-2.6.2 spec/gherkin/java_libs.rb
gherkin-2.6.2-x86-mswin32 spec/gherkin/java_libs.rb
gherkin-2.6.2-x86-mingw32 spec/gherkin/java_libs.rb