[ 
http://jira.codehaus.org/browse/MDEP-85?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Brian Fox closed MDEP-85.
-------------------------

    Resolution: Won't Fix

The dependency plugin uses the same code as Maven itself to determine scope. As 
you can see by the code listed below, test scope includes everything.

    public ScopeArtifactFilter( String scope )
    {
        if ( DefaultArtifact.SCOPE_COMPILE.equals( scope ) )
        {
            systemScope = true;
            providedScope = true;
            compileScope = true;
            runtimeScope = false;
            testScope = false;
        }
        else if ( DefaultArtifact.SCOPE_RUNTIME.equals( scope ) )
        {
            systemScope = false;
            providedScope = false;
            compileScope = true;
            runtimeScope = true;
            testScope = false;
        }
        else if ( DefaultArtifact.SCOPE_TEST.equals( scope ) )
        {
            systemScope = true;
            providedScope = true;
            compileScope = true;
            runtimeScope = true;
            testScope = true;
        }
        else
        {
            systemScope = false;
            providedScope = false;
            compileScope = false;
            runtimeScope = false;
            testScope = false;
        }
    }

If you want something else, maybe you can just include the scope you want. The 
code above will help you figure out which one.

> excludeScope=test doesn't work
> ------------------------------
>
>                 Key: MDEP-85
>                 URL: http://jira.codehaus.org/browse/MDEP-85
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Bug
>          Components: copy-dependencies
>    Affects Versions: 2.0-alpha-4
>            Reporter: Dominique Jean-Prost
>            Assignee: Brian Fox
>
> mvn dependency:copy-dependencies  -DexcludeScope=test doesn't seem to work 
> correctly : I get a 
> [INFO] [dependency:copy-dependencies]
> [INFO] 
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] 
> ------------------------------------------------------------------------
> [INFO]  Can't exclude Test scope, this will exclude everything.
> [INFO] 
> ------------------------------------------------------------------------
> If I use mvn dependency:copy-dependencies -DincludeScope=provided, I do get 
> only provided scope artifact, that is the test scope is exluded indeed.
> ---> To my mind, excludeScope=test should work then.

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