thank you very much!
oliver.lee 2008-06-13 发件人: [EMAIL PROTECTED] 发送时间: 2008-06-13 19:45:48 收件人: Maven Users List 抄送: 主题: Re: who can explain this table about dependencies scope? oliver.maven schrieb: > hi,all > i am learning maven by reading offical document,when i encounter this table > below,i am really cant understand it,so anyone > can give me one reality example?or explain in more detail? > > from offical:"Each of the scopes (except for import ) affects transitive > dependencies in different ways, as is demonstrated in the table below. If a > dependency is set to the scope in the left column, transitive dependencies of > that dependency with the scope across the top row will result in a dependency > in the main project with the scope listed at the intersection. If no scope is > listed, it means the dependency will be omitted." > > compile provided runtime test > compile compile(*) - runtime - > provided provided provided provided - > runtime runtime - runtime _ > test test - test - > > Project a has <dependency > <artifactId >b </artifactId > <scope >compile </scope > </dependency > Project b has <dependency > <artifactId >c </artifactId > <scope >runtime </scope > </dependency > <dependency > <artifactId >d </artifactId > <scope >test </scope > </dependency > So what is the dependency between projects a and c? At the intersection of "compile" and "runtime", you can see that the result is "runtime". Therefore project a has a "runtime" dependency on c. What is the dependency between a and d? As seen from the table, the intersection is "-". So actually, a does *not* have any dependency on d. Regards, Simon --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]