[
https://issues.apache.org/jira/browse/BUILDR-486?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12968844#action_12968844
]
Tammo van Lessen edited comment on BUILDR-486 at 12/7/10 1:12 PM:
------------------------------------------------------------------
diff --git a/lib/buildr/packaging/package.rb b/lib/buildr/packaging/package.rb
index 9c85081..a4d63cb 100644
--- a/lib/buildr/packaging/package.rb
+++ b/lib/buildr/packaging/package.rb
@@ -176,6 +176,9 @@ module Buildr
package.extend ActsAsArtifact
package.send :apply_spec, spec.only(*Artifact::ARTIFACT_ATTRIBUTES)
+ # package dependencies are compile dependencies iff not otherwise
set.
+ package.dependencies |= compile.dependencies
+
# Create pom associated with package
class << package
def pom
@@ -183,6 +186,7 @@ module Buildr
pom_filename = Util.replace_extension(self.name, 'pom')
spec = {:group=>group, :id=>id, :version=>version, :type=>:pom}
@pom = Buildr.artifact(spec, pom_filename)
+ @pom.dependencies = dependencies
@pom.content @pom.pom_xml
end
@pom
was (Author: vanto):
The patch was not correct, it didn't not take the compile dependencies
correct.
The following patch corrects that, but for a mysterious reason, it causes a
cyclic dependency. Would be great if someone could shed some light on that.
diff --git a/lib/buildr/packaging/package.rb b/lib/buildr/packaging/package.rb
index 9c85081..b99f084 100644
--- a/lib/buildr/packaging/package.rb
+++ b/lib/buildr/packaging/package.rb
@@ -183,12 +183,16 @@ module Buildr
pom_filename = Util.replace_extension(self.name, 'pom')
spec = {:group=>group, :id=>id, :version=>version,
:type=>:pom} @pom = Buildr.artifact(spec, pom_filename)
+ @pom.dependencies = dependencies
@pom.content @pom.pom_xml
end
@pom
end
end
+ # package dependencies are compile dependencies iff not otherwise
set+ package.dependencies |= compile.dependencies
+
file(Buildr.repositories.locate(package)=>package) { package.install
# Add the package to the list of packages created by this project, an
> Buildr-generated poms should include dependencies
> -------------------------------------------------
>
> Key: BUILDR-486
> URL: https://issues.apache.org/jira/browse/BUILDR-486
> Project: Buildr
> Issue Type: Improvement
> Components: Dependency management
> Affects Versions: 1.4.1
> Reporter: Alex Boisvert
> Priority: Minor
> Fix For: Wish List
>
> Attachments: BUILDR-486.patch
>
>
> To quote a personal email I received:
> " I just realized that buildr-created poms have zero dependencies. Wtf?
> That's kind of the point of publishing a pom. :-)"
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.