Hi, thanks for answer. On 13th January 2009 14:02 user Stephane Nicoll <stephane.nic...@gmail.com> wrote: >> 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. A 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> > > Well, you can have as many excludes as you want so you need to define the > different libs that must be excluded. > > <packagingExcludes>WEB-INF/lib/foo*.jar,WEB-INF/lib/bar*.jar</packagingExcludes>
Yes I can, but specifying 30 jars explicity by name for me is the same as copy/paste 30 dependencies with <scope>provided</scope>. I'd like to specify a mask (regexp) for those jars which should be excluded. If WEB-INF/lib/foo*.jar work pretty well, why ^WEB-INF/lib/foo*.jar doesn't ? For me the first example (foo*) is also some kind of regexp. Do you resolve only * or some other regexp signs? > That being said, using a regexp is a good idea, you can file an improvement > in Jira for this. Ok, I'll propose that improvement. -- Cheers, Matthew --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org