buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shane Witbeck <sh...@digitalsanctum.com>
Subject Re: Detect duplicate artifacts for project
Date Tue, 25 Aug 2009 13:11:07 GMT
I use something like the following to separate the project deps vs. 3rd
party deps:

deps.collect! { |path| Buildr.projects.detect { |prj| prj.packages.detect {
|pkg| pkg.to_s == path } } || path }
project_deps, others = deps.partition { |path| path.is_a?(Buildr::Project) }

where deps is all the dependencies for a project.

HTH,

-Shane


On Tue, Aug 25, 2009 at 3:05 AM, Martin Grotzke <
martin.grotzke@javakaffee.de> wrote:

> On Mon, 2009-08-24 at 21:42 -0500, Daniel Spiewak wrote:
> > I seem to recall that there is a way to resolve a project descriptor into
> a
> > Project object.  I can't remember exactly how off the top of my head, but
> > I'm pretty sure it's possible.  Have you already explored this solution?
> What do you mean with project descriptor? The buildfile, or the defined
> project task? How would one use this (or the project object) to detect
> duplicate artifacts?
>
> Cheers,
> Martin
>
> >
> > Daniel
> >
> > On Mon, Aug 24, 2009 at 6:21 PM, Martin Grotzke <
> > martin.grotzke@javakaffee.de> wrote:
> >
> > > Hi,
> > >
> > > I want to create a simple extension that lists artifacts that are more
> > > than once contained in the project compile dependencies (or in the
> > > packaging deps).
> > >
> > > The idea is to iterate over all project.compile.dependencies, find
> > > duplicates and for each duplicate select other artifacts, that provide
> > > them when invoked with transitive().
> > >
> > > For artifacts this is fine, but what to do with projects that are added
> > > to the compile dependencies? AFAICS this would be e.g. a JarTask, but
> > > then I need to get the project of the jar task (and its compile.deps).
> > >
> > > Is there any possibility to get the deps of a project another project
> > > depends on?
> > >
> > > Thanx && cheers,
> > > Martin
> > >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message