class Maven::Tools::DSL::ExclusionDSL

Public Class Methods

create( dep, *args, &block ) click to toggle source
# File lib/maven/tools/dsl/exclusions_dsl.rb, line 63
def self.create( dep, *args, &block )
  args, options = args_and_options( *args )
  e = ExclusionDSL.new
  case args.size
  when 1
    e.group_id, e.artifact_id = args[0].split( /:/ )
  when 2
    e.group_id, e.artifact_id = *args
  end
  e.instance_eval( &block ) if block
  fill_options( e, options || {} )
  dep.exclusions << e.model
  e
end
new() click to toggle source
# File lib/maven/tools/dsl/exclusions_dsl.rb, line 78
def initialize
  @model = Exclusion.new
end

Public Instance Methods

help() click to toggle source
# File lib/maven/tools/dsl/exclusions_dsl.rb, line 82
        def help
          warn self.class.help( 'exclusion', :group_id, :artifact_id ) + <<EOS
argument: exclusion 'group_id:artifact_id'
arguments: exclusion 'group_id','artifact_id'
EOS
        end
to_coordinate() click to toggle source
# File lib/maven/tools/dsl/exclusions_dsl.rb, line 89
def to_coordinate
  "#{@model.group_id}:#{@model.artifact_id}"
end