[ http://jira.codehaus.org/browse/MNG-1233?page=comments#action_69010 ]
Grégory Joseph commented on MNG-1233: ------------------------------------- I'm running this issue, using 2.0.4, in the following scenario: * projectA is packaging:jar * projectA has a scope:provided dependency on javax.servlet:servlet-api (needs it to compile some classes) * projectA has another dependency which apparently also has a dep on javax.servlet:servlet-api but with scope:compile * projectB is packaging:war * projectB does not have a dep on javax.servlet:servlet-api (not needed to build) * projectB has a scope:compile dependency on projectB I get the following warning message when building projectA [WARNING] Artifact javax.servlet:servlet-api:jar:2.4:provided retains local scope 'provided' overriding broader scope 'compile' given by a dependency. If this is not intended, modify or remove the local scope. (not when building projectB) And as a result, the javax.servet:servlet-api jar ends up in projectB's war. Note that if I explicitely redeclare the dependency on javax.servet:servlet-api with scope:provided in projectB, then it's fine. > overriding compile dependency with provided scope doesn't get excluded from a > webapp > ------------------------------------------------------------------------------------ > > Key: MNG-1233 > URL: http://jira.codehaus.org/browse/MNG-1233 > Project: Maven 2 > Type: Bug > Components: Artifacts and Repositories > Reporter: Brett Porter > Assignee: Brett Porter > Fix For: 2.0 > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira