Class: Maven::Tools::DSL::ProjectGemspec
- Includes:
- GemSupport
- Defined in:
- lib/maven/tools/dsl/project_gemspec.rb
Instance Attribute Summary
Attributes inherited from Gemspec
Instance Method Summary collapse
Methods included from GemSupport
#setup_gem_support, #setup_jruby_plugins_version
Methods inherited from Gemspec
#gem, #help, #initialize, #jar, #method_missing, #pom
Methods included from Coordinate
#gav, #group_artifact, #to_coordinate, #to_split_coordinate, #to_split_coordinate_with_scope, #to_version
Constructor Details
This class inherits a constructor from Maven::Tools::DSL::Gemspec
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Maven::Tools::DSL::Gemspec
Instance Method Details
#gem_deps(spec, options) ⇒ Object
71 72 73 74 75 76 77 78 79 |
# File 'lib/maven/tools/dsl/project_gemspec.rb', line 71 def gem_deps( spec, ) if [:profile] @parent.profile! [:profile] do super end else super end end |
#process(spec, name, options) ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/maven/tools/dsl/project_gemspec.rb', line 31 def process( spec, name, ) @parent.build.directory = '${basedir}/pkg' version = spec.version.to_s if spec.version.prerelease? && [ :snapshot ] != false && ! version.end_with?( '-SNAPSHOT' ) version += '-SNAPSHOT' end @parent.id "rubygems:#{spec.name}:#{version}" @parent.name( spec.summary || spec.name ) @parent.description spec.description @parent.url spec.homepage if spec.homepage && spec.homepage.match( /github.com/ ) con = spec.homepage.sub( /http:/, 'https:' ).sub( /\/?$/, ".git" ) @parent.scm :url => spec.homepage, :connection => con end spec.licenses.flatten.each do |l| if Maven::Tools::LICENSES.include?(l.downcase) lic = Maven::Tools::LICENSES[ l.downcase ] @parent.license( :name => lic.short, :url => lic.url, :comments => lic.name ) else @parent.license( l ) end end = [ spec. || [] ].flatten emails = [ spec.email || [] ].flatten .zip( emails ).each do |d| @parent.developer( :name => d[0], :email => d[1] ) end @parent.packaging 'gem' if setup_gem_support( @parent, , spec ) @parent.extension 'de.saumya.mojo:gem-with-jar-extension:${jruby.plugins.version}' else @parent.extension 'de.saumya.mojo:gem-extension:${jruby.plugins.version}' end super end |