Yes, the test scope is effectively everything. It makes sense if you
think about it: Runtime is pretty much everything really needed minus
anything extra to instrument tests like junit. Since you are running
during tests you need runtime, but since it's test you also need those.
So if the plugin asks the artifactfilter if this dependency is in test
scope, the answer is always yes. In short, the dependency plugin is
handling the scope as it will be available on the classpath, not how
it's specified in the pom. In fact, it uses the same class as maven
itself:

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

Instead of specifying which scopes to exclude, you should be able to
specify which ones to include. The code above will help make it clear
which one you want. My guess is probably runtime.

-----Original Message-----
From: andy law (RI) [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 10, 2007 8:43 AM
To: Maven Users List
Subject: RE: Applets and assembly of webapps

Brian,


Thanks for that.

I've worked out now how to get the dependencies from the project and
dump them into a known location. I now have two further problems, one of
which I think is either a bug in my understanding or in the dependency
plugin (in the latter case I'll have to work out how to drive the jira).

If I specifiy that I want to unpack or copy dependencies and tell the
configuration that I want to exclde 'test' scope (since I don't want
junit in my applet), I get an error message that excluding scope 'test'
excludes everything which *I* think is wrong.


Secondly, I actually want to pull out the dependency jars and insert
them into the applet I'm trying to build. I can only copy/unpack
dependencies to files in the filesystem. Anyone got any clues about how
to force that to happen (in an easy and portable way)?

Later,

Andy

-------------
Yada, yada, yada...

The information contained in this e-mail (including any attachments) is
confidential and is intended for the use of the addressee only.   The
opinions expressed within this e-mail (including any attachments) are
the opinions of the sender and do not necessarily constitute those of
Roslin Institute (Edinburgh) ("the Institute") unless specifically
stated by a sender who is duly authorised to do so on behalf of the
Institute.
  

> -----Original Message-----
> From: Brian E. Fox [mailto:[EMAIL PROTECTED]
> Sent: 10 January 2007 13:28
> To: Maven Users List
> Subject: RE: Applets and assembly of webapps
> 
> 
> >There's also the issue of having to code dependencies twice,
> once as a
> proper >dependency and once more in the dependency copy configuration 
> section?
> 
> This was done to allow copying/unpacking artifacts that aren't 
> intended to be typical dependencies, such as zip files. The 
> xxx-dependencies goals take directly from the dependency list, but 
> currently you can only exclude certain things from the global list. In

> 2.0-alpha-2, there should be the ability to specify only artifacts you

> want. I think this will eliminate the duplication in many cases:
> http://jira.codehaus.org/browse/MDEP-54
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



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

Reply via email to