You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by do...@apache.org on 2017/02/20 11:35:53 UTC
[3/8] buildr git commit: Derive the packaging type using the same
mechanisms as the existing code
Derive the packaging type using the same mechanisms as the existing code
Project: http://git-wip-us.apache.org/repos/asf/buildr/repo
Commit: http://git-wip-us.apache.org/repos/asf/buildr/commit/4c5fc109
Tree: http://git-wip-us.apache.org/repos/asf/buildr/tree/4c5fc109
Diff: http://git-wip-us.apache.org/repos/asf/buildr/diff/4c5fc109
Branch: refs/heads/master
Commit: 4c5fc109b78d137e37e1c74a764f7622cc1e128d
Parents: 782cfdf
Author: Peter Donald <pe...@realityforge.org>
Authored: Mon Feb 20 12:23:29 2017 +1100
Committer: Peter Donald <pe...@realityforge.org>
Committed: Mon Feb 20 12:23:29 2017 +1100
----------------------------------------------------------------------
lib/buildr/java/custom_pom.rb | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/buildr/blob/4c5fc109/lib/buildr/java/custom_pom.rb
----------------------------------------------------------------------
diff --git a/lib/buildr/java/custom_pom.rb b/lib/buildr/java/custom_pom.rb
index 8e1921b..4a4ee9f 100644
--- a/lib/buildr/java/custom_pom.rb
+++ b/lib/buildr/java/custom_pom.rb
@@ -158,7 +158,9 @@ module Buildr
xml.groupId project.group
xml.artifactId project.id
xml.version project.version
- xml.packaging package.type.to_s
+ candidates = project.packages.select{|p| p.classifier.nil? }.collect{|p|p.type.to_s}
+ packaging = !candidates.empty? ? candidates[0] : (project.compile.packaging || :zip).to_s
+ xml.packaging packaging
xml.classifier package.classifier if package.classifier
xml.name project.pom.name if project.pom.name