Meta information about dependencies in a pom?

classic Classic list List threaded Threaded
25 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Meta information about dependencies in a pom?

Carsten Ziegeler
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
[hidden email]

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Meta information about dependencies in a pom?

Carsten Ziegeler
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 <[hidden email]>:

> 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
> [hidden email]
>



--
Carsten Ziegeler
[hidden email]

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Meta information about dependencies in a pom?

brettporter
Administrator
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 <[hidden email]>:
>> 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
>> [hidden email]
>>
>
>
>
> --
> Carsten Ziegeler
> [hidden email]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

--
Brett Porter
[hidden email]
http://brettporter.wordpress.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Meta information about dependencies in a pom?

Carsten Ziegeler
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 <[hidden email]>:

> 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 <[hidden email]>:
>>> 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
>>> [hidden email]
>>>
>>
>>
>>
>> --
>> Carsten Ziegeler
>> [hidden email]
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>
> --
> Brett Porter
> [hidden email]
> http://brettporter.wordpress.com/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>



--
Carsten Ziegeler
[hidden email]

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Meta information about dependencies in a pom?

Nigel Magnay
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 <[hidden email]>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 <[hidden email]>:
> > 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 <[hidden email]>:
> >>> 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
> >>> [hidden email]
> >>>
> >>
> >>
> >>
> >> --
> >> Carsten Ziegeler
> >> [hidden email]
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [hidden email]
> >> For additional commands, e-mail: [hidden email]
> >>
> >
> > --
> > Brett Porter
> > [hidden email]
> > http://brettporter.wordpress.com/
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
> >
>
>
>
> --
> Carsten Ziegeler
> [hidden email]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Meta information about dependencies in a pom?

brettporter
Administrator
In reply to this post by Carsten Ziegeler

On 08/11/2011, at 8:15 AM, Carsten Ziegeler 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.

So, wildcards or excludes lists don't help with the sync task? There's no convention that can be applied (e.g. all dependencies of a certain type, or the same group ID as the project)?

How would you handle transitive dependencies?

- Brett

--
Brett Porter
[hidden email]
http://brettporter.wordpress.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Meta information about dependencies in a pom?

Nigel Magnay
Well, the problem currently is if you define a pom that declares a number
of dependencies (e.g: the ones you need for the flex framework), and some
of these have custom scopes (e.g: RSL or external), those scopes are
stripped when you include that pom in your project. (IIRC, anything custom
just gets converted into 'runtime')

e.g:
https://issues.sonatype.org/browse/FLEXMOJOS-153

I asked about it last month:
http://maven.40175.n5.nabble.com/custom-scopes-eaten-when-dependency-is-transitive-td4888586.html

