Am 12/18/16 um 13:36 schrieb Robert Scholte:
> On Fri, 16 Dec 2016 21:23:14 +0100, Christian Schulte <c...@schulte.it>  
> wrote:
> 
>> Am 12/16/16 um 20:30 schrieb Robert Scholte:
>>> On Fri, 16 Dec 2016 17:25:16 +0100, Christian Schulte <c...@schulte.it>
>>> wrote:
>>>
>>>> Am 12/16/16 um 15:21 schrieb Robert Scholte:
>>>>>
>>>>> but this cover the issue we are talking about, because IIUC you are
>>>>> saying
>>>>> that IF both junit and hamcrest get the test-scope AND hamcrest would
>>>>> have
>>>>> a dependency THEN that dependency is not added to the classpath. That  
>>>>> is
>>>>> still unexpected behavior.
>>>>
>>>> Just add 'test' scope to the hamcrest dependency in that pom. It will
>>>> disappear from the classpath. I would expect that to happen. Why should
>>>> it manage the version but not the scope?
>>>>
>>>
>>> Because Junit refers to hamcrest classes, so they are required to be  
>>> able
>>> to compile.
>>> There is an issue about this, that Maven should never reduce the scope.
>>
>> It's not Maven reducing any scope, it's the user telling Maven to do
>> that. The user is the dependency manager, not Maven.
>>
> 
> No, no, no. Dependency management may never make dependencies disappear,  
> no matter the scope specified. If a user doesn't want a dependency, it  
> must use dependency.excludes.

Managing the scope of a dependency to 'test' Maven must behave the same
way as if the dependency had been declared 'test' directly in the POM.
That's the point. That's what dependency management is used for. Manage
dependencies not in your control (global override to what is in the POM
during resolution).


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to