Hi Folks
 
* Maven 2.0.8 with Assembly Plugin 2.2-beta-2 and JDK 1.5.0_14 on
Windows *
 
I have many .jar dependencies and a handfull of .so dependencies.  Each
of my .so dependencies has a classifier, e.g. "solaris".  I intend my
assembly to put all .jar dependencies into lib/ and all .so dependencies
into nativelib/<classifier>/, e.g. nativelib/solaris/.
 
The following is the dependency set for outputDirectory=lib/
 
<dependencySet>
    <outputDirectory>/lib</outputDirectory>
    <excludes>
        <!--<exclude>*:*:so:solaris</exclude>-->

    </excludes>
</dependencySet>
 
Note that <excludes> is empty since <exclude> is commented out.  Note
that <includes> is absent.
 
As given, all my dependencies are put out into lib/ (including those
with type=so classifier=solaris since the exclusion is commented out).
 
If I uncomment the <exclude> element then none of my dependencies go to
lib/ when using 2.2-beta-2.  With 2.2-beta-1 I get my expected
behaviour; .jars all go only to lib/.
 
I suspect that the colon-delimited <exclude> format 
 
   <groupId>:<artifactId>:<type>:<classifier>
 
in my case
 
    *:*:so:solaris
 
which I thought meant 
 
    groupId = anything AND artifactId = anything AND type = so AND
classifier = solaris
 
is actually being interpreted as
 
    groupId = anything OR artifactId = anything OR type = so OR
classifier = solaris
 
Naturally group = anything will match all artifacts and, since the
expression is OR-based, everything gets excluded.
 
Now this is just an hypothesis for now.  But it's the only theory I can
come up with that would explain not only the above behaviour, but also
the fact that with <include>*:*:so:solaris</include> in a different
dependencySet all of my dependencies go to nativelib/solaris/ when using
2.2-beta-2.  Once again, with 2.2-beta-1, only those dependencies with
type=so and classifier=solaris go to nativelib/solaris/.
 
For completeness, here is my dependencySet for
outputDirectory=nativelib/solaris/
 
<dependencySet>
    <outputDirectory>/nativelib/solaris</outputDirectory>
    <includes>
        <include>*:*:so:solaris</include>
    </includes>
</dependencySet>
 
Clarification would be greatly appreciated.
 
Kind regards, Robin.
 

_____________________________________________________________________
Before acting on this e mail or opening any attachment please read the 
disclaimer which can be accessed at 
http://www.investec.com/EmailDisclaimer/UKEmailDisclaimer.htm
Investec Bank (UK) Limited is authorised and regulated by the Financial 
Services Authority.
_____________________________________________________________________

_____________________________________________________________________
This e-mail has been scanned for viruses by MCI's Internet Managed Scanning 
Services - powered by MessageLabs. For further information visit 
http://www.mci.com

Investec Bank (UK) Limited
Registered office: 2 Gresham Street, London, EC2V 7QP Company No: 00489604 
Incorporated in England and Wales

Reply via email to