You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Martin Goldhahn <Ma...@vismaunique.no> on 2006/02/17 12:03:53 UTC

WAR plugin in M2: excludes not all files

Hi!
I'm using Maven 2.0.1
I have the following snippet in my pom.xml:

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-war-plugin</artifactId>
            <configuration>
                <excludes>WEB-INF/lib/geronimo-spec*.jar,
WEB-INF/lib/junit*.jar</excludes>
            </configuration>
        </plugin>

This doesn't seem to work, according to the doc it should. How do I tell
the plug-in the exclude both my JUnit files and the Geronimo-spec files.
I tried regexps, and the warSourceExcludes tag instead of the excludes
tag. The result is the same.

Is this a bug or am I doing something wrong?

Martin

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


Re: WAR plugin in M2: excludes not all files

Posted by Mang Jun Lau <Ma...@otpp.com>.
Oh sorry, maybe I had the wrong idea.  Maybe you can try excluding as a 
resource like so:

  <build>
    <resources>
      <resource>
        <directory>${basedir}</directory>
        <excludes>
          <exclude>WEB-INF/lib/geronimo-spec*.jar</exclude>
          <exclude>WEB-INF/lib/junit*.jar</exclude>
        </excludes>
      </resource>
    </resources>
  </build>


_Mang Lau





Lee Meador <le...@leemeador.com> 
Sent by: leemeador76018@gmail.com
02/17/2006 02:11 PM
Please respond to
"Maven Users List" <us...@maven.apache.org>


To
Maven Users List <us...@maven.apache.org>
cc

Subject
Re: WAR plugin in M2: excludes not all files






