Hi,

----- Peter Donald <pe...@realityforge.org> wrote:
>
> On Sat, Jan 17, 2015 at 12:13 AM, Dieter Vrancken <
> dieter.vranc...@luciad.com> wrote:
> 
> > Listing the dependency transitively would solve both my concerns, so I
> > tried doing the following and it seems to work just fine:
> >
> >     def dependencies
> >       Buildr::transitive 'com.puppycrawl.tools:checkstyle:jar:6.2'
> >     end
> >
> > Is there are a reason this is not done?
> >
> 
> The main reason is that it is not stable and repeatable. Depending on how
> the pom's are authored, that could result in different set's of
> dependencies being included. i.e. If the Pom for
> com.puppycrawl.tools:checkstyle:jar:6.2 lists version ranges, and  a new
> version of a dependency is released that fit's in the dependency range,
> then the set of dependencies will change.
> 
> This means coming back to a project 2 years after it was last touched can
> actually result in the project not working or not compiling.  Rather than
> have that, listing out all the dependencies means it will still work into
> the future.

Your reasoning makes perfect sense. We have a more controlled repo at work,
but not for these kinds of dependencies. Something to think about.

> FWIW I often do something  like
> 
> puts
> transitive('com.puppycrawl.tools:checkstyle:jar:6.2').collect{|d|d.to_spec}.inspect
> 
> To collect the set of dependencies needed.

Very useful advice! I keep forgetting that we can just do these sort of
things programmatically...

Thanks,
Dieter

Reply via email to