Yes, but I'm not as comfortable with using optional, even though the practical packaging semantic is similar, because it implies a real dependency that, if provided, would be used, but is not mandatory. Something like, say, the jsp or servlet apis are mandatory, but are compile-only because the deployment environment will provide it.

Christian.

On 20-Mar-09, at 09:18 , Mark Struberg wrote:


Christian, have you tried to mark your dependency as 'optional' [1]?


LieGrue,
strug

[1] 
http://maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.html

--- Christian Edward Gruber <[email protected]> schrieb am Fr, 20.3.2009:

Von: Christian Edward Gruber <[email protected]>
Betreff: Re: Scope for compile only?
An: "Maven Developers List" <[email protected]>
Datum: Freitag, 20. März 2009, 12:54
I would use "provided" which implies
that the target runtime will provide this if needed.
It's not needed, but the semantic should work.
"Provided" scoped dependencies are not transitively added to
packaging lifecycles like war and ear.

Also, this is probably a maven-users question, not a
maven-developers list question.

Christian.

On 19-Mar-09, at 22:25 , Paul Benedict wrote:

Is there a way to bring in a library only for
compiling without making
it part of the runtime (i.e., war dependency) or using
transitive
exclusions? Java 5 has source-level annotations and
sometimes a
dependency is only for compiling and has no runtime
dependency. Is a
new scope needed for this?

Paul


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


Christian Edward Gruber
e-mail: [email protected]
weblog: http://www.geekinasuit.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]






---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


Christian Edward Gruber
e-mail: [email protected]
weblog: http://www.geekinasuit.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to