The integration with buildr is crude and for some reason the rdoc is no
longer formated correct. I will update it to make it legible again.
https://github.com/mguymon/buildr-resolver
This is the ruby wrapper for the Aether java libs, which buildr-resolver
depends on
https://github.com/mguymon/naether
Here is an example of using only the compile scope deps from a POM.
task :compile => :resolve_deps
task :resolve_deps do |t|
DEP_EXCLUDES = ['commons-logging', 'log4j', 'logkit']
resolved_deps = Buildr::Resolver.resolve( {_('pom.xml') =>
['compile']}, :download => true, :excludes => DEP_EXCLUDES )
compile.with( resolved_deps )
end
On 10/28/2011 11:56 AM, Peter Tillotson wrote:
That sounds and looks ideal, using the actual maven library trumps Ivy and
looks as though it could be simpler, have / can you published your wrapper?
p
________________________________
From: Michael Guymon<michael.guy...@gmail.com>
To: dev@buildr.apache.org
Sent: Friday, 28 October 2011, 16:09
Subject: Re: Experiences with transitive dependencies in buildr
I had a similar experience when I started needing transitive resolution, but
went a different route. My solution is a wrapper around Maven's dependency
resolution framework, Aether. I have a hybrid Buildr setup, where Buildr can
load a pom to get all the dependencies but Buildr does all the heavy lifting.
The additional perk is Eclipse is happy using the pom to map out the project.
On 10/28/2011 05:04 AM, Peter Tillotson wrote:
About a year ago I started using buildr. I needed to move from Ant, and
integrate with maven projects, but had always found maven deeply frustrating I
thought I'd share my experiences of using buildr and my recommendations.
But first why not maven:
* Always seems to need internet connection, either for plugins or
repositories
* I can never remember the correct incantation
* XML is the wrong tool for a build system Why buildr:
* Repository setting and dependency definitions are clean and simple
* With jruby I can check the whole lot into source control, so everyone
has a working build plugins and all
* I can drop back to rake / ruby when needed * I can set http_proxy in
a file for everyone, somewhere obvious So here is my big problem, transitive
dependencies management to my mind is broken. I say this because:
* Built in transitive has had a tendency to leak test dependencies through
to run and compile time dependencies
* No conflict resolution is done so I have 4 versions of commons logging
* Transitive off by default is okay, but I still need to resolve versions
* Transitive dependencies are not fully compliant with the some pom
features eg (${project.groupId}) buildr-dependency-extensions
* Does conflict resolution, but suffers from the pom loading features above
* There is also a race condition that somehow stops transitive
dependencies getting in packaged war
ivy4r
* Great - ivy has good compliance, but
* I need lots of hard to read XML, and proxy settings are back to
environment variables
Okay so what are my recommendations:
* Transitive off by default is fine, but conflict resolution is needed
across all (transitive and none) dependencies with versions I define dominating
* Needs to comply with pom features, without full repository integration
the build is broken
* Ivy4r seems to be a good choice, I suggest getting the wrapper written
so that your elegant repository, proxy and definitions can be handed off via
the transitive call to ivy
* buildr-dependency-extensions - conflict resolution is a good start
Apologies for the long email but thought I'd cover the results of a few days
fighting with dependency management in buildr et.
man thanks
p