Yes i know that, but I saw people using it for a while for there own project 
and so I assumed it was an option that can be used (and it has a different 
behaviour than any other listed in the page you've linked). Why maven doesn't 
display an error or a warning when using an incorrect scope?

And for the use I had of it what is the scope that I should use.

"an artefact that I absolutely need during source's GENERATION, compilation and 
test source's GENERATION, test Compilation, and test run phases, but that I 
don't need (and don't want) at runtime, and I probably don't want them through 
transitive dependency."

Compile: not acceptable because it will be in the runtime.
Test: I'm missing the artefact at least during test generation and I think also 
for compilation.
Provided : Missing it for tests.
System : not a system library
Runtime : missing during generation and compilation...

I have also an other problem with dependencies : a dependency that I do need 
for compilation in several modules that are dependant on each other but I 
strictly don't want it at runtime. I used up to now provided, so that it 
doesn't appear at runtime, but I had to add it in each pom. I thought in using 
exclude, but it doesn't do exactly what I need, since I still need to declare 
the dependence to this artefact in the artefact where I exclude it because I 
still need it for compilation (and test and stuff like that).

Tomas Darbois
Edifixio Grenoble - Projet ScorWare
04 76 29 89 27
[EMAIL PROTECTED]
-----Message d'origine-----
De : Wendy Smoak [mailto:[EMAIL PROTECTED]
Envoyé : vendredi 18 juillet 2008 17:37
À : Maven Users List
Objet : Re: scope "Optional"

On Fri, Jul 18, 2008 at 8:21 AM, Thomas Darbois
<[EMAIL PROTECTED]> wrote:
> I'm having some trouble with the scope Optional and the plugin maven 
> dependency plugin.
>
> I'm having a dependency to an artefact which scope is <scope>optional</scope>.

Optional isn't a scope, it's a separate element:  <optional>true</optional>.

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

--
Wendy

---------------------------------------------------------------------
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]

Reply via email to