You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Wendy Smoak <ws...@gmail.com> on 2006/11/19 02:35:47 UTC

Maven should complain about invalid scopes

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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Maven should complain about invalid scopes

Posted by Jorg Heymans <jh...@apache.org>.
Wendy Smoak wrote:

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

Perhaps this can get fixed in the scope of MNG-1678 ?


Jorg


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org