lib/maven/tools/gem_project.rb in maven-tools-0.30.0 vs lib/maven/tools/gem_project.rb in maven-tools-0.31.0
- old
+ new
@@ -52,13 +52,18 @@
artifact_id spec.name
version spec.version
name spec.summary || "#{self.artifact_id} - gem"
description spec.description if spec.description
url spec.homepage if spec.homepage
+ done_authors = []
(spec.email || []).zip(spec.authors || []).map do |email, author|
+ done_authors << author
self.developers.new(author, email)
end
+ (spec.authors - done_authors).each do |author|
+ self.developers.new(author, nil)
+ end
# TODO work with collection of licenses - there can be more than one !!!
(spec.licenses + spec.files.select {|file| file.to_s =~ /license|gpl/i }).each do |license|
# TODO make this better, i.e. detect the right license name from the file itself
self.licenses.new(license)
@@ -336,11 +341,11 @@
if configs.size > 0
build.plugin_management do |pm|
options = {
:lifecycleMappingMetadata => {
:pluginExecutions => Maven::Model::NamedArray.new(:pluginExecution) do |e|
- # sort them for testing
- configs.sort {|m,n| -1 *(n.first[1][:artifactId].to_s <=> m.first[1][:artifactId].to_s) }.each { |c| e << c }
+ # sort them - handy for testing
+ configs.sort {|m,n| m[:pluginExecutionFilter][:artifactId].to_s <=> n[:pluginExecutionFilter][:artifactId].to_s }.each { |c| e << c }
end
}
}
pm.plugins.get('org.eclipse.m2e:lifecycle-mapping', '1.0.0').configuration(options)
end