maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nigel Magnay <nigel.mag...@gmail.com>
Subject Re: Meta information about dependencies in a pom?
Date Tue, 08 Nov 2011 16:45:45 GMT
Yes. It's horrible. It occurs in other places too -- for example, in
environments such as flex, you can declare a dependency with more scopes
than java (merged, internal, external, rsl or caching). If it's an RSL,
then you may choose one of about 4 'application domains' that control how
it will be shared.

The scope bit sort of works (maven moans about it, and claims it's all
unsupported, and transitive dependencies declared with nonstandard scopes
don't work properly). The application domains - well, you're left
duplicating almost all of the dependency information somewhere else in the
POM. Which, as you say, is tedious, and gets out of sync.

I ended up writing a 'pom pre-processor xslt' that allowed me to include
elements in exactly the way you're describing to at least maintain some
kind DRY sanity. It's one of the thinks I look at gradle for, and wonder if
that might be a better choice.

On Tue, Nov 8, 2011 at 4:15 PM, Carsten Ziegeler <cziegeler@apache.org>wrote:

> Yes, we were using that approach for years now and it turned out to be
> too error prone as you have to keep the plugin configuration and the
> dependency list in sync. It doesn't sound like a hard task first, but
> in our case it caused trouble many times. That's why we would like to
> have a single point of information.
>
> Regards
> Carsten
>
> 2011/11/7 Brett Porter <brett@apache.org>:
> > The typical pattern used for this is an artefact filter applied to the
> configuration of the plugin, rather than information on the dependencies
> (like what the dependency plugin goals use). That was a feature of Maven 1
> that we rejected upfront.
> >
> > In my experience, it's actually less verbose since you typically include
> or exclude just a handful, or can use wildcards, rather than having to put
> a property of each dependency.
> >
> > - Brett
> >
> > On 07/11/2011, at 11:55 AM, Carsten Ziegeler wrote:
> >
> >> Maybe a little bit more information :) We need this information just
> >> for the build of the project containing this information. It's read by
> >> a custom plugin. So even if the information would not end up in the
> >> maven repository, we're fine.
> >>
> >> Carsten
> >>
> >> 2011/11/7 Carsten Ziegeler <cziegeler@apache.org>:
> >>> Hi,
> >>>
> >>> in Apache Sling we have the need to add additional information to a
> >>> dependency in a pom, basically it's just an xml attribute, like:
> >>>
> >>> <dependency sling:startlevel="1">
> >>>
> >>> Now, with a little bit of hacking we could get this working in our
> >>> plugin be parsing or converting the pom xml file ourselves (we don't
> >>> need pom inheritance or transitive handling of this additional
> >>> information)
> >>>
> >>> The question now is, what do you think about it? Is there something
> >>> planned in that direction? If we would do it, do you think that we
> >>> might get into trouble with future versions of maven?
> >>>
> >>> Regards
> >>> Carsten
> >>>
> >>>
> >>> --
> >>> Carsten Ziegeler
> >>> cziegeler@apache.org
> >>>
> >>
> >>
> >>
> >> --
> >> Carsten Ziegeler
> >> cziegeler@apache.org
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: dev-help@maven.apache.org
> >>
> >
> > --
> > Brett Porter
> > brett@apache.org
> > http://brettporter.wordpress.com/
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > For additional commands, e-mail: dev-help@maven.apache.org
> >
> >
>
>
>
> --
> Carsten Ziegeler
> cziegeler@apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

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