On 5/20/07, Martin Jericho <[EMAIL PROTECTED]> wrote:
The new version (2.4) of my project Jericho HTML Parser has compile-time
dependencies that are optional at runtime.

It is not clear to me from the documentation what scope I should give these
dependencies, as none of the scopes seem to describe a dependency that is
required for compilation but optional at runtime.

Add <optional>true</optional> to the dependency element.

http://maven.apache.org/ref/current/maven-model/maven.html#class_dependency

What page would you have expected to find this on, so we can add it?

Thanks for your response Wendy, but this still isn't clear to me at all. Are you saying I have to add two dependency elements for each library, once with a scope of compile, and once with a scope of runtime but with the optional flag set? Doesn't the compile scope imply runtime dependency as well?

I have read forum posts from others before version 2.0 came out talking about the need to support this scenario, so it seems that it is not an uncommon requirement. I would have expected it to be explicitly discussed in the introduction to the dependency mechanism at
http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to