[
https://jira.codehaus.org/browse/MEAR-143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=280178#comment-280178
]
Laird Nelson edited comment on MEAR-143 at 9/28/11 9:05 AM:
------------------------------------------------------------
I assume you're trying to point me to the text that reads:
{quote}
In addition, the version and scope of artifacts which are incorporated from
transitive dependencies may also be controlled by specifying them in a
dependency management section.
{quote}
But I was under the impression that if I "overrode" the scope the overridden
scope would be honored? Note that the document to which you referred me does
not address scope overriding.
Note as well that the {{<dependencyManagement>}} section initially defines
{{mear-143-leaf}}'s scope to be {{test}}. But the actual {{<dependencies>}}
information in {{mear-143-middle}} overrides the scope to be {{runtime}}.
Shouldn't the scope of the ear file's transitive {{mear-143-leaf}} dependency
therefore be {{runtime}}? No?
I based my theory off of
http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Management,
specifically the section that begins "A second and very important use...".
Note that in project B in that section project B overrides the scope of {{c}}
to be {{runtime}}.
was (Author: ljnelson):
I assume you're trying to point me to the text that reads:
{quote}
In addition, the version and scope of artifacts which are incorporated from
transitive dependencies may also be controlled by specifying them in a
dependency management section.
{quote}
But I was under the impression that if I "overrode" the scope the overridden
scope would be honored?
Note that the dependencyManagement section initially defines mear-143-leaf's
scope to be "test". But the actual dependency information in mear-143-middle
overrides the scope to be runtime. Shouldn't the scope of the ear file's
transitive mear-143-leaf dependency therefore be runtime? No?
I based my theory off of
http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Management,
specifically the section that begins "A second and very important use...".
Note that in project B in that section project B overrides the scope of {{c}}
to be {{runtime}}.
> Plugin does not respect transitive dependency scopes properly
> -------------------------------------------------------------
>
> Key: MEAR-143
> URL: https://jira.codehaus.org/browse/MEAR-143
> Project: Maven 2.x Ear Plugin
> Issue Type: Bug
> Affects Versions: 2.6
> Reporter: Laird Nelson
> Attachments: mear-143.zip
>
>
> The [Introduction to the Dependency Mechanism
> page|http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Scope]
> has a handy table for deciding what to do with transitive dependencies and
> various scopes. The Maven ear plugin does not honor it in all cases.
> Suppose I have a {{.jar}} file. Its name is {{b.jar}}. It declares a
> {{runtime}} dependency on {{a.jar}}.
> Suppose now I have an {{.ear}} project. It declares a {{compile}} scope
> dependency on {{b.jar}}.
> By the rules of the chart, {{a.jar}} should end up being a {{runtime}}
> dependency (transitively) of the {{.ear}}, and should be included in the
> {{lib}} directory. It is not.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira