We do something like this in a profile:

                    <!-- Generate JBoss artifact -->
                    <!--
                        We generate another war with 'jboss' classifier,
                        excluding some jars from WEB-INF/lib
                    -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-war-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>jboss-war</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>war</goal>
                                </goals>
                                <configuration>
                                    <classifier>jboss</classifier>
                                    
<packagingExcludes>WEB-INF/lib/xml-apis-*.jar,WEB-INF/lib/jsf-api-*.jar,WEB-INF/lib/jsf-impl-*.jar</packagingExcludes>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>

It's not pretty, but it works.
HTH,
Tomás




________________________________
From: Benson Margulies <bimargul...@gmail.com>
To: Maven Users List <users@maven.apache.org>
Sent: Wed, November 4, 2009 3:25:39 PM
Subject: Re: JAR subtraction from webapp WEB-INF/lib / forcing 'provided' on a  
list of artifacts

Ah, I can't use your suggestion. CXF itself has all these dependencies
that have to be trimmed for some containers. I'll just have to make
all the exclusions.

On Wed, Nov 4, 2009 at 8:49 AM, Jesse Farinacci <jie...@gmail.com> wrote:
> Hi Benson,
>
> On Wed, Nov 4, 2009 at 8:39 AM, Benson Margulies <bimargul...@gmail.com> 
> wrote:
>> I see, if you mean a set of profiles, each with a dependencyManagement
>> that makes some things 'provided', then I'm following, and that is
>> what I need.
>>
>
> No, that isn't what I mean. I would have a profile for each container
> I was interested in supporting. That profile would add a dependency
> (not dependencyManagement) on the corresponding module
> ${container}-dependencies. This module would specifically depend on
> whatever it needed. I suspect this could be handled within the profile
> itself, but I am a module-happy kind of guy.. :-)
>
> As far as exclusions go, there is no way to ban a dependency at the
> top level. You must list exclusions manually, for each dependency. I
> believe that Maven 3 may be attempting to remedy this.
>
> -Jesse
>
> --
> There are 10 types of people in this world, those
> that can read binary and those that can not.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org


      

Reply via email to