Sha256: 687e9c29282fe3827837ef2d9c225d60baca07c7f46b92425354bc57789c045c

Contents?: true

Size: 540 Bytes

Versions: 3

Compression:

Stored size: 540 Bytes

Contents

# encoding: UTF-8

require "pathname"

module Gjp
  # implements the get-parent-pom subcommand
  class ParentPomGetter

    def self.log
      Gjp.logger
    end

    # returns the pom's parent, if any
    def self.get_parent_pom(filename)
      begin
        pom = Pom.new(filename)
        site = MavenWebsite.new

        site.download_pom(pom.parent_group_id, pom.parent_artifact_id, pom.parent_version)
      rescue RestClient::ResourceNotFound
        $stderr.puts "Could not find a parent for this pom!" 
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
gjp-0.10.0 lib/gjp/get_parent_pom.rb
gjp-0.9.0 lib/gjp/get_parent_pom.rb
gjp-0.8.0 lib/gjp/get_parent_pom.rb