You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Mateusz GrzechociƄski <ma...@grzechocinski.net> on 2009/01/13 12:42:22 UTC

question

Hi everyone,

I have one small problem with maven-war-plugin.

In my project I need to have a profile which excludes some jars (about
30) from packaging when war is being created. It should create
distribution war which contains only submodule jars, not external
libraries which will be stored always on server.

I used:
<plugins>
     <plugin>
         <artifactId>maven-war-plugin</artifactId>
         <version>2.1-alpha-2</version>
         <configuration>
            <packagingExcludes>WEB-INF/lib/*.jar</packagingExcludes>
         </configuration>
     </plugin>
</plugins>

and it works really great. Unfortunately it exludes all jars. As I
mentioned, there some jars (other modules of my app) which have to be
in WEB-INF/lib. I wonder if I could specify regular expression like:

<packagingExcludes>^WEB-INF/lib/prefix*.jar</packagingExcludes>

but id doesn't work for me :(

My question to you is - is there any solution for that? Of course I
can copy all dependencies to profile and set <scope>provided<scope>,
but as I mentioned earlier I have about 30 dependencies (my app is
quite big) and my pom is then becoming really messy. Does
<packagingExludes> accept regular expressions? If so, how to exlude
all jar but some starting with specified prefix?

Will be very gratefull for any answer. Sory for my bad English :)

Greetings,
Matthew

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