maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Renat Sabitov (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (MNG-5404) Wrong resolution of dependency scope by Maven 3
Date Tue, 12 Jan 2016 23:50:39 GMT

    [ https://issues.apache.org/jira/browse/MNG-5404?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15095236#comment-15095236
] 

Renat Sabitov edited comment on MNG-5404 at 1/12/16 11:49 PM:
--------------------------------------------------------------

I also can see this in Maven 3.3.9.

What I noticed is that the scope stopped being upgraded to compile if you exclude everything
from the compile scoped dependency via
{code}
            <exclusions>
                <exclusion>
                    <groupId>*</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
{code}

Adding my replicator for the bug. Use as:

{code}
mvn -X -f provided.xml dependency:tree
mvn -X -f compile.xml dependency:tree
{code}

Also, adding -Dverbose option to the compile.xml POM stops the scope upgrade.


was (Author: rsabitov):
I also can see this in Mavin 3.3.9.

What I noticed is that the scope stopped being upgraded to compile if you exclude everything
from the compile scoped dependency via
{code}
            <exclusions>
                <exclusion>
                    <groupId>*</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
{code}

Adding my replicator for the bug. Use as:

{code}
mvn -X -f provided.xml dependency:tree
mvn -X -f compile.xml dependency:tree
{code}

Also, adding -Dverbose option to the compile.xml POM stops the scope upgrade.

> Wrong resolution of dependency scope by Maven 3
> -----------------------------------------------
>
>                 Key: MNG-5404
>                 URL: https://issues.apache.org/jira/browse/MNG-5404
>             Project: Maven
>          Issue Type: Bug
>          Components: Dependencies
>    Affects Versions: 3.0.4
>            Reporter: Dmitry Batrak
>            Assignee: Jason van Zyl
>         Attachments: build.log, compile-as-transitive-of-provided.tgz, example.zip
>
>
> For the following POM: 
> {noformat}
> <project> 
>     <modelVersion>4.0.0</modelVersion> 
>     <groupId>test</groupId> 
>     <artifactId>A</artifactId> 
>     <version>1.0</version> 
>     <dependencies> 
>         <dependency> 
>             <groupId>org.apache.axis2</groupId> 
>             <artifactId>axis2-xmlbeans</artifactId> 
>             <version>1.5</version> 
>             <scope>provided</scope> 
>         </dependency> 
>         <dependency> 
>             <groupId>org.apache.axis2</groupId> 
>             <artifactId>axis2-codegen</artifactId> 
>             <version>1.5</version> 
>             <exclusions> 
>                 <exclusion> 
>                     <groupId>org.apache.geronimo.specs</groupId> 
>                     <artifactId>geronimo-stax-api_1.0_spec</artifactId> 
>                 </exclusion> 
>             </exclusions> 
>         </dependency> 
>     </dependencies> 
> </project> 
> {noformat}
> running 'mvn dependency:resolve' using Maven 3.0.4 yields a wrong result. 
> Namely, geronimo-stax-api_1.0_spec dependency is reported as having the resolved scope
of 'compile'. With Maven 2.2.1 I get the 'provided' scope, as expected.
> Debug log is attached.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message