Hi Andreas, Andreas Sewe wrote:
> Hi Jörg, > > thanks for the quick reply. > >>> According to the matrix in >>> <http://maven.apache.org/guides/introduction/introduction-to-dependency- >> mechanism.html#Dependency_Scope> >>> a provided-scoped dependencies of a provided-scoped project dependency >>> are themselves of scope provided (w.r.t. the project being built). >>> >>> The maven-dependency-plugin, however, disagrees. Both dependency:tree >>> and dependency:copy-dependencies (with >>> <includeScope>provided</includeScope>) ignore the transitive >>> dependencies of my provided-scoped dependency. :-( >>> >>> So who's right: the documentation or the plugin? >> >> The plugin. > > Well, yes: In a sense, the code is always right, but what's the > intuition behind the plugin's behavior? After all, if your project > assumes that X is provided by the environment and X assumes the Y is > provided by the environment, the environments should better provide both > X and Y, right? Why ignore this information? Well, "provided" deps have never been inherited transitively by any M2 version. However, basically you're right, provided artifacts could be inherited again as provided, i.e. they are present at compile and runtime, but are not included into wars or ears (and the like). Currently you have to add these deps in derived jar artifacts over and over again and personally I am so used to this pattern, that I have not reflected this situation. - Jörg --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
