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 16:10:12 UTC

Re: packagingEcludes question

Hi, thanks for answer.

On 13th January 2009 14:02 user Stephane Nicoll
<st...@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-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: packagingEcludes question

Posted by Stephane Nicoll <st...@gmail.com>.
All maven plugins use the standard ant pattern resolution for paths.

S.

On Tue, Jan 13, 2009 at 4:10 PM, Mateusz GrzechociƄski <
mateusz@grzechocinski.net> wrote:

> Hi, thanks for answer.
>
> On 13th January 2009 14:02 user Stephane Nicoll
> <st...@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-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Large Systems Suck: This rule is 100% transitive. If you build one, you
suck" -- S.Yegge