If I have <excludes>**/lib/*.jar</excludes>, no files go into my war.

If I have <excludes><exclude>**/lib/*.jar</exclude></excludes> all the
dependent jars go into my war.

Putting two <exclude> sections under the <excludes> doesn't make it work.

Is there some other stuff you have to put in the pom to make it work?

-- Lee Meador

On 2/17/06, Mang Jun Lau <Ma...@otpp.com> wrote:
>
> Actually, multiple excludes do work.  You should have the following
> snippet:
>
> <excludes>
>   <exclude>WEB-INF/lib/geronimo-spec*.jar</exclude>
>   <exclude>WEB-INF/lib/junit*.jar</exclude>
> </excludes>
>
>
>
> _Mang Lau
>
>
>
>
>
> Tim Davies <ti...@ktsplc.com>
> 02/17/2006 06:07 AM
> Please respond to
> "Maven Users List" <us...@maven.apache.org>
>
>
> To
> Maven Users List <us...@maven.apache.org>
> cc
>
> Subject
> Re: WAR plugin in M2: excludes not all files
>
>
>
>
>
>
> I believe that there is a bug which means that multiple excludes will
> not work but a single one will. Im afraid I cant remember where I read
> about this as it was a while ago that I came across it.
>
>
>
> Martin Goldhahn wrote:
> > Hi!
> > I'm using Maven 2.0.1
> > I have the following snippet in my pom.xml:
> >
> >         <plugin>
> >             <groupId>org.apache.maven.plugins</groupId>
> >             <artifactId>maven-war-plugin</artifactId>
> >             <configuration>
> >                 <excludes>WEB-INF/lib/geronimo-spec*.jar,
> > WEB-INF/lib/junit*.jar</excludes>
> >             </configuration>
> >         </plugin>
> >
> > This doesn't seem to work, according to the doc it should. How do I 
tell
> > the plug-in the exclude both my JUnit files and the Geronimo-spec 
files.
> > I tried regexps, and the warSourceExcludes tag instead of the excludes
> > tag. The result is the same.
> >
> > Is this a bug or am I doing something wrong?
> >
> > Martin
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
> --
> Tim Davies
> Analyst Developer
>
> KTS PLC: Service you can bank on
> 8th Floor, Finsbury Tower,
> 103-105 Bunhill Row,
> London  EC1Y 8LZ
> tel: +44 (0)20 7256 2300
> fax: +44 (0)20 7256 2301
>
> email: tim.davies@ktsplc.com
> web: http://www.ktsplc.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
>


--
-- Lee Meador
Sent from gmail. My real email address is lee@leemeador.com


Re: WAR plugin in M2: excludes not all files

Posted by Lee Meador <le...@leemeador.com>.
If I have <excludes>**/lib/*.jar</excludes>, no files go into my war.

If I have <excludes><exclude>**/lib/*.jar</exclude></excludes> all the
dependent jars go into my war.

Putting two <exclude> sections under the <excludes> doesn't make it work.

Is there some other stuff you have to put in the pom to make it work?

-- Lee Meador

On 2/17/06, Mang Jun Lau <Ma...@otpp.com> wrote:
>
> Actually, multiple excludes do work.  You should have the following
> snippet:
>
> <excludes>
>   <exclude>WEB-INF/lib/geronimo-spec*.jar</exclude>
>   <exclude>WEB-INF/lib/junit*.jar</exclude>
> </excludes>
>
>
>
> _Mang Lau
>
>
>
>
>
> Tim Davies <ti...@ktsplc.com>
> 02/17/2006 06:07 AM
> Please respond to
> "Maven Users List" <us...@maven.apache.org>
>
>
> To
> Maven Users List <us...@maven.apache.org>
> cc
>
> Subject
> Re: WAR plugin in M2: excludes not all files
>
>
>
>
>
>
> I believe that there is a bug which means that multiple excludes will
> not work but a single one will. Im afraid I cant remember where I read
> about this as it was a while ago that I came across it.
>
>
>
> Martin Goldhahn wrote:
> > Hi!
> > I'm using Maven 2.0.1
> > I have the following snippet in my pom.xml:
> >
> >         <plugin>
> >             <groupId>org.apache.maven.plugins</groupId>
> >             <artifactId>maven-war-plugin</artifactId>
> >             <configuration>
> >                 <excludes>WEB-INF/lib/geronimo-spec*.jar,
> > WEB-INF/lib/junit*.jar</excludes>
> >             </configuration>
> >         </plugin>
> >
> > This doesn't seem to work, according to the doc it should. How do I tell
> > the plug-in the exclude both my JUnit files and the Geronimo-spec files.
> > I tried regexps, and the warSourceExcludes tag instead of the excludes
> > tag. The result is the same.
> >
> > Is this a bug or am I doing something wrong?
> >
> > Martin
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
> --
> Tim Davies
> Analyst Developer
>
> KTS PLC: Service you can bank on
> 8th Floor, Finsbury Tower,
> 103-105 Bunhill Row,
> London  EC1Y 8LZ
> tel: +44 (0)20 7256 2300
> fax: +44 (0)20 7256 2301
>
> email: tim.davies@ktsplc.com
> web: http://www.ktsplc.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
>


--
-- Lee Meador
Sent from gmail. My real email address is lee@leemeador.com

Re: WAR plugin in M2: excludes not all files

Posted by Mang Jun Lau <Ma...@otpp.com>.
Actually, multiple excludes do work.  You should have the following 
snippet:

<excludes>
  <exclude>WEB-INF/lib/geronimo-spec*.jar</exclude>
  <exclude>WEB-INF/lib/junit*.jar</exclude>
</excludes>



_Mang Lau





Tim Davies <ti...@ktsplc.com> 
02/17/2006 06:07 AM
Please respond to
"Maven Users List" <us...@maven.apache.org>


To
Maven Users List <us...@maven.apache.org>
cc

Subject
Re: WAR plugin in M2: excludes not all files






I believe that there is a bug which means that multiple excludes will 
not work but a single one will. Im afraid I cant remember where I read 
about this as it was a while ago that I came across it.



Martin Goldhahn wrote:
> Hi!
> I'm using Maven 2.0.1
> I have the following snippet in my pom.xml:
>
>         <plugin>
>             <groupId>org.apache.maven.plugins</groupId>
>             <artifactId>maven-war-plugin</artifactId>
>             <configuration>
>                 <excludes>WEB-INF/lib/geronimo-spec*.jar,
> WEB-INF/lib/junit*.jar</excludes>
>             </configuration>
>         </plugin>
>
> This doesn't seem to work, according to the doc it should. How do I tell
> the plug-in the exclude both my JUnit files and the Geronimo-spec files.
> I tried regexps, and the warSourceExcludes tag instead of the excludes
> tag. The result is the same.
>
> Is this a bug or am I doing something wrong?
>
> Martin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
> 

-- 
Tim Davies
Analyst Developer

KTS PLC: Service you can bank on
8th Floor, Finsbury Tower,
103-105 Bunhill Row,
London  EC1Y 8LZ
tel: +44 (0)20 7256 2300
fax: +44 (0)20 7256 2301

email: tim.davies@ktsplc.com
web: http://www.ktsplc.com 


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



Re: WAR plugin in M2: excludes not all files

Posted by Tim Davies <ti...@ktsplc.com>.
I believe that there is a bug which means that multiple excludes will 
not work but a single one will. Im afraid I cant remember where I read 
about this as it was a while ago that I came across it.



Martin Goldhahn wrote:
> Hi!
> I'm using Maven 2.0.1
> I have the following snippet in my pom.xml:
>
>         <plugin>
>             <groupId>org.apache.maven.plugins</groupId>
>             <artifactId>maven-war-plugin</artifactId>
>             <configuration>
>                 <excludes>WEB-INF/lib/geronimo-spec*.jar,
> WEB-INF/lib/junit*.jar</excludes>
>             </configuration>
>         </plugin>
>
> This doesn't seem to work, according to the doc it should. How do I tell
> the plug-in the exclude both my JUnit files and the Geronimo-spec files.
> I tried regexps, and the warSourceExcludes tag instead of the excludes
> tag. The result is the same.
>
> Is this a bug or am I doing something wrong?
>
> Martin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>   

-- 
Tim Davies
Analyst Developer

KTS PLC: Service you can bank on
8th Floor, Finsbury Tower,
103-105 Bunhill Row,
London  EC1Y 8LZ
tel: +44 (0)20 7256 2300
fax: +44 (0)20 7256 2301

email: tim.davies@ktsplc.com
web: http://www.ktsplc.com 


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