POM validator allows <scope>optional</scope> but it is not valid.
-----------------------------------------------------------------

                 Key: MNG-3991
                 URL: http://jira.codehaus.org/browse/MNG-3991
             Project: Maven 2
          Issue Type: Bug
          Components: POM
            Reporter: Julien HENRY
            Priority: Minor


In my project I did a mistake and I wrote
{code}
<dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-log4j12</artifactId>
        <version>1.5.0</version>
        <scope>optional</scope>
</dependency>
{code}

but in fact I intended to write
{code}
<dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-log4j12</artifactId>
        <version>1.5.0</version>
        <optional>true</optional>
</dependency>
{code}

I'm very surprised that Maven doesn't detect such a mistake during the validate 
phase. Could it be possible to add a check to allow only valid scopes.

Thanks

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to