maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kenney Westerhof <ken...@apache.org>
Subject Re: ScopeArtifactFilter
Date Tue, 03 Oct 2006 13:42:10 GMT


Brian E. Fox wrote:
> Is it correct that ScopeArtifactFilter effectively ignores provided and
> system scopes in the includes check? By the code below, you can see that
> only compile, runtime and test are supported.

Unfortunately, yes.

I've tried to get this changed a bunch of times in the past but it was -1'd.

I think it's the responsibility of the recipient of those transitive dependencies
to decide wheter to use them or not, especially in the case of 'provided' scope.
Provided for what? The target platform! Not eclipse or unit tests or the java compiler
(which usually fails because of a 'class bytes not found' error)..

I was just thinking about this last night, funny it pops up again now :)

-- Kenney

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

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


Mime
View raw message