That means that unfortunately I'm having to specify every one of about 15
dependencies manually in every project (in the exact correct order, but
that's a different non-maven issue! :-) )

Sure, being able to provide default, or regex-specified values to groups of
artifacts can be nice - but it's not always easy to get right, an sometimes
the information is granular enough that you want to be able to specify it
for each individual artifact. For flex, if the dependency is an RSL, for
each one I can specify not just the application domain, but the deployment
path, policy file URL(s) and force-load attributes. It's just feels more
natural (to me) to keep that with the dependency statement rather than
referenced via the coordinate in some other place in the POM.



On Tue, Nov 8, 2011 at 5:00 PM, Brett Porter <[hidden email]> wrote:

>
> On 08/11/2011, at 8:15 AM, Carsten Ziegeler 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.
>
> So, wildcards or excludes lists don't help with the sync task? There's no
> convention that can be applied (e.g. all dependencies of a certain type, or
> the same group ID as the project)?
>
> How would you handle transitive dependencies?
>
> - Brett
>
> --
> Brett Porter
> [hidden email]
> http://brettporter.wordpress.com/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Meta information about dependencies in a pom?

Carsten Ziegeler
In reply to this post by brettporter
2011/11/8 Brett Porter <[hidden email]>:

>
> On 08/11/2011, at 8:15 AM, Carsten Ziegeler 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.
>
> So, wildcards or excludes lists don't help with the sync task? There's no convention that can be applied (e.g. all dependencies of a certain type, or the same group ID as the project)?

No, unfortunately not - we have a large list of dependencies with
different group ids, all having the same type, so while some share the
same group id, in the end we have to list each and every artidact id.

>
> How would you handle transitive dependencies?
We don't consider transitive dependencies, so we just include stuff
which is really listed in this pom.

In the end this is the application assembly which builds the final
distribution based on modules. So we list all the modules as direct
dependencies to avoid any surprises through transitive dependencies.
And we just need additional information on a per module base. This
info must also be defined outside of the module, so we can't just
include it in the module artifact as the info might vary from app to
app and third party modules are involved.

Regards
Carsten



>
> - Brett
>
> --
> Brett Porter
> [hidden email]
> http://brettporter.wordpress.com/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>



--
Carsten Ziegeler
[hidden email]

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Meta information about dependencies in a pom?

David Jencks
In reply to this post by brettporter
I've run into this problem in 3 or 4 situations and the only practical solution is to individually list the dependencies with the extra info in the plugin configurations.  I don't really understand the mindset that only the information needed for some bits of well-known maven can be associated with dependencies, and all other uses should just duplicate large swathes of maven configuration to be able to add a couple bits of info per dependency.   My impression is that aether takes a more inclusive view of dependency properties.

thanks
david jencks

On Nov 8, 2011, at 9:00 AM, Brett Porter wrote:

>
> On 08/11/2011, at 8:15 AM, Carsten Ziegeler 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.
>
> So, wildcards or excludes lists don't help with the sync task? There's no convention that can be applied (e.g. all dependencies of a certain type, or the same group ID as the project)?
>
> How would you handle transitive dependencies?
>
> - Brett
>
> --
> Brett Porter
> [hidden email]
> http://brettporter.wordpress.com/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Meta information about dependencies in a pom?

Carsten Ziegeler
2011/11/8 David Jencks <[hidden email]>:
> I've run into this problem in 3 or 4 situations and the only practical solution is to individually list the dependencies with the extra info in the plugin configurations.  I don't really understand the mindset that only the information needed for some bits of well-known maven can be associated with dependencies, and all other uses should just duplicate large swathes of maven configuration to be able to add a couple bits of info per dependency.   My impression is that aether takes a more inclusive view of dependency properties.


So is this something we could implement in Maven (easily)?

Carsten

>
> thanks
> david jencks
>
> On Nov 8, 2011, at 9:00 AM, Brett Porter wrote:
>
>>
>> On 08/11/2011, at 8:15 AM, Carsten Ziegeler 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.
>>
>> So, wildcards or excludes lists don't help with the sync task? There's no convention that can be applied (e.g. all dependencies of a certain type, or the same group ID as the project)?
>>
>> How would you handle transitive dependencies?
>>
>> - Brett
>>
>> --
>> Brett Porter
>> [hidden email]
>> http://brettporter.wordpress.com/
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>



--
Carsten Ziegeler
[hidden email]

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Meta information about dependencies in a pom?

Jason van Zyl
Yes, it is something that would be relatively easy to implement, and would be valuable. Ultimately I think it was a mistake to remove this capability. It helps the producers and has no affect on consumers. No brainer.

On Nov 8, 2011, at 10:47 AM, Carsten Ziegeler wrote:

> 2011/11/8 David Jencks <[hidden email]>:
>> I've run into this problem in 3 or 4 situations and the only practical solution is to individually list the dependencies with the extra info in the plugin configurations.  I don't really understand the mindset that only the information needed for some bits of well-known maven can be associated with dependencies, and all other uses should just duplicate large swathes of maven configuration to be able to add a couple bits of info per dependency.   My impression is that aether takes a more inclusive view of dependency properties.
>
>
> So is this something we could implement in Maven (easily)?
>
> Carsten
>
>>
>> thanks
>> david jencks
>>
>> On Nov 8, 2011, at 9:00 AM, Brett Porter wrote:
>>
>>>
>>> On 08/11/2011, at 8:15 AM, Carsten Ziegeler 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.
>>>
>>> So, wildcards or excludes lists don't help with the sync task? There's no convention that can be applied (e.g. all dependencies of a certain type, or the same group ID as the project)?
>>>
>>> How would you handle transitive dependencies?
>>>
>>> - Brett
>>>
>>> --
>>> Brett Porter
>>> [hidden email]
>>> http://brettporter.wordpress.com/
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [hidden email]
>>> For additional commands, e-mail: [hidden email]
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
>
>
>
> --
> Carsten Ziegeler
> [hidden email]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder,  Apache Maven
http://twitter.com/jvanzyl
---------------------------------------------------------

A language that doesn’t affect the way you think about programming is not worth knowing.
 
 -— Alan Perlis




Reply | Threaded
Open this post in threaded view
|

Re: Meta information about dependencies in a pom?

Jason van Zyl-5
To clarify, technically easy to implement. If we did this with attributes we don't have to deal with POM changes, and if we say this is truly for producers then the attributes getting stripped out on deploy would be fine. The this serves the concerns of producers, and really has zero impact on consumers.

On Nov 8, 2011, at 12:01 PM, Jason van Zyl wrote:

> Yes, it is something that would be relatively easy to implement, and would be valuable. Ultimately I think it was a mistake to remove this capability. It helps the producers and has no affect on consumers. No brainer.
>
> On Nov 8, 2011, at 10:47 AM, Carsten Ziegeler wrote:
>
>> 2011/11/8 David Jencks <[hidden email]>:
>>> I've run into this problem in 3 or 4 situations and the only practical solution is to individually list the dependencies with the extra info in the plugin configurations.  I don't really understand the mindset that only the information needed for some bits of well-known maven can be associated with dependencies, and all other uses should just duplicate large swathes of maven configuration to be able to add a couple bits of info per dependency.   My impression is that aether takes a more inclusive view of dependency properties.
>>
>>
>> So is this something we could implement in Maven (easily)?
>>
>> Carsten
>>
>>>
>>> thanks
>>> david jencks
>>>
>>> On Nov 8, 2011, at 9:00 AM, Brett Porter wrote:
>>>
>>>>
>>>> On 08/11/2011, at 8:15 AM, Carsten Ziegeler 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.
>>>>
>>>> So, wildcards or excludes lists don't help with the sync task? There's no convention that can be applied (e.g. all dependencies of a certain type, or the same group ID as the project)?
>>>>
>>>> How would you handle transitive dependencies?
>>>>
>>>> - Brett
>>>>
>>>> --
>>>> Brett Porter
>>>> [hidden email]
>>>> http://brettporter.wordpress.com/
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [hidden email]
>>>> For additional commands, e-mail: [hidden email]
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [hidden email]
>>> For additional commands, e-mail: [hidden email]
>>>
>>>
>>
>>
>>
>> --
>> Carsten Ziegeler
>> [hidden email]
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>
> Thanks,
>
> Jason
>
> ----------------------------------------------------------
> Jason van Zyl
> Founder,  Apache Maven
> http://twitter.com/jvanzyl
> ---------------------------------------------------------
>
> A language that doesn’t affect the way you think about programming is not worth knowing.
>
> -— Alan Perlis
>
>
>
>

Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder,  Apache Maven
http://twitter.com/jvanzyl
---------------------------------------------------------

A language that doesn’t affect the way you think about programming is not worth knowing.
 
 -— Alan Perlis




Reply | Threaded
Open this post in threaded view
|

Re: Meta information about dependencies in a pom?

Jason van Zyl
In reply to this post by Jason van Zyl
To clarify, technically easy to implement. If we did this with attributes we don't have to deal with POM changes, and if we say this is truly for producers then the attributes getting stripped out on deploy would be fine. The this serves the concerns of producers, and really has zero impact on consumers.

On Nov 8, 2011, at 12:01 PM, Jason van Zyl wrote:

> Yes, it is something that would be relatively easy to implement, and would be valuable. Ultimately I think it was a mistake to remove this capability. It helps the producers and has no affect on consumers. No brainer.
>
> On Nov 8, 2011, at 10:47 AM, Carsten Ziegeler wrote:
>
>> 2011/11/8 David Jencks <[hidden email]>:
>>> I've run into this problem in 3 or 4 situations and the only practical solution is to individually list the dependencies with the extra info in the plugin configurations.  I don't really understand the mindset that only the information needed for some bits of well-known maven can be associated with dependencies, and all other uses should just duplicate large swathes of maven configuration to be able to add a couple bits of info per dependency.   My impression is that aether takes a more inclusive view of dependency properties.
>>
>>
>> So is this something we could implement in Maven (easily)?
>>
>> Carsten
>>
>>>
>>> thanks
>>> david jencks
>>>
>>> On Nov 8, 2011, at 9:00 AM, Brett Porter wrote:
>>>
>>>>
>>>> On 08/11/2011, at 8:15 AM, Carsten Ziegeler 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.
>>>>
>>>> So, wildcards or excludes lists don't help with the sync task? There's no convention that can be applied (e.g. all dependencies of a certain type, or the same group ID as the project)?
>>>>
>>>> How would you handle transitive dependencies?
>>>>
>>>> - Brett
>>>>
>>>> --
>>>> Brett Porter
>>>> [hidden email]
>>>> http://brettporter.wordpress.com/
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [hidden email]
>>>> For additional commands, e-mail: [hidden email]
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [hidden email]
>>> For additional commands, e-mail: [hidden email]
>>>
>>>
>>
>>
>>
>> --
>> Carsten Ziegeler
>> [hidden email]
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>
> Thanks,
>
> Jason
>
> ----------------------------------------------------------
> Jason van Zyl
> Founder,  Apache Maven
> http://twitter.com/jvanzyl
> ---------------------------------------------------------
>
> A language that doesn’t affect the way you think about programming is not worth knowing.
>
> -— Alan Perlis
>
>
>
>

Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder,  Apache Maven
http://twitter.com/jvanzyl
---------------------------------------------------------

A language that doesn’t affect the way you think about programming is not worth knowing.
 
 -— Alan Perlis






Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder,  Apache Maven
http://twitter.com/jvanzyl
---------------------------------------------------------

We know what we are, but know not what we may be.

  -- Shakespeare




Reply | Threaded
Open this post in threaded view
|

Re: Meta information about dependencies in a pom?

Jörg Schaible
Jason van Zyl wrote:

> To clarify, technically easy to implement. If we did this with attributes
> we don't have to deal with POM changes, and if we say this is truly for
> producers then the attributes getting stripped out on deploy would be
> fine. The this serves the concerns of producers, and really has zero
> impact on consumers.

Why are my dependency attributes available when I inherit them from my
parent POM in the parent directory, but not if the parent POM is downloaded
from the repository? Can my dependency attributes defined in the dependency
management section? Can I overwrite an inherited dependency attribute with a
new value?

Can of worms.

Just my 2c,
Jörg


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Meta information about dependencies in a pom?

Jörg Schaible
In reply to this post by Nigel Magnay
Nigel Magnay wrote:

> 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

what's unclear about this bit then?

> , 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.

Sorry, but it seems to me that it was simply a wrong approach to define own
scopes. You run Maven in an undefined state and moan about it's undefined
behavior.

Jörg



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Meta information about dependencies in a pom?

Jason van Zyl-5
In reply to this post by Jörg Schaible

On Nov 8, 2011, at 12:41 PM, Jörg Schaible wrote:

> Jason van Zyl wrote:
>
>> To clarify, technically easy to implement. If we did this with attributes
>> we don't have to deal with POM changes, and if we say this is truly for
>> producers then the attributes getting stripped out on deploy would be
>> fine. The this serves the concerns of producers, and really has zero
>> impact on consumers.
>
> Why are my dependency attributes available when I inherit them from my
> parent POM in the parent directory, but not if the parent POM is downloaded
> from the repository?

Because they are intended to only be usable by the actual build producing the output. Beyond that there is no use for these attributes as we have scope their use here.

That is not to say they cannot be made available. As they were implemented in Maven 1.x it was part of the POM so they were available. How I have described it, and as you have correctly interpreted it, allows us to do it without POM changes so that it can be done quickly.

> Can my dependency attributes defined in the dependency
> management section? Can I overwrite an inherited dependency attribute with a
> new value?

I don't think this is how it should work. It is strictly for build-only use.

>
> Can of worms.
>
> Just my 2c,
> Jörg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder,  Apache Maven
http://twitter.com/jvanzyl
---------------------------------------------------------

We know what we are, but know not what we may be.

  -- Shakespeare




Reply | Threaded
Open this post in threaded view
|

Re: Meta information about dependencies in a pom?

Nigel Magnay
In reply to this post by Jörg Schaible
>
>
>
> Sorry, but it seems to me that it was simply a wrong approach to define own
> scopes. You run Maven in an undefined state and moan about it's undefined
> behavior.
>
> And the author of the flex plugin has tried, from observation, several
times, to get an answer from the maven-dev community about how these things
are supposed to be done if not with custom scopes, and every time seemingly
come up short.

Believing that the set of scopes that are adequate for describing Java Jar
dependencies are sufficient for languages other than Java seems quite
parochial behaviour.
Reply | Threaded
Open this post in threaded view
|

Re: Meta information about dependencies in a pom?

Jörg Schaible
In reply to this post by Jason van Zyl-5
Jason van Zyl wrote:

>
> On Nov 8, 2011, at 12:41 PM, Jörg Schaible wrote:
>
>> Jason van Zyl wrote:
>>
>>> To clarify, technically easy to implement. If we did this with
>>> attributes we don't have to deal with POM changes, and if we say this is
>>> truly for producers then the attributes getting stripped out on deploy
>>> would be fine. The this serves the concerns of producers, and really has
>>> zero impact on consumers.
>>
>> Why are my dependency attributes available when I inherit them from my
>> parent POM in the parent directory, but not if the parent POM is
>> downloaded from the repository?
>
> Because they are intended to only be usable by the actual build producing
> the output. Beyond that there is no use for these attributes as we have
> scope their use here.
>
> That is not to say they cannot be made available. As they were implemented
> in Maven 1.x it was part of the POM so they were available. How I have
> described it, and as you have correctly interpreted it, allows us to do it
> without POM changes so that it can be done quickly.
>
>> Can my dependency attributes defined in the dependency
>> management section? Can I overwrite an inherited dependency attribute
>> with a new value?
>
> I don't think this is how it should work. It is strictly for build-only
> use.

If the support is added for definitions in the local POM only, I really bet
that the first question on the list will be "I want to declare this
attribute always with that dependency - how can I do it?" ;-)

However, I am in the same boat with David. We have a also a plugin that
would be a lot easier to configure with such attributes.

Cheers,
Jörg


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Meta information about dependencies in a pom?

Jason van Zyl-5

On Nov 8, 2011, at 1:30 PM, Jörg Schaible wrote:

>
> If the support is added for definitions in the local POM only, I really bet
> that the first question on the list will be "I want to declare this
> attribute always with that dependency - how can I do it?" ;-)
>

Ultimately when/if it's in the POM that will be the case.

> However, I am in the same boat with David. We have a also a plugin that
> would be a lot easier to configure with such attributes.
>

This is the primary use case for dependency properties. So that plugins the produce created can act on these properties.

> Cheers,
> Jörg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder,  Apache Maven
http://twitter.com/jvanzyl
---------------------------------------------------------

the course of true love never did run smooth ...

 -- Shakespeare




Reply | Threaded
Open this post in threaded view
|

Re: Meta information about dependencies in a pom?

Guo Du-3
In reply to this post by Carsten Ziegeler
> 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
What about only configure the dependency list with additional field as
plugin configuration such as:
<configuration>
<bundles>
<bundle>
<groupId>foo</groupId>
<artifactId>bar</artifactId>
<version>x.y.z</version>
<startLevel>1</startLevel>
</bundle>
</bundles>
</configuration>


-Guo

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

12