On 5/21/07, Martin Jericho <[EMAIL PROTECTED]> wrote:
So you are saying that to indicate that a dependency is required for compilation and optional for runtime, I simply set it with the scope "runtime" and and "optional" flag. This seems to completely contradict the documentation, which says of the runtime scope: "this scope indicates that the dependency is not required for compilation, but is for execution".
And when you put it that way, I think so, too. :) Let's start over. "Required for compilation" is <scope>compile</scope> which is the default so you don't need to specify it. "Optional at runtime" is <optional>true</optional> That will force your users to declare this dependency in their own projects if they want it. This is how we handle the Cargo depdendency in Shale Test, because there is one class that needs Cargo to compile, but not everyone who uses Shale Test will want to use Cargo with it. * http://svn.apache.org/repos/asf/shale/framework/trunk/shale-test/pom.xml Though at this point you may not believe anything I say! By far the easiest way to sort this out is to construct an example and look at the output of "mvn install -X' which is what I should have done before answering that early on a weekend morning.
I will add the dependency as you have described, but it looks to me like the whole maven scoping mechanism and/or documentation needs a complete overhaul as it is a confusing mess at the moment.
I opened an issue to add some discussion of "optional" to the dependency mechanism page. In particular I think the table that tries to explain when various dependencies will be available is confusing. -- Wendy --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
