More than one person has been caught out by:

    <scope>optional</scope>

(Optional isn't a scope, it's a separate element.)

I tried it with 2.0.4, and the 2.0.5 and 2.1 snapshots.  None of them
reports the error, you just get compilation failures because the
dependency doesn't make it into the classpath.

With 2.0.5 snapshot, mvn install -X shows:

[DEBUG] commons-logging:commons-logging:jar:1.1.1-SNAPSHOT (selected for null)
[DEBUG]   junit:junit:jar:3.8.1:test (selected for test)
[DEBUG]   javax.servlet:servlet-api:jar:2.3:optional (selected for optional)
[DEBUG]   log4j:log4j:jar:1.2.12:optional (selected for optional)
[DEBUG]   logkit:logkit:jar:1.0.1:optional (selected for optional)

With 2.1 snapshot, -X does not produce much output. :(

IMO, this is an invalid POM and Maven should report the error.

Thoughts?  I don't see an open issue but I might not be looking in the
right place.

--
Wendy

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

Reply via email to