You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Andreas Sewe <se...@st.informatik.tu-darmstadt.de> on 2012/06/01 15:05:26 UTC
Using scope in dependencyManagement: good idea or bad?
Hi all,
the subject say it all: Is declaring scopes in the dependencyManagement
section of your parent POM a good idea or a bad idea?
Best wishes,
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Using scope in dependencyManagement: good idea or bad?
Posted by Andreas Sewe <se...@st.informatik.tu-darmstadt.de>.
Joachim Van der Auwera wrote:
> In my experience a bad idea (bitten by this in the past). If the same
> dependency is mentioned in dependencyManagement in various places, then
> you may end up with the wrong scope.
>
> I use dependencyManagement to specify the version and possibly
> exclusions. Scope is still managed in the dependency declaration itself.
Makes sense. I was basically wondering if everyone considers this to
*always* be a bad idea or whether there are exceptions (like a
provided-scoped servlet-api, where a different scope might evne be
considered a "bug").
Best wishes,
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Using scope in dependencyManagement: good idea or bad?
Posted by Joachim Van der Auwera <jo...@progs.be>.
In my experience a bad idea (bitten by this in the past). If the same
dependency is mentioned in dependencyManagement in various places, then
you may end up with the wrong scope.
I use dependencyManagement to specify the version and possibly
exclusions. Scope is still managed in the dependency declaration itself.
Kind regards,
Joachim
On 01-06-12 15:05, Andreas Sewe wrote:
> Hi all,
>
> the subject say it all: Is declaring scopes in the dependencyManagement
> section of your parent POM a good idea or a bad idea?
>
> Best wishes,
>
> Andreas
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Using scope in dependencyManagement: good idea or bad?
Posted by Mirko Friedenhagen <mf...@gmail.com>.
Hello,
we use this for dependencies which should go the test scope by default
as well. This prevents stuff like junit or mockito to be part of WARs,
e.g. The only drawback here are our integration test suites where a
lot of the code resides in src/main.
Same goes for logback-classic, which may be used in libraries in the
scope test but should be explicitely declared as either provided (by
our internal tomcat containers). As we use jcl-over-slf4j we define
commons-logging as provided by jcl-over-slf4j as well, so we do not
have to redeclare this in every application again.
Regards Mirko
On Fri, Jun 1, 2012 at 6:03 PM, Mark Struberg <st...@yahoo.de> wrote:
> I sometimes use this for libraries (like e.g. openwebbeans-impl) which I normally only have a runtime dependency for (generally defined via dependencyManagement).
>
>
> But in some cases you need to access some internal details. Usually I move those parts to some 'utility' module which then has a compile time dependency to the needed library.
>
>
> LieGrue,
> strub
>
>
>
> ----- Original Message -----
>> From: "Thiessen, Todd (Todd)" <tt...@avaya.com>
>> To: Maven Users List <us...@maven.apache.org>
>> Cc:
>> Sent: Friday, June 1, 2012 5:20 PM
>> Subject: RE: Using scope in dependencyManagement: good idea or bad?
>>
>> +1 here. I find it valuable to changing scope to provided.
>>
>>> -----Original Message-----
>>> From: Wayne Fay [mailto:waynefay@gmail.com]
>>> Sent: Friday, June 01, 2012 10:53 AM
>>> To: Maven Users List
>>> Subject: Re: Using scope in dependencyManagement: good idea or bad?
>>>
>>> > the subject say it all: Is declaring scopes in the
>>> dependencyManagement
>>> > section of your parent POM a good idea or a bad idea?
>>>
>>> Unless you are employing an approach wherein all of those deps will be
>>> scope provided [because you are providing them in the application
>>> server's shared libs folder], I think it is a bad idea.
>>>
>>> So I guess specifically for provided-scoped things, I support it, but
>>> not for any others.
>>>
>>> Wayne
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Using scope in dependencyManagement: good idea or bad?
Posted by Mark Struberg <st...@yahoo.de>.
I sometimes use this for libraries (like e.g. openwebbeans-impl) which I normally only have a runtime dependency for (generally defined via dependencyManagement).
But in some cases you need to access some internal details. Usually I move those parts to some 'utility' module which then has a compile time dependency to the needed library.
LieGrue,
strub
----- Original Message -----
> From: "Thiessen, Todd (Todd)" <tt...@avaya.com>
> To: Maven Users List <us...@maven.apache.org>
> Cc:
> Sent: Friday, June 1, 2012 5:20 PM
> Subject: RE: Using scope in dependencyManagement: good idea or bad?
>
> +1 here. I find it valuable to changing scope to provided.
>
>> -----Original Message-----
>> From: Wayne Fay [mailto:waynefay@gmail.com]
>> Sent: Friday, June 01, 2012 10:53 AM
>> To: Maven Users List
>> Subject: Re: Using scope in dependencyManagement: good idea or bad?
>>
>> > the subject say it all: Is declaring scopes in the
>> dependencyManagement
>> > section of your parent POM a good idea or a bad idea?
>>
>> Unless you are employing an approach wherein all of those deps will be
>> scope provided [because you are providing them in the application
>> server's shared libs folder], I think it is a bad idea.
>>
>> So I guess specifically for provided-scoped things, I support it, but
>> not for any others.
>>
>> Wayne
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: Using scope in dependencyManagement: good idea or bad?
Posted by "Thiessen, Todd (Todd)" <tt...@avaya.com>.
+1 here. I find it valuable to changing scope to provided.
> -----Original Message-----
> From: Wayne Fay [mailto:waynefay@gmail.com]
> Sent: Friday, June 01, 2012 10:53 AM
> To: Maven Users List
> Subject: Re: Using scope in dependencyManagement: good idea or bad?
>
> > the subject say it all: Is declaring scopes in the
> dependencyManagement
> > section of your parent POM a good idea or a bad idea?
>
> Unless you are employing an approach wherein all of those deps will be
> scope provided [because you are providing them in the application
> server's shared libs folder], I think it is a bad idea.
>
> So I guess specifically for provided-scoped things, I support it, but
> not for any others.
>
> Wayne
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
Re: Using scope in dependencyManagement: good idea or bad?
Posted by Wayne Fay <wa...@gmail.com>.
> the subject say it all: Is declaring scopes in the dependencyManagement
> section of your parent POM a good idea or a bad idea?
Unless you are employing an approach wherein all of those deps will be
scope provided [because you are providing them in the application
server's shared libs folder], I think it is a bad idea.
So I guess specifically for provided-scoped things, I support it, but
not for any others.
Wayne
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org