o.gem-maven-plugin.1.0.7.source-code.metadata.rb Maven / Gradle / Ivy
require 'rubygems'
name = ARGV[0]
puts <<-POM
rubygems
#{name}
POM
dep = Gem::Dependency.new(name, Gem::Requirement.default)
fetcher = Gem::SpecFetcher.fetcher
# TODO make a flag to distinguish prereleases and/or releases -
# and match it with the repository flag about SNAPSHOT and RELEASE
tuples = fetcher.find_matching(dep, true, false, false)
tuples = tuples + fetcher.find_matching(dep, false, false, true)
warn name
warn tuples.inspect
tuples.each do |tuple|
puts <<-POM
#{tuple[0][1]}
POM
end
puts <<-POM
#{Time.now.strftime("%Y%m%d%H%M%S")}
POM
© 2015 - 2024 Weber Informatics LLC | Privacy Policy