Ensure that the pom is attached to the jar artifact with empty classifier rather than the last artifact of a type defined. Otherwise a project that defines multiple artifacts of the same type (i.e. `package(:jar)` and `package(:jar, :classifier => :gwt)`) could have the pom named after the package with the classifier rather than the package without a classifer. (i.e. the pom could be incorrectly defined as `mypackage-1.0.0-gwt.pom` rather than `mypackage-1.0.0.pom`).
Project: http://git-wip-us.apache.org/repos/asf/buildr/repo Commit: http://git-wip-us.apache.org/repos/asf/buildr/commit/72f71691 Tree: http://git-wip-us.apache.org/repos/asf/buildr/tree/72f71691 Diff: http://git-wip-us.apache.org/repos/asf/buildr/diff/72f71691 Branch: refs/heads/master Commit: 72f716912b6d22d1777c0cd0ee69e2d308e61c32 Parents: a26a717 Author: Peter Donald <[email protected]> Authored: Thu Sep 28 14:14:54 2017 +1000 Committer: Peter Donald <[email protected]> Committed: Thu Sep 28 14:14:54 2017 +1000 ---------------------------------------------------------------------- CHANGELOG | 5 +++++ lib/buildr/packaging/package.rb | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/buildr/blob/72f71691/CHANGELOG ---------------------------------------------------------------------- diff --git a/CHANGELOG b/CHANGELOG index fbda0e8..ade33db 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,9 @@ 1.5.4 (Pending) +* Fixed: Ensure that the pom is attached to the jar artifact with empty classifier rather than the last + artifact of a type defined. Otherwise a project that defines multiple artifacts of the same type + (i.e. `package(:jar)` and `package(:jar, :classifier => :gwt)`) could have the pom named after + the package with the classifier rather than the package without a classifer. (i.e. the pom could + be incorrectly defined as `mypackage-1.0.0-gwt.pom` rather than `mypackage-1.0.0.pom`). * Added: GWT Addon: Added support for `:js_exports` boolean to enable "JsInteropExports". * Added: BUILDR-732 - Support bnd version 2.1.0 or more. Submitted By Eric Bruneton. * Added: Support to compiling Kotlin http://git-wip-us.apache.org/repos/asf/buildr/blob/72f71691/lib/buildr/packaging/package.rb ---------------------------------------------------------------------- diff --git a/lib/buildr/packaging/package.rb b/lib/buildr/packaging/package.rb index 07ecc9d..e3688ca 100644 --- a/lib/buildr/packaging/package.rb +++ b/lib/buildr/packaging/package.rb @@ -182,7 +182,7 @@ module Buildr #:nodoc: end @pom end - end + end if package.classifier.nil? file(Buildr.repositories.locate(package)=>package) { package.install } @@ -190,7 +190,8 @@ module Buildr #:nodoc: # register it as an artifact. The later is required so if we look up the spec # we find the package in the project's target directory, instead of finding it # in the local repository and attempting to install it. - Artifact.register package, package.pom + Artifact.register package + Artifact.register package.pom if package.classifier.nil? end task('install') { package.install if package.respond_to?(:install) }
